Home / Soli Proxy
proxy

Systemd Service

Run soli-proxy as a systemd service for automatic restart on failure

1

Copy the service file

The service file is located in the soli-proxy repository:

$ sudo cp /path/to/soli-proxy/scripts/soli-proxy.service /etc/systemd/system/
2

Reload systemd daemon

$ sudo systemctl daemon-reload
3

Enable and start the service

Enable auto-start on boot:

$ sudo systemctl enable soli-proxy

Start the service now:

$ sudo systemctl start soli-proxy

Common Commands

# sudo systemctl status soli-proxy
# sudo systemctl restart soli-proxy
# sudo systemctl stop soli-proxy
# journalctl -u soli-proxy -f

Service File Content

[Unit]
Description=Soli Proxy Server
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/path/to/soli-proxy
ExecStart=/path/to/soli-proxy/target/release/soli-proxy daemon
Restart=always
RestartSec=5

Environment="RUST_LOG=info"
Environment="SOLI_PID_DIR=/path/to/soli-proxy"
Environment="SOLI_LOG_DIR=/path/to/soli-proxy"

StandardOutput=append:/path/to/soli-proxy/proxy.log
StandardError=append:/path/to/soli-proxy/proxy.log

[Install]
WantedBy=multi-user.target

App Health Monitoring

When apps are managed by soli-proxy (via ./sites directory), the proxy automatically:

  • Checks app health every 30 seconds via /up endpoint
  • Auto-restarts any app that fails the health check
  • Only restarts on actual failures (connection refused, timeout), not on non-2xx responses