feat(deploy): add systemd templates for production linux deployment

Adds production-ready systemd service templates for Linux deployments.

Includes:
- : Auto-restart configuration for the main process.
- : Configuration for Cloudflare Tunnel dependent on the gateway.
- Documentation in .

This simplifies self-hosting setup on VPS and Home Lab environments.
This commit is contained in:
elliotsecops committed 2026-01-28 12:21:06 -04:00
1 parent 07e34e3423
commit ab3154c8f0
3 files changed
+110

No files matched your search

@@ -0,0 +1,21 @@
[Unit]
Description=Clawdbot Gateway
After=network.target
[Service]
# Replace <YOUR_USER> with your linux username (e.g. ubuntu, pi, etc)
User=<YOUR_USER>
# Replace <PATH_TO_CLAWDBOT> with the absolute path to the repo (e.g. /home/user/clawdbot)
WorkingDirectory=<PATH_TO_CLAWDBOT>
# Adjust node path if necessary (run 'which node' to find yours)
# You can change the port or auth settings here
ExecStart=/usr/bin/node dist/entry.js gateway --port 18789 --auth token --token <YOUR_SECURE_TOKEN>
# Restart configuration
Restart=always
RestartSec=3
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,24 @@
[Unit]
Description=Cloudflare Tunnel for Clawdbot
# Ensure the tunnel only starts after the gateway is up
After=network-online.target clawdbot-gateway.service
Wants=network-online.target clawdbot-gateway.service
[Service]
# Replace <YOUR_USER> with your linux username
User=<YOUR_USER>
Group=<YOUR_USER>
Type=notify
# Replace <PATH_TO_CLOUDFLARED> with your cloudflared binary path (usually /usr/local/bin/cloudflared or /usr/bin/cloudflared)
# Replace <TUNNEL_NAME> with your created tunnel name/UUID
ExecStart=<PATH_TO_CLOUDFLARED> tunnel run <TUNNEL_NAME>
Restart=always
RestartSec=5s
# Optional: Point to specific credentials if not in default ~/.cloudflared/ location
# Environment=TUNNEL_ORIGIN_CERT=/home/<YOUR_USER>/.cloudflared/cert.pem
[Install]
WantedBy=multi-user.target