VPS
This guide walks through a production deployment on a generic Linux VPS (Ubuntu, Debian, Rocky, Arch — any systemd distro). End result: a public HTTPS endpoint with a hardened systemd service, automatic TLS, and scheduled backups.
What You’ll Need
Section titled “What You’ll Need”- A Linux VPS with at least 1 vCPU, 1 GB RAM, 20 GB disk (Hetzner CX11, DigitalOcean $6, Linode Nanode all work)
- A domain pointed at the VPS IP
- Root or sudo access
1. Install AI Butler
Section titled “1. Install AI Butler”cd /tmpcurl -sSL https://github.com/LumabyteCo/aibutler/releases/latest/download/aibutler_Linux_x86_64.tar.gz | tar xzsudo mv aibutler /usr/local/bin/sudo aibutler version2. Create a Service Account
Section titled “2. Create a Service Account”sudo useradd --system --home /var/lib/aibutler --create-home aibutlersudo mkdir -p /etc/aibutlersudo chown aibutler:aibutler /var/lib/aibutler /etc/aibutler3. systemd Service
Section titled “3. systemd Service”Create /etc/systemd/system/aibutler.service:
[Unit]Description=AI ButlerAfter=network-online.targetWants=network-online.target
[Service]Type=simpleUser=aibutlerGroup=aibutlerWorkingDirectory=/var/lib/aibutlerExecStart=/usr/local/bin/aibutler run --config /etc/aibutler/config.yamlRestart=on-failureRestartSec=5s
# HardeningNoNewPrivileges=trueProtectSystem=strictProtectHome=truePrivateTmp=trueReadWritePaths=/var/lib/aibutlerCapabilityBoundingSet=RestrictNamespaces=yesRestrictRealtime=yesMemoryDenyWriteExecute=yesLockPersonality=yesProtectKernelTunables=yesProtectKernelModules=yesProtectKernelLogs=yesProtectControlGroups=yesProtectClock=yesRestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
[Install]WantedBy=multi-user.targetEnable and start:
sudo systemctl daemon-reloadsudo systemctl enable --now aibutler4. Reverse Proxy with Caddy (Recommended)
Section titled “4. Reverse Proxy with Caddy (Recommended)”Caddy gives you automatic HTTPS with zero config. Install it, then create /etc/caddy/Caddyfile:
aibutler.example.com { reverse_proxy localhost:3377 { header_up X-Real-IP {remote_host} flush_interval -1 } encode gzip}sudo systemctl reload caddyThat’s it — TLS is provisioned automatically from Let’s Encrypt.
5. Reverse Proxy with nginx (Alternative)
Section titled “5. Reverse Proxy with nginx (Alternative)”If you prefer nginx + certbot:
server { listen 80; server_name aibutler.example.com; return 301 https://$host$request_uri;}
server { listen 443 ssl http2; server_name aibutler.example.com;
ssl_certificate /etc/letsencrypt/live/aibutler.example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/aibutler.example.com/privkey.pem;
client_max_body_size 25M;
location / { proxy_pass http://localhost:3377; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_read_timeout 600s; proxy_buffering off; }}sudo certbot --nginx -d aibutler.example.com6. Enable Authentication
Section titled “6. Enable Authentication”On a public VPS, the web chat MUST have auth enabled:
configurations: web: port: 3377 bind_address: 127.0.0.1 # bind to loopback, only the proxy can reach it auth: enabled: true require_totp: true # strongly recommended session_timeout: 12hCreate the first admin user:
sudo -u aibutler aibutler user create admin --role adminSee Authentication for OIDC, WebAuthn, and password policy.
7. Firewall
Section titled “7. Firewall”sudo ufw allow 22/tcpsudo ufw allow 80/tcpsudo ufw allow 443/tcpsudo ufw enableAI Butler itself only listens on localhost — the only public ports are 80/443 (for the reverse proxy) and 22 (for SSH).
8. Backups
Section titled “8. Backups”Schedule an S3-compatible backup to an off-site location:
configurations: backup: local: enabled: true retention_days: 14 remote: provider: s3 endpoint: s3.us-east-1.amazonaws.com bucket: my-aibutler-backups # access_key / secret_key via vaultsudo -u aibutler aibutler vault set s3_access_key AKIA...sudo -u aibutler aibutler vault set s3_secret_key ...9. Monitoring
Section titled “9. Monitoring”The health endpoint is at /health:
curl https://aibutler.example.com/healthAdd it to your uptime monitor (Uptime Kuma, BetterStack, etc.). Metrics are at /metrics (Prometheus format) if you enable them in config.
10. Updates
Section titled “10. Updates”sudo systemctl stop aibutlercd /tmpcurl -sSL https://github.com/LumabyteCo/aibutler/releases/latest/download/aibutler_Linux_x86_64.tar.gz | tar xzsudo mv aibutler /usr/local/bin/sudo systemctl start aibutlerSchema migrations run automatically on startup. Watch the logs: journalctl -u aibutler -f.