Self-hosting
Run KrowForge on your own server. Standard Flask + gunicorn + nginx + systemd.
Requirements
- Linux server (tested on Ubuntu 22.04+).
- Python 3.11+.
- nginx 1.20+.
- 2 GB RAM minimum (4+ recommended for the agent's working set).
- Outbound HTTPS (the agent calls model APIs).
- A domain + TLS cert (Let's Encrypt is fine).
Install
git clone https://github.com/<org>/krowforge.git /var/www/krowforge
cd /var/www/krowforge
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
Configure
Copy env.example → .env and fill in:
KROWFORGE_SECRET_KEY=<generate with openssl rand -hex 32>
ANTHROPIC_API_KEY=…
OPENAI_API_KEY=…
DATABASE_URL=sqlite:///krowforge.db # or postgres://…
Optional:
KROWFORGE_ALPHA=1 # unhide alpha features
SNAPSHOT_BUFFER_SIZE=200 # default 100
BUDGET_DEFAULT_DAILY_USD=5
Systemd unit
krowforge.service:
[Unit]
Description=KrowForge
After=network.target
[Service]
Type=simple
User=www-data
WorkingDirectory=/var/www/krowforge
EnvironmentFile=/var/www/krowforge/.env
ExecStart=/var/www/krowforge/venv/bin/gunicorn -w 4 -b 127.0.0.1:5060 wsgi:app
Restart=on-failure
[Install]
WantedBy=multi-user.target
sudo systemctl enable --now krowforge
nginx
server {
listen 443 ssl http2;
server_name app.example.com;
ssl_certificate /etc/letsencrypt/live/app.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/app.example.com/privkey.pem;
client_max_body_size 50M;
location / {
proxy_pass http://127.0.0.1:5060;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off; # important for SSE
proxy_read_timeout 600s; # for long agent runs
}
}
TLS
sudo certbot --nginx -d app.example.com
First-run
Visit https://app.example.com/auth/register, create the first user — they become the admin.
Backups
scripts/nightly_backup.sh (run via cron or systemd timer) backs up:
krowforge.db(or pg_dump for Postgres).workspaces/..env.
To /var/backups/krowforge/<date>.tar.gz. Restore with scripts/restore_backup.sh <path>.
Updates
cd /var/www/krowforge
git pull
. venv/bin/activate
pip install -r requirements.txt
sudo systemctl restart krowforge
Run scripts/ci.sh --quick after updates to sanity-check.