A non-blocking service manager for Windows, built with Go.
Similar to Linux's systemd, GoSer manages background processes with a modern GUI and CLI.
Dashboard β’ Features β’ Quick Start β’ CLI β’ GUI β’ API β’ License
- Process Management β Start, stop, restart, and monitor background services
- Auto-restart β Configurable restart on failure with max retry limits
- YAML Configuration β Simple per-service YAML config files
- Modern GUI β Desktop application built with Wails + Vue 3 + TailwindCSS
- CLI β Full-featured command-line interface
- Real-time Logs β View output with WebSocket streaming, content-based error highlighting
- Service Dependencies β Topological ordering via
depends_on - Windows Service β Can run as a native Windows service
- Health Checks β HTTP, TCP, and command-based health checks
- Process Tree Management β Reliable process tree termination using Windows Job Objects
βββββββββββββββββββ βββββββββββββββββββ
β GoSer CLI β β GoSer GUI App β
β (goser.exe) β β (goser-app.exe) β
ββββββββββ¬βββββββββ ββββββββββ¬βββββββββ
β HTTP REST + WS β
ββββββββββββ¬βββββββββββ
β
ββββββββββββΌβββββββββββ
β GoSer Daemon β
β (goserd.exe) β
β β
β βββββββββββββββββ β
β βProcess Managerβ β
β βββββββββ¬ββββββββ β
β β β
β βββββ βββββ βββββ β
β βSvcβ βSvcβ βSvcβ β
β β A β β B β β C β β
β βββββ βββββ βββββ β
βββββββββββββββββββββββ
- Go 1.21+
- Node.js 18+
- Inno Setup 6 (optional, for installer)
# Build all binaries (daemon, CLI, GUI)
.\build\build.ps1
# Build with installer
.\build\build.ps1 -InstallerOr build individually:
# Frontend
cd cmd/app/frontend && npm install && npx vite build && cd ../../..
# Daemon
go build -ldflags="-s -w" -o dist/goserd.exe ./cmd/goserd
# CLI
go build -ldflags="-s -w" -o dist/goser.exe ./cmd/goser
# GUI (requires Wails build tags)
go build -tags "desktop,production" -ldflags="-s -w -H=windowsgui" -o dist/goser-app.exe ./cmd/appgoserd.exe
# or via CLI
goser daemon startCreate a YAML config file:
name: my-web-app
command: node
args:
- server.js
working_dir: "C:/projects/my-app"
env:
NODE_ENV: production
PORT: "3000"
auto_start: true
auto_restart: true
max_restarts: 5
restart_delay: 5sgoser add my-service.yaml
goser start my-web-appgoser list # List all services
goser status my-web-app # Detailed status
goser logs my-web-app # View logsgoser-app.exegoser daemon start Start the daemon in background
goser daemon stop Stop the daemon
goser daemon status Check daemon status
goser list List all services with status
goser start <name> Start a service
goser stop <name> Stop a service
goser restart <name> Restart a service
goser status <name> Detailed service status
goser add <yaml-file> Add a service from YAML file
goser remove <name> Remove a service
goser enable <name> Enable auto-start
goser disable <name> Disable auto-start
goser logs <name> View recent logs
goser logs -n 100 <name> View last 100 lines
The GUI provides a modern interface with:
- Dashboard β Overview of service statistics and daemon status
- Services β List, search, filter, create, edit, and manage services
- Logs β Real-time log streaming with content-based error highlighting
- Settings β Configure daemon connection
- Daemon Control β Start/stop daemon directly from the sidebar
Service files are stored in ~/.goser/services/<name>.yaml:
name: my-service # Required: unique service name
command: node # Required: executable to run
args: # Optional: command arguments
- server.js
- --port=3000
working_dir: "C:/myapp" # Optional: working directory
env: # Optional: environment variables
NODE_ENV: production
auto_start: true # Start when daemon starts
auto_restart: true # Restart on failure
max_restarts: 5 # Max restart attempts
restart_delay: 5s # Delay between restarts
stop_timeout: 10s # Force kill timeout
depends_on: # Optional: service dependencies
- database
health_check: # Optional: health monitoring
type: http
endpoint: "http://localhost:3000/health"
interval: 30s
timeout: 5sLocated at ~/.goser/config.yaml:
daemon:
listen: "127.0.0.1:9876"
log_dir: "~/.goser/logs"
pid_file: "~/.goser/goserd.pid"
max_log_size: "50MB"
log_retention: 7Install as a Windows service for auto-start on boot:
# Install (run as Administrator)
goserd.exe -install
# Start via Windows services
sc start GoSerDaemon
# Uninstall
goserd.exe -uninstallThe daemon exposes a REST API on 127.0.0.1:9876:
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/daemon/status |
Daemon health |
| GET | /api/services |
List all services |
| GET | /api/services/:name |
Get service detail |
| POST | /api/services |
Create service |
| PUT | /api/services/:name |
Update service |
| DELETE | /api/services/:name |
Remove service |
| POST | /api/services/:name/start |
Start service |
| POST | /api/services/:name/stop |
Stop service |
| POST | /api/services/:name/restart |
Restart service |
| GET | /api/services/:name/logs |
Get service logs |
| WS | /ws |
Real-time events |
- Backend: Go 1.21+
- GUI: Wails v2 + Vue 3 + TypeScript + TailwindCSS v4
- CLI: Cobra
- HTTP Server: Gin
- WebSocket: Gorilla WebSocket
- Config: YAML (gopkg.in/yaml.v3)
- Logging: Zap + Lumberjack (rotation)
- Windows Service: kardianos/service
- Process Management: Windows Job Objects for reliable process tree control
goser/
βββ cmd/
β βββ goserd/ # Daemon entry point
β βββ goser/ # CLI entry point
β βββ app/ # Wails GUI entry point
β βββ frontend/ # Vue 3 + TypeScript frontend
βββ internal/
β βββ daemon/ # HTTP server & API handlers
β βββ manager/ # Process manager core
β β βββ process.go # Single process lifecycle
β β βββ manager.go # Service orchestration
β β βββ monitor.go # Auto-restart monitor
β β βββ procutil_*.go # Platform-specific process utils
β βββ client/ # HTTP client library
β βββ config/ # Configuration models & loader
β βββ model/ # Shared data types
β βββ logger/ # Logging & log collection
βββ build/
β βββ build.ps1 # Windows build script
β βββ windows/ # Installer & icons
β βββ icongen/ # ICO generation utility
βββ go.mod
βββ Makefile
βββ wails.json

