DorkOS
Self-Hosting

Deployment

Deploy DorkOS in production

Deployment

DorkOS deploys as a standalone server via the dorkos npm package. A single process serves both the API and the built React client.

Quick Deploy

npm install -g dorkos
export ANTHROPIC_API_KEY=your-key-here
dorkos --port 4242

Production Setup

Install DorkOS

npm install -g dorkos

Configure environment

DORKOS_DEFAULT_CWD=/path/to/projects export DORKOS_BOUNDARY=/path/to/boundary export
NODE_ENV=production ```
</Tab>

<Tab value="Interactive Setup">
```bash
dorkos init

The setup wizard configures port, working directory, boundary, and optional tunnel settings. Configuration is saved to ~/.dork/config.json.

Start the server

dorkos

Config precedence: CLI flags > environment variables > ~/.dork/config.json > built-in defaults.

Environment Variables

Prop

Type

Directory Boundary

DORKOS_BOUNDARY restricts file access to a specific directory tree. All cwd, path, and dir parameters are validated against this boundary — requests outside it return 403.

The default boundary is the home directory. For production deployments, set a tighter boundary to limit what Claude can access.

systemd Service

For long-running deployments on Linux:

/etc/systemd/system/dorkos.service
[Unit]
Description=DorkOS - Autonomous Agent Operating System
After=network.target

[Service]
Type=simple
User=dorkos
Environment=ANTHROPIC_API_KEY=your-key-here
Environment=DORKOS_PORT=4242
Environment=DORKOS_HOST=0.0.0.0
Environment=DORKOS_DEFAULT_CWD=/home/dorkos/projects
Environment=DORKOS_BOUNDARY=/home/dorkos/projects
Environment=NODE_ENV=production
ExecStart=/usr/local/bin/dorkos
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl enable dorkos
sudo systemctl start dorkos

Docker Deployment

For Docker-based deployments — including docker run, Docker Compose, persistent volumes, and reverse proxy setup — see the dedicated Docker guide.

Health Check

curl http://localhost:4242/api/health
# { "status": "ok", "version": "0.8.0", "uptime": 12345 }

When a tunnel is active, the response includes a tunnel field with tunnel status.

The health endpoint is unauthenticated and suitable for load balancer or monitoring use.

Next Steps