Deploy Kortix + Supabase

AI agent platform with cloud sandboxes and a self-hosted Supabase

Deploy Kortix + Supabase

Deploy and Host Kortix on Railway

Kortix (formerly Suna) is an open-source platform for AI agents that do real work. Agents run in cloud sandboxes where they browse, write and run code, and edit files; you organise them into projects with skills, scheduled triggers and connectors, share them with your team, and bring your own model keys. This is a community-maintained template; it is not affiliated with Kortix.

About Hosting Kortix

Kortix is a Bun API, a Next.js web app and an LLM gateway on top of Supabase. Upstream self-hosts it with its own CLI on a VPS you manage, alongside the official Supabase distribution under Docker Compose. This template runs the same stack on Railway, in one project: a self-hosted Supabase (Postgres, Auth, PostgREST, Storage and the Kong gateway), the Kortix API, its LLM gateway and the web app, eight services in all, with no Supabase account and no server to maintain.

The first start does what upstream's CLI does for you. It waits for Supabase's services, applies Kortix's migrations with upstream's own runner, creates your owner account with platform-admin rights from the e-mail you enter, and only then starts the API.

It also closes two things a public deployment leaves open. A fresh Kortix install is claimed by whoever calls its setup endpoint first; here the owner exists before the API listens. And Kortix's signup switch is checked in the web app while Supabase Auth underneath accepts signups posted to it directly; here Kortix's own policy (closed by default, with invitations and an allowlist) is enforced in the database for every new user.

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.

Concretely, this template generates every secret Kortix and Supabase need, derives Supabase's API keys from one of them, gives the web app, the API and the Supabase gateway public HTTPS domains that know about each other, wires the rest over Railway's private network with dual-stack listeners, and attaches volumes to the database and file storage.

Common Use Cases

  • Run a private agent workspace for your team, on your own model keys and infrastructure.
  • Give agents a real computer: research, write and run code, and produce files in sandboxes.
  • Schedule recurring agent tasks with triggers, and connect them to the tools your team uses.
  • Keep conversations, projects and credentials in a database you control.

Dependencies for Kortix Hosting

  • A sandbox provider account for agent sessions: Daytona (default), E2B or Platinum. Set its API key on the api service.
  • A model provider key (Anthropic, OpenAI, OpenRouter and others), added in the app.
  • A GitHub App or personal access token, added in the app, for project repositories.
  • Optional: SMTP, for invitation and password-reset e-mails.

Deployment Dependencies

Implementation Details

The API and web app run Kortix's published images, pinned to a release, with thin start-up wrappers and no changes to Kortix's code. Three wrappers adapt Supabase to Railway: init scripts baked in where Supabase's compose file would mount them, API keys minted from the shared JWT secret with byte-identical output in Node and Perl, and the Vault key kept on the database volume. Every service refuses to start on missing, short or published example secrets, or on a reference to another service that has not resolved. The bundle is tested as a whole in CI, on fresh and reused volumes, before any image is pushed.

The deploy form asks for one value, OWNER_EMAIL. After deploying, copy OWNER_PASSWORD from the api service's variables, add your sandbox provider key there, and sign in on the web app's domain.

Kortix is under the Elastic License 2.0: run it for yourself and your organisation, but do not offer it to others as a hosted service.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
116
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
5
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
75