---
title: "Deploy Kortix | (Just Updated) Open-Source AI Agent Platform (Suna), Admin Login Ready, Sign-up Closed"
description: "Kortix (Suna) self-hosted AI agent platform, API and web UI"
category: "AI/ML"
url: https://railway.com/deploy/kortix-or-just-upd-1
---

# Deploy Kortix | (Just Updated) Open-Source AI Agent Platform (Suna), Admin Login Ready, Sign-up Closed

Kortix (Suna) self-hosted AI agent platform, API and web UI

**[Deploy Kortix | (Just Updated) Open-Source AI Agent Platform (Suna), Admin Login Ready, Sign-up Closed on Railway](https://railway.com/template/kortix-or-just-upd-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/kortix-or-just-upd-1/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** AI/ML

## Template content

### api

- **Image:** ghcr.io/bon5co/kortix-railway-api:0.16.4@sha256:41cb687ccabbce4d446fa9b4874b079c704236e4f2150a480c6524d49b3290ba
- **Health check:** /v1/health
- **Public domain:** Yes

### gateway

- **Image:** ghcr.io/bon5co/kortix-railway-gateway:0.16.4@sha256:4a76cd8b24b315530addc19f2ca0abf50572531be159cc3ac04c3fe3cf9ad2f7

### rest

- **Image:** ghcr.io/bon5co/kortix-railway-rest:0.16.4@sha256:3f012362769438ccbfe0a52d1868af3b2c6bc973b1a8b0ef83b049aa706a6d44

### db

- **Image:** ghcr.io/bon5co/kortix-railway-db:0.16.4@sha256:871893888aee652c37d78677396c655ed2c3027c91ed9e5b1216af59641f39b4

### auth

- **Image:** ghcr.io/bon5co/kortix-railway-auth:0.16.4@sha256:6d0545d539435f455ee35783f8db0ea34398314259ee97bc0423c70a5ee32714

### frontend

- **Image:** ghcr.io/bon5co/kortix-railway-frontend:0.16.4@sha256:0a4b3693537b945031fbdbf9bde82d41000f90eeae194dd2adbd1c90a4d1372f
- **Health check:** /api/health
- **Public domain:** Yes

### storage

- **Image:** ghcr.io/bon5co/kortix-railway-storage:0.16.4@sha256:4f67f09de0d83f863f1c536e743d65aad4a985e32aecca7de3aac647d87c5835

### kong

- **Image:** ghcr.io/bon5co/kortix-railway-kong:0.16.4@sha256:55a6eb118fc51b5ffb96108615d6ae108eae0e9eb002660de6f5092fb115a846
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host Kortix on Railway

**Built for an LLM agent to deploy and use.** The deploy form has no fields to fill: the admin password, the JWT secret, the database password and the encryption seed are generated, the admin account exists before the site is reachable, and public sign-up is closed. Kortix (formerly Suna) is an open-source platform for running AI agents, with a web UI, an API, per-user accounts and a Supabase-compatible auth and storage layer, a self-hosted alternative to hosted agent platforms.

## About Hosting Kortix

This template runs eight services, the same eight containers as upstream's self-host stack, each from a thin wrapper image over the pinned upstream image (Kortix 0.16.4): **frontend**, the web UI, public on port 8080 with a healthcheck at `/api/health`; **api**, the Kortix API, public on port 8080 with a healthcheck at `/v1/health`; **kong**, the Supabase-compatible gateway (`/auth/v1`, `/rest/v1`, `/storage/v1`), public on port 8080 with a healthcheck at `/healthz`; **db**, Supabase Postgres with a volume at `/var/lib/postgresql/data`; **auth**, GoTrue; **rest**, PostgREST; **storage**, Supabase Storage with a volume at `/var/lib/storage`; and **gateway**, the private LLM gateway.

**What the wrapper fixes.** Upstream's self-host stack is a compose file with eight containers and a one-time bootstrap script. The wrapper applies what Railway needs: private hosts under `*.railway.internal`, public services on the injected `PORT`, secrets from template variables so they survive redeploys, one admin login created at boot from `ADMIN_EMAIL` and `ADMIN_PASSWORD`, and sign-up closed at two layers (the auth server refuses every new user and the app runs in closed sign-up mode), so a stranger who finds the URL cannot register. Redeploys keep the admin, the accounts and the database.

**Using it.** Open the `frontend` domain and sign in with `ADMIN_EMAIL` and `ADMIN_PASSWORD` from the `api` service. An agent uses the API: log in against the `kong` domain to get a bearer token, then call the `api` domain with `Authorization: Bearer ACCESS_TOKEN`. The template sets no model-provider key and no managed git provider: add your own model keys in Kortix, and note that creating a workspace through the API answers `503 Managed git provider "github" is not configured` until one is configured.

**License.** Kortix is under the Elastic License 2.0: use it yourself, but do not offer it to third parties as a hosted or managed service, and do not circumvent its license-key functionality.

### Agent contract

- Public URL: `https://RAILWAY_PUBLIC_DOMAIN` (the generated domain of the `api` service); the auth gateway is `https://RAILWAY_SERVICE_KONG_URL` and the web UI is `https://RAILWAY_SERVICE_FRONTEND_URL`
- Private URL: `http://api.railway.internal:8080`
- Credentials: the variables `ADMIN_EMAIL` and `ADMIN_PASSWORD` on the `api` service (plain text), and `JWT_SECRET` on the `kong` service and `api` service (the signing secret of the auth gateway's anon key)
- Auth: sign in with `POST https://RAILWAY_SERVICE_KONG_URL/auth/v1/token?grant_type=password` (header `apikey: ANON_KEY`, JSON body `email` and `password`), then send `Authorization: Bearer ACCESS_TOKEN` to the API; writes answer 401 without it
- Health: `GET /v1/health` on the api domain returns 200 without credentials

```bash
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, RAILWAY_SERVICE_KONG_URL, ADMIN_EMAIL, ADMIN_PASSWORD, JWT_SECRET (variables of the api service); also curl, openssl.
R="https://$RAILWAY_PUBLIC_DOMAIN"; K="https://$RAILWAY_SERVICE_KONG_URL"; H="content-type: application/json"
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/v1/health")" = 200 ]; do n=$((n+1)); [ "$n" -le 120 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/v1/health"
# the anon key of the auth gateway is a fixed JWT payload signed with JWT_SECRET
b64() { openssl base64 -A | tr '+/' '-_' | tr -d '='; }
HP="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNjQxMDI0MDAwLCJleHAiOjIxMTQzODA4MDB9"
ANON="$HP.$(printf %s "$HP" | openssl dgst -sha256 -hmac "$JWT_SECRET" -binary | b64)"
# sign-up is closed: a stranger who posts to the sign-up endpoint is refused
curl -s -o /dev/null -w "public signup: %{http_code}\n" -H "apikey: $ANON" -H "$H" -d '{"email":"stranger@example.com","password":"Not-the-real-one-1"}' "$K/auth/v1/signup"
# the generated password is the admin account: log in, the answer carries a bearer token
TOKEN=$(curl -s -H "apikey: $ANON" -H "$H" -d "{\"email\":\"$ADMIN_EMAIL\",\"password\":\"$ADMIN_PASSWORD\"}" "$K/auth/v1/token?grant_type=password" | sed -n 's/.*"access_token":"\([^"]*\)".*/\1/p')
if [ -n "$TOKEN" ]; then echo "login: ok"; else echo "login: failed"; fi
BODY="{\"name\":\"Agent $$\"}"
# write-auth: POST /v1/accounts needs the bearer token; without it, or with a wrong one, the answer is 401
curl -s -o /dev/null -w "read with key: %{http_code}\n" -H "Authorization: Bearer $TOKEN" "$R/v1/accounts"
curl -s -o /dev/null -w "write with key: %{http_code}\n" -H "$H" -H "Authorization: Bearer $TOKEN" -d "$BODY" "$R/v1/accounts"
curl -s -o /dev/null -w "write without key: %{http_code}\n" -H "$H" -d "$BODY" "$R/v1/accounts"
curl -s -o /dev/null -w "write wrong key: %{http_code}\n" -H "$H" -H "Authorization: Bearer not-a-real-token" -d "$BODY" "$R/v1/accounts"
```

Expected output against a fresh deploy:

```text
health: 200
public signup: 403
login: ok
read with key: 200
write with key: 201
write without key: 401
write wrong key: 401
```

The refusals are the contract: a request without a token is refused (`write without key: 401`), a stranger cannot register (`public signup: 403`) and a wrong token is refused (`write wrong key: 401`).

## Why Deploy Kortix on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Kortix on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

- **Agent-ready** - no deployer fields, a contract block, and one script that proves the API is healthy, strangers cannot register, the generated password is the admin and the API refuses writes without a token.
- **Admin included** - the admin account has a generated password before the site is reachable, so nobody can claim your instance by registering first.
- **Eight services wired for you** - database, auth, REST, storage, gateway, API and web UI reference each other, no manual URLs.
- **Data survives redeploys** - the database and the storage service each have a volume, and the generated secrets stay the same.
- **Pinned** - Kortix and the Supabase components are pinned by tag and digest, and the wrapper images by tag and digest.

## Common Use Cases

- **Self-hosted AI agent platform** - run agents for yourself or your team on infrastructure you control.
- **Agent backend for an application** - call the Kortix API with a bearer token from your own code.
- **Private alternative to hosted agent products** - keep prompts, accounts and files in your own database.
- **Agent-managed workspace** - give an AI agent the admin login to create accounts and manage the instance through the API.

## Dependencies for Kortix Hosting

- Eight services (frontend, api, kong, db, auth, rest, storage, gateway), two of them with a volume, created by the template.

### Deployment Dependencies

- [Kortix repository](https://github.com/kortix-ai/suna)
- [Elastic License 2.0](https://www.elastic.co/licensing/elastic-license)
- [Wrapper image source](https://github.com/bon5co/kortix-railway)


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/kortix-or-just-upd-1
