Skip to content

Repository files navigation

ServerRemote

Home/LAN server remote management built from two .NET 10 applications plus a shared contracts library and a tray companion.

Projects

ProjectTypePurpose
src/ServerRemote.Contractsclasslib (net10.0)Shared DTOs/enums between service and app
src/ServerRemote.ServiceASP.NET Core / Windows service (net10.0-windows)HTTPS API, metrics, service control, power actions
src/ServerRemote.TrayWinForms (net10.0-windows)NotifyIcon companion: status display, service restart
src/ServerRemote.App.NET MAUI (Windows + Android)Dashboard for monitoring & control

API endpoints

MethodPathAuthDescription
GET/api/healthopenLiveness, version, hostname, uptime
GET/api/system/metricsBearerCPU, RAM, disk usage
GET/api/servicesBearerStatus of the configured services
POST/api/services/{key}/{start|stop|restart}BearerControl a service
POST/api/system/powerBearerShutdown/restart (confirm:true required)
GET/api/argusBearerArgus Monitor data (placeholder)

Auth: header Authorization: Bearer <ApiKey>. HTTPS with a self-signed certificate (generated on first start; the SHA-256 fingerprint is logged — it can be entered in the app for pinning).

Configuration (service)

src/ServerRemote.Service/appsettings.json, section ServerRemote:

  • ApiKeydo not commit in clear text; during development use User Secrets or the ServerRemote__ApiKey environment variable, in production use a machine environment variable.
  • Network.HttpsPort (default 9443), Network.BindAddress (0.0.0.0 for LAN).
  • Certificate.PfxPath / PfxPassword — empty = self-signed.
  • MonitoredServices — list of Key, DisplayName, WindowsServiceName, Controllable.

Quick start (development)

# Run the service locally as a console app$env:ServerRemote__ApiKey="test-key-123"
dotnet run --project src/ServerRemote.Service
# Test from a second terminal
curl -k https://localhost:9443/api/health
curl -k -H "Authorization: Bearer test-key-123" https://localhost:9443/api/system/metrics

Run the app (Windows):

dotnet build src/ServerRemote.App -f net10.0-windows10.0.19041.0# then enter host/port/API key in the app under "Settings"

Install as a Windows service (production)

In an administrator PowerShell:

# 1. Publish the service
dotnet publish src/ServerRemote.Service -c Release
# 2. Set the API key as a machine environment variable
[Environment]::SetEnvironmentVariable("ServerRemote__ApiKey","my-secret-key","Machine")
# 3. Register and start the service (run from the publish output folder,# or copy install-service.ps1 next to ServerRemote.Service.exe)
.\scripts\install-service.ps1

See docs/setup-service-permissions.md for the full setup, required privileges, firewall rule, and a least-privilege alternative.

Building the Android APK

See docs/android-apk.md for signing setup and building a signed release APK.

License

Released under the MIT License.

Open phases

  • Argus Monitor: shared-memory integration in the service (/api/argus) — adopt the struct layout from the official Argus Monitor documentation.
  • Backlog: SignalR live push, threshold alerts/push notifications, Wake-on-LAN, top processes, API versioning/rate limiting, MSI installer.

About

Windows Remote Server Control and Status Monitoring with NanoKVM Integration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages