Self-host open-source Kortix and own the half that sets the rules
Self-hosting an agent moves the control plane and the configuration onto a server you run, and leaves the sandbox with someone else. Kortix is the open-source CompanyOS, and its self-host path comes with a documented install, a real bill, and a few sharp edges.
From a bare terminal to a session on its own branch, then the same platform on a server you keep
Six commands on your machine, four on the server, and the DNS records between them.
curl -fsSL https://kortix.com/install | bashkortix loginkortix init my-agentcd my-agentkortix shipkortix sessions new --prompt "Add a skill that drafts the weekly status report"curl -fsSL https://raw.githubusercontent.com/kortix-ai/CompanyOS/dev/scripts/kortix-selfhost-up.sh \| bash -s -- --domain kortix.example.com --email ops@example.comkortix self-host configurekortix self-host startkortix self-host doctorWhat lands on the box
Self-hosting Kortix puts the control plane and the configuration on a Linux server you pick. It does not put the session there. Each session runs on a Platinum sandbox, created by your instance and reachable over its public API (Read the docs). That split decides what a team owns and what it rents.
The control plane is the part a reviewer cares about. Each agent's definition, its skills, the shared memory, and the connector grants sit in a git repository. So does kortix.yaml, the manifest that declares the session image, connectors, triggers, and secret names. An agent's markdown file holds its prompt; the grants and the permission rule sit in its block in kortix.yaml. The control plane and the stack's configuration run on the server you pick, which is what keeps the review inside the company. The rule file lives in the project's git repository: in the repository the instance serves when Kortix manages it, or in the company's GitHub account when the project points there (Git).
The sandbox is where the work happens, and Platinum runs it. One isolated sandbox per session. Each session has its own isolated machine and branch. A fresh machine per session is a security property and a line on the compute bill. Only the branch the session pushes outlives the machine.
Four commands and a DNS record
The bootstrap installs Docker, the CLI, and the stack, then gets a TLS certificate. Point kortix.example.com, api.kortix.example.com, and a wildcard *.p.kortix.example.com at the server first, and open ports 80 and 443. Caddy needs those records to issue the certificate, so DNS comes before the first start. The wildcard earns its place at preview time: without *.p.<domain>, a preview drops to a path proxy where links written from the site root stop resolving, and kortix self-host doctor fails.
kortix self-host init writes docker-compose.yml, .env, a Caddyfile, and updater.sh into ~/.config/kortix/self-host/<instance>/. kortix self-host start runs one Compose project: the web app, kortix-api, llm-gateway, a migrate job, the updater, Supabase, and Caddy. The instance's URL has to answer from the public internet, because every sandbox reports back to KORTIX_URL while it runs. A laptop behind a private network will not do. On a machine that already runs Docker and the Compose plugin, install the CLI alone and run kortix self-host init by hand; the bootstrap is for a bare server.
A Platinum API key is the one piece you cannot skip. Without it the stack comes up and no session starts.
How the instance is reachable
Domain mode is the production shape. Caddy terminates TLS on 80 and 443, the app and API get public URLs, and the web app, API, and gateway each run two replicas behind it. Tunnel mode keeps the web app on localhost and publishes only the API through Cloudflare, which suits an evaluation on a laptop. Local mode binds every port to 127.0.0.1 and runs no sessions at all, because the sandbox cannot reach the API. When the stack is stopped, start moves a port that is in use to a free one.
Account creation is restricted by default in kortix self-host configure, where only a platform admin creates an account and anyone else gets 403 account_creation_restricted. A platform admin can still invite people, and each person keeps a personal account. Admin accounts come from kortix self-host admin add, and no address in KORTIX_PLATFORM_ADMIN_EMAILS can be claimed by signing up.
The key you add after sign-in
The first configuration asks for the admin email, the Platinum key, and the preview domain, and no model key. Sign up as the admin as soon as the stack starts, connect GitHub at /admin/git, then add a model provider key in the app. Model calls leave your instance's gateway for that provider, on the key you added.
Procurement tends to like this shape. One key to rotate, one provider contract, one place where model spend shows up. It also means the model bill arrives at your provider's list price instead of inside a platform fee.
A domain or tunnel instance without EMAIL_URL starts on KORTIX_SIGNUP_MODE=invite, so a sign-up needs an address with a pending invitation; a laptop instance, or one with EMAIL_URL, starts open and makes every new account confirm its address. Close it with kortix self-host env set KORTIX_SIGNUP_MODE=closed, which restarts the API without downtime, or set DISABLE_SIGNUP=true, which also refuses a new person's first SSO sign-in. Decide that before the URL goes anywhere.
What a night leaves behind
Triggers start a session with nobody at the keyboard, and the source decides when it fires. A schedule fires when a time arrives or a fixed period passes. An App event fires when one of your own Kortix Apps reports something, and a connector event when something happens in a connected app; connector events are experimental and stay off until a project admin enables them under Project admin → Feature flags → Composio event triggers. A webhook fires when another system sends a signed request to the trigger's address, and a change request merged trigger fires when a change request of the project merges, into one branch or any branch (Triggers). session_mode chooses whether the run gets a fresh session, reuses one, pins one, or keys one to an identifier, and fresh is the default. If a schedule looks like it is ignoring you, read that field before debugging anything else.
Each session works on a branch named for its ID, and commits there. A change request carries that branch toward the default branch, and the morning reading is its diff. An agent without the merge grant has the merge refused.
The grant list, one agent at a time
Connectors and secrets are granted per agent in kortix.yaml, and an omitted connectors or secrets key means none. The agent that drafts a weekly report and the agent that can push to a repository are two entries with two lists. The starter puts its grants on worker, its one project agent, so a new project works on day one. A session that names no agent runs My Kortix, which hands the work to worker.
Behavior lives beside the grant. agents/worker.md holds the prompt, kortix.yaml holds the rules the sandbox enforces, and the prompt says it plainly: "Only what you commit + push survives." A rule change is a commit beside the runtime, so the arrangement stays reviewable.
The bill, in four lines
Run it on Kortix Cloud, in your VPC, or on your own on-prem network. Self-host is free. Four things still cost money: the server, model calls at your provider's list price, the Platinum compute behind each session, and the hours somebody spends on upgrades.
Caddy renews certificates. A daily updater pulls images, migrates Postgres, and rolls the services. Backups of the accounts database are yours to schedule and to test. After an upgrade, kortix self-host doctor lists what is broken. Run it after the first start too.
When the managed cloud is the better buy
Hand the Linux box to Kortix Cloud when nobody wants to own DNS, certificates, upgrades, and backups. Two people shipping one weekly report do not need a server. A team that mostly wants an agent answering in Slack and Teams can compare the managed plan with Dots for teams.
Self-hosting earns its keep in narrower cases. The control plane has to sit in your VPC or on your on-prem network. Somebody already runs that network. A reviewer wants the image and the commit behind a piece of work.
OpenAI's Dots sits at the other end of the range. OpenAI runs the cloud computer of an always-on agent, the Custom Rules live in ChatGPT settings, and the company holds neither the rules nor the control plane (Introducing dots). Self-hosting Kortix hands over the rule file and the control plane, and leaves the sandbox on Platinum's cloud, which is my pick, and I work on Kortix's marketing, so weigh that accordingly.
Self-hosting questions, answered for the server you keep
The control plane runs on your server; each session runs on a Platinum sandbox.
Can I host my own AI agent?
Yes. The control plane and the configuration run on hardware you operate: kortix self-host installs and starts the stack. Sessions run on Platinum sandboxes that call back to it, so the box needs DNS, ports 80 and 443, and a Platinum API key.
Can I build my own AI agent for free?
Yes. Hosting the software costs nothing, and you pay for the server, model calls at your provider's price, the Platinum compute behind each session, and the time an upgrade takes.
Run the control plane on your own box
Install it on a box you control, or begin on Kortix Cloud and move the stack later.