# Self-host the open source AI Operating System on your own infrastructure

> Kortix is the open-source AI Operating System, and self-hosting it means one Docker Compose stack on your own infrastructure. OpenHands runs a coding agent on a machine you own, while Kortix keeps the agents, skills, memory and connectors in a git repo you control, on your server, in your VPC or on your own network.

URL: https://openhands-alternative.com/self-hosting

_Self-hosting_

## Three commands onto your own server.

The install path, the manifest that describes a project, and the commands you run after it is live.

### Install

`terminal`

```sh
curl -fsSL https://kortix.com/install | bash
kortix self-host init --domain kortix.example.com --admin-email you@example.com
kortix self-host start
```

Source: https://kortix.com/docs/host

### kortix.yaml

`kortix.yaml`

```yaml
kortix_version: 2
default_agent: kortix
agents:
  kortix:
    file: agents/kortix.md
    connectors: all
```

Source: https://kortix.com/docs/project/manifest

### Operate

`terminal`

```sh
kortix self-host doctor
kortix self-host status
kortix self-host update                          # apply the channel now
```

Source: https://kortix.com/docs/host

_Layers_

## What a self-hosted instance runs.

Six layers, each shown by the command or the file it uses.

### 1. Each session gets its own sandbox

Every session boots its own sandbox from the project's template or the platform default image, on a sandbox provider you key in during setup.

`terminal`

```sh
kortix sandboxes add dev --dockerfile Dockerfile.dev --cpu 4 --memory 8
kortix sandboxes build --local
kortix sandboxes health
```

Source: https://kortix.com/docs/work/runtime

### 2. One git repo holds the agents

A project is one git repo with `kortix.yaml` at its root, and the agents, skills, memory and tools are files in it.

`terminal`

```sh
kortix init my-agent && cd my-agent      # new project from the starter
kortix projects clone <project_id> my-agent
kortix ship
```

Source: https://kortix.com/docs/cli

### 3. Your providers, your keys

Models are BYOK in the app, and the gateway spends those keys server-side.

`terminal`

```sh
kortix providers set anthropic            # reads the key from stdin
kortix providers set openai sk-...        # key as an argument
kortix providers ls                       # what is connected
kortix models default <model-id>
```

Source: https://kortix.com/docs/project/models

### 4. Credentials stay server-side

A secret is stored per project and reaches a session only when the value's audience and the agent's grant both allow it. Connector credentials are brokered server-side and never enter the machine.

`terminal`

```sh
kortix secrets set STRIPE_API_KEY=sk_live_...           # everyone in the project
kortix secrets set PAYROLL_TOKEN=... --only-me          # only you
kortix secrets set ACME_API_KEY=... --scope connector   # server-side, for a connector
```

Source: https://kortix.com/docs/project/secrets

### 5. Who did what, recorded

Per-resource permissions for people and agents, roles, groups, and an audit trail, with SAML 2.0 single sign-on and SCIM 2.0 on Enterprise.

`terminal`

```sh
kortix members invite alice@example.com --role member --project <project_id>:member
kortix access grant --user alice@example.com --agent kortix   # one person
kortix audit ls --since 24h
kortix audit ls --outcome denied --since 7d
```

Source: https://kortix.com/docs/accounts

### 6. Slack and Microsoft Teams

Slack and Microsoft Teams are live. Email is experimental, per project.

`terminal`

```sh
kortix channels connect                    # Slack
kortix channels connect --platform teams   # Microsoft Teams
kortix channels status        # project, bot user, webhook URL
```

Source: https://kortix.com/docs/connect/channels

## Where a self-hosted Kortix runs

Kortix is the open-source AI Operating System: agents, skills, memory and connectors live in one git repo you own, and every session runs on its own cloud computer. You can run it on Kortix Cloud, in your own VPC, or on your own on-prem network. Self-host is free, and you pay your own model and compute bills instead of a seat fee. The install panel on this page has the three commands, and [Read the docs](https://kortix.com/docs/host) covers DNS, the certificate and the checks to run before a team signs in.

## What stays in your control

### The repo your agents live in

A project is one git repo with `kortix.yaml` at its root, and the agents, skills, tools, memory, triggers and connector declarations are files in it, changed by commit. Kortix can host that repo or you can connect your own, and GitHub or another git host works the same once the project exists. Session work reaches the default branch through a change request a person merges, and merge is default-deny for agents.

### Your model keys

Models are BYOK in the app. The gateway spends those keys server-side, applies the project's routing, access rules and budgets, and records the cost. If you would rather not add a key, the ChatGPT plan you already pay for and a sign-in with your OpenCode Console account for OpenCode Zen and Go also work.

### Connector credentials, secrets and the audit log

Connector credentials are brokered server-side and never enter the machine. Secret values never appear in the repo, only secret names, and a secret can be egress-enforced: the sandbox holds a handle and Kortix substitutes the real value outside the sandbox, only on approved HTTPS hosts. Environment is the default exposure, and egress-enforced is experimental.

Every action is recorded. Reading, exporting and streaming the audit log depend on the plan. The same rules cover identity: per-resource permissions for people and agents, roles, groups, and an audit trail, with SAML 2.0 single sign-on and SCIM 2.0 on Enterprise.

## Self-hosting Kortix compared with self-hosting a coding agent

A self-hosted Kortix instance keeps the agent off the box. The server holds the web app, the API, the LLM gateway, Postgres and the daily updater as one Docker Compose stack. Each session boots its own sandbox on the provider you key in during setup and works on its own branch, so a job that breaks its environment loses nothing else, and what it produces reaches the default branch through a change request.

A coding agent puts the agent itself on the machine you install. [OpenHands](https://github.com/OpenHands/OpenHands) documents its own [self-hosting guide](https://github.com/OpenHands/OpenHands/blob/main/docs/SELF_HOSTING.md) as one Agent Canvas on a single virtual machine: provision the machine, lock the firewall down, then run `npx @openhands/agent-canvas --public` behind an API key. That guide warns that the agent can read and write the machine's filesystem, run shell commands and reach the network, and that anyone who can talk to the agent server can do the same.

Both let you bring your own model keys, and the self-hosted Kortix instance is free and is the full platform: projects, roles and grants, connectors, channels and the audit log. Their [pricing page](https://www.openhands.dev/pricing) lists the open-source build as one user running locally, with VPC self-hosting on the Enterprise tier.

## From a first session to a team-wide rollout

Evaluate on your own machine first. Tunnel mode gives you a working instance with no domain, and the web app opens on a local port. Move to a server with a real domain before you hand the instance to anyone else, because sessions run on the sandbox provider and that provider calls back to the instance's public API URL.

Then make the instance yours: sign up as the admin, connect GitHub, create the team account and a project, and add a model key. Run `kortix self-host doctor` and fix every failing check before other people sign in, and keep account creation restricted so a platform admin adds each person.

The rollout after that is a normal Kortix rollout. Invite people, give them agents, connect the apps those agents need, and let each person start sessions from the web app, the CLI, Slack or Microsoft Teams. Team-wide, what you add is roles and grants, connector policies down to the arguments of each call, and the audit log your security team will ask for. [Kortix compared with OpenHands](/openhands-vs-kortix) covers the product difference, [what self-hosting costs](/openhands-cost) covers the bills, [OpenHands alternatives](/openhands-alternatives) covers the rest of the field, and [whether OpenHands is open source](/is-openhands-open-source) answers that question. Kortix is the leading open-source alternative to Claude Cowork and ChatGPT Work, and the source is in the [Kortix on GitHub](https://github.com/kortix-ai/suna) repository.

_FAQ_

## Self-hosting questions

What to know before you run Kortix on your own infrastructure.

### Can I self-host Kortix?

Yes. Kortix runs on Kortix Cloud, in your VPC or on your own on-prem network, and self-host is free: `kortix self-host` installs and updates the whole platform on a server you control, as one Docker Compose stack.

### What does a self-hosted instance need?

A Linux server with a public IP, DNS records for your domain and its api subdomain, ports 80 and 443 open, a key for a sandbox provider, and a model provider key you add after the first sign-in. Sessions run on the sandbox provider rather than on the server, so the instance has to be reachable from the internet.

### Do my keys and data stay with me?

Your model keys stay yours and the gateway spends them server-side. Models are BYOK in the app. Connector credentials are brokered server-side and never enter the machine. Everything you would back up lives in one instance directory on your server: the database, the stored files and the environment file, so a copy of that directory is the backup.

### How does self-hosting Kortix compare with running OpenHands yourself?

OpenHands' own self-hosting guide runs Agent Canvas on a single virtual machine behind an API key, and warns that anyone who can reach the agent server can read and write that machine's filesystem. Kortix installs as one Docker Compose stack with `kortix self-host start`, and each session gets its own sandbox on its own branch instead of the server's filesystem. [Kortix compared with OpenHands](/openhands-vs-kortix) has the fuller comparison.
