DorkOSDorkOS
Self-Hosting

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 4242

The server serves both the API (Express) and the client (built React SPA) from a single port.

Production Setup

Install DorkOS

npm install -g dorkos

Configure 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=production
dorkos init

The setup wizard walks you through configuring 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

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:

/etc/systemd/system/dorkos.service
[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.target

Enable and start:

sudo systemctl enable dorkos
sudo systemctl start dorkos

Health 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.

Next Steps