Self hosted AI agent platform setup: open source control plane first
A self hosted AI agent platform installs as a control plane: one Compose stack for the web app, the API, the gateway and the database. The sessions themselves run somewhere else. Kortix is the open-source CompanyOS, and a self-hosted Kortix puts that same platform on hardware you control. That is my pick, and I work on Kortix's marketing, so weigh that accordingly.
The bootstrap, as the self-hosting reference prints it
curl -fsSL https://raw.githubusercontent.com/kortix-ai/CompanyOS/dev/scripts/kortix-selfhost-up.sh \| bash -s -- --domain kortix.example.com --email ops@example.com --platinum-key <platinum_api_key>It installs Docker and the CLI, then starts the stack with a TLS certificate and your Platinum API key. Re-running it is safe.
What the installer puts on the server
Four files land in ~/.config/kortix/self-host/<instance>/ the first time the CLI runs: docker-compose.yml, .env, a Caddyfile and updater.sh. Starting the stack runs docker compose up against one Compose workspace, kortix-<instance>, and brings up the control plane, the layer holding workspaces, repos, secrets, connectors, policies and the audit record. A self-hosted instance is the full Kortix platform on a server you control: one Docker Compose stack that the kortix self-host CLI installs, configures and updates.
Ordinary web software sits inside it. frontend renders the app. kortix-api serves /v1 and relays /v1/llm traffic to llm-gateway. kortix-migrate applies the schema once, before the API is allowed to start. kortix-updater fetches new images daily and holds the Docker socket. Postgres, auth, storage and the rest of the data plane arrive as the supabase-* services, each image pinned by digest. Add TLS through caddy in domain mode, or cloudflared when the API is published over a tunnel. Nothing in the list wants a GPU, model weights or a separate queue worker.
Then the split that decides everything else. Sessions run on Platinum sandboxes, not on the server. The instance must be reachable from the internet so those sandboxes can call back. Each sandbox is created by kortix-api with PLATINUM_API_KEY, and reports home to the instance's public API URL, KORTIX_URL. So price the machine by the data it stores rather than the agents it might run at once, and the requirements page works that arithmetic. Install day is really three choices: a URL, a sandbox key, a model route.
The checklist before the first start
Work through these in order, because each failure hides behind the next step. The bootstrap can be re-run, which rescues a first attempt made before DNS had propagated.
Start with a Linux server that has a public IP and nothing already listening on 80 or 443. Docker Engine and the Compose plugin get installed by the bootstrap when absent, and Caddy answers the ACME HTTP-01 challenge on its first request over those two ports. A proxy you forgot about returns a certificate error that reads like a DNS problem.
Create A and AAAA records for both <domain> and api.<domain>, aimed at the machine, before starting. Certificates are requested on the first inbound request, so a record that appears later leaves the API absent at the hostname the sandboxes will dial.
Add the wildcard *.p.<domain> as well. Previews then get an origin of their own; without it they drop to a path proxy that breaks root-absolute links, and the preview-origins check in kortix self-host doctor fails. A second wildcard, *.<apps base domain>, exists only for hosting Apps.
Have a PLATINUM_API_KEY ready. Sessions will not start without one, yet init and start only warn and continue, so a stack can come up looking fine with nothing able to run. Judge the install after the key is in.
The model key is not part of this. Add it in the web app once you have signed in, since a self-hosted instance brings no managed lineup of its own. Until then the instance boots, accepts a team and answers with no model behind it.
First start, the admin account, and the check that fails
On a bare server the bootstrap runs init without prompting, and it sets no admin email. Run kortix self-host configure and then kortix self-host start to supply it. If your user was added to the docker group, open a fresh shell, or the CLI cannot reach the daemon.
Sign up at https://<domain> using an address listed in KORTIX_PLATFORM_ADMIN_EMAILS. Connect GitHub at /admin/git, create the team workspace, run its first session, add the model key. Finish it within the hour. Until you set EMAIL_URL or DISABLE_SIGNUP=true, anyone who reaches the instance can create a confirmed account for any address, the admin address included. Setting EMAIL_URL also switches auto-confirmation off and starts sending sign-in mail, and DISABLE_SIGNUP=true shuts registration once the team is in.
Doctor answers 0 when all checks pass and 1 when any fails. Four are worth meeting early. open-sign-up trips when a domain or tunnel install has registration open with email confirmation off. preview-origins trips in domain mode without the wildcard. email-url trips on a connection string that will not parse. compose-config trips on a rendered Compose file that is invalid, and names the value at fault.
The by-hand path, for a host that already has Docker:
curl -fsSL https://kortix.com/install | bashkortix self-host init --domain kortix.example.com --admin-email you@example.comkortix self-host startCan I run a self-hosted AI agent platform without a public domain?
A public name is what makes sessions possible. The mode you pick decides that, and the CLI offers three.
local means no flag at all. Ports bind 127.0.0.1, the frontend on 13737 and the API on 13738, and sessions never start because a sandbox has no route back to the API. Useful for inspecting a configuration, nothing more.
tunnel publishes only the API, over a Cloudflare tunnel, while the app stays at http://localhost:13737. This is the laptop evaluation path. A quick tunnel hands you an https://<random>.trycloudflare.com address that changes whenever cloudflared restarts, and every OAuth callback you registered breaks with it. Use a named tunnel when the address has to hold: aim its public hostname at http://kortix-api:8008 and set CLOUDFLARE_TUNNEL_HOSTNAME.
domain is the production shape, https://<domain> and https://api.<domain>, certificates through Caddy, two replicas each of kortix-api, llm-gateway and frontend. Since Caddy claims 80 and 443, one server carries one instance in this mode.
What stays yours to operate
Updates. A daily check at KORTIX_UPDATE_TIME (02:00) in KORTIX_UPDATE_TZ (America/New_York) pulls the chosen channel, runs the migration, then rolls the app services. New replicas must pass a health check before the old ones stop. A migration that fails leaves the previous version serving. kortix self-host status shows the last run, update forces one, rollback --release <version> steps back, and --tag pins a version so the daily run cannot move it.
Disk. An update stops itself under KORTIX_MIN_FREE_DISK_MB, 2048 by default, because a release downloads its new image set while the old one still runs.
Backups. The instance directory holds .env with the secrets and signing keys, volumes/db/data with Postgres, and volumes/storage with the files agents keep. Four Docker volumes sit beside it: db-config, kortix-capture-data, kortix-caddy-data and kortix-updater-state. Stop the stack for a consistent copy, archive both, start again. Restoring means putting them back and starting.
Secrets. Files are written at mode 0600, and API_KEY_SECRET encrypts stored secrets, connector credentials and tokens. Lose that one value and every one of them becomes unreadable; a replacement does not bring them back.
Review. Session work reaches main through a change request. Merge is default-deny for agents. Every action is recorded, and the record lives in the Postgres database already in your backup. Enterprise features are optional at install, and turning them on unlocks SSO, SCIM, role-based access control and audit. The permissions page follows a single grant from principal to call.
What a self-hosted instance does not give you
Sandbox callbacks, image pulls from Docker Hub and the model providers a workspace connects are the three things that leave. That is the part of self-hosting a review tends to find late.
Compute stays rented. A sandbox lives off the box, calls KORTIX_URL, and bills to the Platinum account whose key you supplied. Where a review demands that no work leaves the network, this topology cannot satisfy it, and putting the control plane inside changes nothing about the sandbox. The self-hosting decision page weighs that against the managed cloud.
Models stay yours too. Any model provider with your own keys. Or the ChatGPT plan you already pay for. Neither ships with the stack, and the agent computer cost page prices the hours sessions spend. The pricing page covers the managed plans, if renting all of it turns out to be the simpler answer.
For the team that has to keep the record at home, Kortix is the install to start with. The whole control plane is one stack to bring up, and the backup is the instance directory plus its four Docker volumes. The sessions stay on hardware you rent by the second.
What each one puts on your hardware
Four self-hosted options, checked October 2026.
Sources:KortixOpenHandsOpenClawOpen WebUI
Open source
What you run on the box
Where a session's work runs
What a team of 10 gets
What operators ask before the first start
The short answers, with the Kortix docs behind each one.
What do I need before installing a self-hosted AI agent platform?
A Linux server with a public IP, A and AAAA records for the domain and its api subdomain, ports 80 and 443 open, and a PLATINUM_API_KEY. The bootstrap installs Docker and the CLI. A model key comes later, in the web app.
Does self-hosting an AI agent platform mean the agents run on my server?
No. The control plane runs on your server and each session's work runs on a Platinum sandbox, created with your key and calling back to the instance's public URL. The box holds the configuration, the repositories and the record of what ran.
Which DNS records does a self-hosted Kortix instance need?
A or AAAA records for <domain> and api.<domain>, both pointed at the server before the first start, because Caddy gets the certificate on the first request. Add the wildcard *.p.<domain> for previews, and *.apps.<domain> for Apps.
What is PLATINUM_API_KEY and why is it required?
It is the key kortix-api uses to create each session's sandbox on Platinum. Without it, sessions do not start, and init and start only warn and carry on, so an instance can look healthy with nothing able to run.
What does a self-hosted Kortix instance cost to run?
The software costs nothing, because self-host is free and image pulls need no credentials. You pay for the server, for the Platinum sandbox hours each session uses, billed per second while it runs, and for model tokens on your own keys.
How do I update a self-hosted instance?
It updates itself. kortix-updater checks once a day at KORTIX_UPDATE_TIME, 02:00 by default, migrates, then rolls the services. kortix self-host update runs one now, --tag pins a version and rollback returns to one.
Does a self-hosted instance run without internet access?
No. Three things leave it: sandbox callbacks, image pulls from Docker Hub, and the model providers a workspace connects. Sessions run on Platinum, off the box, so a review that forbids work outside your network needs a different answer.
What breaks first when the server is too small?
Disk. The updater stops below KORTIX_MIN_FREE_DISK_MB, 2048 by default, and every release pulls a new image set before the old one stops. Memory follows: Postgres is fixed at 1280m, and kortix-api and llm-gateway default to 2048m each.
Point DNS, set two keys, run one command
The control plane on your server, the sessions on the sandbox provider you key, and a change request before anything reaches main.