Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

systemd-user-web-services

Deploy and manage persistent web UIs and dashboards as systemd user services — no root, survives reboot, accessible via LAN and Tailscale.

What's Included

  • Generic systemd user service template (works for any web app)
  • Ready-to-use examples: Hermes WebUI, Checkmate
  • Idempotent setup scripts
  • Port verification tool
  • Full troubleshooting table

Quick Start

# One-time: enable linger (allows services to run after logout)
sudo loginctl enable-linger $USER

# Create service file
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/myapp.service <<'EOF'
[Unit]
Description=My Web App
After=network.target

[Service]
Type=simple
WorkingDirectory=/home/user/myapp
Environment=PORT=8080
Environment=HOST=0.0.0.0
ExecStart=/home/user/myapp/start.sh
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target
EOF

# Enable and start
systemctl --user daemon-reload
systemctl --user enable --now myapp.service
systemctl --user status myapp.service

File Structure

systemd-user-web-services/
├── SKILL.md                     # Full guide + templates
└── references/
    ├── netdata-deploy.md       # NetData exposure via user-mode proxy
    └── dashdot-deploy.md        # dashdot system dashboard deployment

Key Features

  • No root required — runs as your user
  • Survives reboot — systemd handles startup
  • Survives logout — linger keeps sessions alive
  • LAN + Tailscale access — bind to 0.0.0.0
  • Binds to any port — no privilege needed for high ports

Common Issues Fixed

Symptom Cause Fix
Failed to connect to bus Missing env vars Export XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS
Port not listening App binds to 127.0.0.1 Set HOST=0.0.0.0 in environment
Service dies on logout Linger not enabled sudo loginctl enable-linger $USER
No such file on ExecStart Relative path Use absolute paths

License

MIT

About

systemd-user-web-services — Hermes Agent skill

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors