Deployment
Deploy DorkOS in production
Deployment
DorkOS can be deployed as a standalone server using the dorkos npm package.
Quick Deploy
npm install -g dorkos
export ANTHROPIC_API_KEY=your-key-here
dorkos --port 4242The server serves both the API (Express) and the client (built React SPA) from a single port.
Production Setup
Install DorkOS
npm install -g dorkosConfigure environment
Set environment variables or use the interactive setup wizard:
export ANTHROPIC_API_KEY=your-key-here
export DORKOS_PORT=4242
export DORKOS_DEFAULT_CWD=/path/to/projects
export DORKOS_BOUNDARY=/path/to/boundary
export NODE_ENV=productiondorkos initThe setup wizard walks you through configuring port, working directory, boundary, and optional tunnel settings. Configuration is saved to ~/.dork/config.json.
Start the server
dorkosConfig precedence: CLI flags > environment variables > ~/.dork/config.json > built-in defaults.
Environment Variables
Prop
Type
Directory Boundary
The DORKOS_BOUNDARY setting restricts file access to a specific directory tree. All cwd, path, and dir parameters are validated against this boundary, returning 403 for paths outside it.
The default boundary is the user's home directory. For production deployments, set a tighter boundary to limit the directories Claude can access.
systemd Service
For long-running deployments on Linux, create a systemd service unit:
[Unit]
Description=DorkOS - Web UI for Claude Code
After=network.target
[Service]
Type=simple
User=dorkos
Environment=ANTHROPIC_API_KEY=your-key-here
Environment=DORKOS_PORT=4242
Environment=DORKOS_DEFAULT_CWD=/home/dorkos/projects
Environment=NODE_ENV=production
ExecStart=/usr/local/bin/dorkos
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.targetEnable and start:
sudo systemctl enable dorkos
sudo systemctl start dorkosHealth Check
Verify the server is running:
curl http://localhost:4242/api/health
# { "status": "ok", "version": "0.2.0", "uptime": 12345 }The health endpoint is unauthenticated and suitable for load balancer or monitoring integration.