Factories > Managed self-hosting
Self-hosting quickstart
Get a managed self-hosted Automation Platform worker running on Docker and route your first cloud agent run to it in under 10 minutes.
Start a self-hosted worker with the default Docker backend and route a test run to it. The Automation Platform routes the run, and your worker provides the compute.
Prerequisites
Section titled “Prerequisites”- Managed self-hosting access and network connectivity. See the shared managed prerequisites.
- A self-hosted worker API key.
- A Warp account on the worker’s team with permission to create runs, for the test below.
- A Linux machine with a rootful Docker daemon and GNU
stat. - The Oz CLI on the machine that will route the test run. See Installing the CLI.
For macOS or Windows, use the Homebrew or release binary setup instead.
Run your first self-hosted agent
Section titled “Run your first self-hosted agent”~10 minutes
1. Export your worker API key
Section titled “1. Export your worker API key”Export the self-hosted worker key in the terminal that will start the worker. Run creation uses your login separately:
export WARP_API_KEY="YOUR_SELF_HOSTED_WORKER_API_KEY"2. Start the worker
Section titled “2. Start the worker”On the Linux host, run the oz-agent-worker container and mount the Docker socket so the worker can spawn task containers. Choose any --worker-id meaningful for your team — you’ll use this value to route tasks to this worker.
export DOCKER_SOCKET_GID="$(stat -c '%g' /var/run/docker.sock)"
docker run \ --group-add "$DOCKER_SOCKET_GID" \ -v /var/run/docker.sock:/var/run/docker.sock \ -e WARP_API_KEY="$WARP_API_KEY" \ warpdotdev/oz-agent-worker --worker-id "my-worker"Expected outcome: The worker connects to the Automation Platform and begins listening for tasks. You should see log output confirming the connection (something like Connected to Oz / Waiting for tasks).
3. Route a run to your worker
Section titled “3. Route a run to your worker”In a separate terminal with the Oz CLI, clear the worker key and sign in as yourself. Keep the worker running in its original terminal:
unset WARP_API_KEYoz loginComplete sign-in using the URL the CLI prints. Route a team-owned run with --team and pass the worker ID with --host:
oz agent run-cloud --team \ --prompt "List the files in the current directory" \ --host "my-worker"If you belong to multiple teams, the CLI lists teams and stops. Replace --team with --team=TEAM_UID, using the worker’s team UID from that list, then rerun the command.
For unattended factory submissions, use a foreman agent key with factory endpoints. As a best practice, keep it separate from the worker’s credential.
Expected outcome: The Automation Platform accepts the task, routes it to your worker, and the worker spawns a Docker container to execute the agent. You’ll see the run appear in the cloud agent dashboard with status moving from QUEUED → INPROGRESS → SUCCEEDED.
4. Verify the run
Section titled “4. Verify the run”Open the cloud agent dashboard, find the new task, and confirm the session transcript shows the agent running against your worker. You can attach to the session at any time via Agent Session Sharing to monitor or steer it.
Troubleshooting
Section titled “Troubleshooting”Worker won’t start
Verify Docker is running (docker info) and that the daemon platform is linux/amd64 or linux/arm64. Musl-based (Alpine) worker hosts are not supported.
Worker won’t connect
Verify the worker key has not expired and belongs to the correct team. Ensure the machine meets the network requirements. Increase log verbosity with --log-level debug to see connection details.
Task stays queued and never runs
Confirm the --host value you passed to oz agent run-cloud matches your --worker-id exactly (case-sensitive). Check that the worker’s team matches the team creating the task.
For more, see Troubleshooting.
Next steps
Section titled “Next steps”- Self-hosting overview - Review worker requirements and choose a backend
- Managed: Docker backend - Full Docker backend setup, including private registries, volume mounts, and runtime configuration
- Routing runs to self-hosted workers - How to route tasks from schedules, integrations (Slack, Linear), the API, and the Oz web app