DorkOS
Self-Hosting

Deployment

Run your own DorkOS server, from a one-line quick start to a production setup with systemd

Deployment

DorkOS deploys as a standalone server via the dorkos npm package. One process serves both the API and the web cockpit, so nothing but your calls to Anthropic ever leaves the machine it's running on. Run it on your laptop, a spare desktop, or a cloud box, it's the same install either way.

This page covers the Claude Code runtime (the default). If you're running Codex or OpenCode instead, check their setup docs for the credentials they expect.

Docker or a direct install?

For most servers, Docker is the easier default. It keeps DorkOS isolated from the rest of the machine, checks its own health automatically, and upgrades in a couple of commands, all while running as a regular, unprivileged user instead of root. Start with the Docker guide.

A direct install, like the one below, fits better when your agents need broad access to code already on the machine. A container only sees the folders you mount into it, while a direct install (paired with systemd, covered further down) can reach anything your OS user can.

Quick Deploy

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

Open http://localhost:4242 in your browser. That's your cockpit, already running. (Don't have a key yet? The Installation guide shows you where to get one.)

Everything past this point is optional: production hardening for when you're running DorkOS somewhere other than your own machine.

Reference: production configuration

Most people never touch what follows, it's here for when you're putting DorkOS on a shared server, a systemd unit, or anywhere else that isn't a quick local run.

Install DorkOS

npm install -g dorkos

Configure environment

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

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

The setup wizard asks for the port, UI theme (system, light, or dark), whether to enable a tunnel, and a default working directory. 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

Here's the full list, in case you're scripting a deployment or writing a systemd unit:

Prop

Type

Directory Boundary

DORKOS_BOUNDARY is the folder DorkOS is allowed to touch. Every cwd, path, and dir parameter a request sends is checked against it; anything outside returns a 403 and gets rejected.

The default boundary is your whole home directory. For anything public-facing, fence it in tighter than that: point DORKOS_BOUNDARY at just the folder your projects live in.

systemd Service

For long-running deployments on Linux, running DorkOS as a systemd service means it restarts automatically after a crash or reboot:

/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
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

Point a load balancer or monitoring tool at this endpoint to confirm the server is alive:

curl http://localhost:4242/api/health
# { "status": "ok", "version": "x.y.z", "uptime": 12345 }

When a tunnel (a secure link that exposes your local server to the internet without opening firewall ports) is active, the response includes a tunnel field with its status.

The health endpoint is unauthenticated on purpose, so monitoring tools can reach it without a key.

Next Steps