Deploy kwant
Self-hosted team of AI bots that hand off and verify work
Just deployed
Just deployed
/data
Just deployed
Deploy and Host self hosted kwant (AI Bot Team) on Railway
Deploy kwant on Railway in one click for a self-hosted team of AI bots that share chats, hand off work and verify results.
About Hosting kwant open-source software on Railway (self hosted kwant template)
kwant is open source under AGPL-3.0, so chats, bots and data live on your own volume in your Railway project.
Why Deploy kwant, the self-hosted AI bot team on Railway (Railway Free Trial)
On Railway, your bots, keys and data stay on infrastructure you control, with three private services and a generated sign-in token.
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 kwant 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.
Railway vs Other Hosting Providers and VPS for kwant self hosting
Running kwant means keeping three services up. Compared with common options:
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | One click deploys all three services with HTTPS, a generated sign-in token and a persistent /data volume. | A droplet you size yourself, plus Docker, a reverse proxy and your own upgrades and backups. |
| AWS | The same services start from one template with private networking and no VPC setup. | Full networking control, but you build the VPC, instances and TLS yourself. |
| Hetzner | Usage based hosting, with links between kwnt, Laya and the browser set by the template. | Low cost servers, but you run the Compose stack and updates. |
Choose Railway for the fastest setup, or a VPS for full host control.
Common Use Cases for hosted kwant
- Named bots handing work to each other: Create bots such as Architect, QA and DevOps, and @mention one to pass a task along. The hand-off stays in the same channel.
- Mission board tasks that need proof: Turn work into a Mission board card. It shows Verified only once kwant runs the check itself, and the receipt stays on the card.
- Scheduled work while you are away: Ask a bot for something "every morning" and kwant sets up a routine with an Undo button. Checks and reports run on Railway while your laptop is closed.
- Separate spaces for work and home: Keep each area in its own space with its own bots, channels, accounts and rules, so side-project bots never see work chats.
- Bots browsing with a private Chromium: When a bot needs a web page, it uses the headless Chromium service, kept private on Railway's network. You can watch it live in the app.
Dependencies for kwant Docker hosted on Railway
This template runs kwant as three linked Railway services. Laya and the browser have no public domain.
Deployment Dependencies for Managed kwant Service (three services: kwnt app with /data volume, private Laya model router, private headless Chromium browser)
- kwnt (
ghcr.io/onepush-dev/kwant:0.7.6): the public web UI and API on port 8080, with a /data volume. - laya (
ghcr.io/onepush-dev/kwant-laya:0.4.8): the private model router on port 8000. - browser (
ghcr.io/onepush-dev/kwant-browser:0.7.6): the private headless Chromium, with CDP on port 9222.
Implementation Details for kwant (ghcr.io/onepush-dev/kwant:0.7.6 wraps the unmodified upstream kwnt 0.7.6 binary; kwant-laya:0.4.8 and kwant-browser:0.7.6 are built from upstream docker/laya.Dockerfile and docker/browser.Dockerfile with dual-stack listeners; kwnt listens on PORT 8080 instead of upstream 8799)
The kwnt image adds a start script around the upstream binary.
The template sets four variables: KWNT_API_TOKEN (generated per deploy, used to sign in), KWNT_ALLOWED_ORIGINS (your Railway HTTPS address), LAYA_URL (the private Laya service) and KWNT_BROWSER_CDP_URL (the private browser).
How does kwant compare against other tools
kwant vs CrewAI
- Where kwant fits: kwant ships as a finished app with a web UI, named bots, chats and a Mission board, so you chat with a team without writing agent code.
- Verification: a task turns Verified only when kwant runs the check itself and keeps the receipt.
- Where CrewAI wins: if you want custom multi-agent pipelines in Python embedded in your own software, CrewAI is more flexible.
kwant vs OpenHands (OpenHands Alternative)
- Where kwant fits: kwant is a team of bots in shared chats that hand work to each other via @mentions, with routines and an Inbox.
- Isolation: on Railway, kwant's own execute_shell tool is unavailable because it needs a Docker socket, and the Claude, Codex or Grok CLIs are not included unless you add them, so bots rely on the private browser and any CLI you install yourself.
- Where OpenHands wins: if you mainly want a sandboxed coding agent for software tasks in containers, OpenHands fits that workflow.
kwant vs a single chat assistant (Chat Assistant Alternative)
- Specialists: each bot has its own role, model and rules for what it should and should not do, and bots can check each other's work.
- Your accounts: on this template you use Anthropic, OpenAI or xAI API keys unless you install and sign in a CLI yourself, on your own server.
- Where a single assistant wins: for quick one-off questions with no setup, a hosted chat assistant is simpler.
kwant with Docker Compose vs Railway (Docker Compose Alternative)
- Setup: the Railway template starts the kwnt app, Laya router and private browser from one deploy, with a generated sign-in token and HTTPS.
- Control: Docker Compose on your own VPS gives full control over the host, Docker socket and Caddy, at the cost of doing that setup yourself.
- Where Compose wins: if you need the kwant execute_shell tool or direct host access, a VPS running Compose is the better fit, since Railway does not expose a Docker socket.
How to use kwant on Railway?
- Open https://your-domain/ in your browser, using the domain Railway assigned to the kwnt service. A one-time sign-in link is also printed in the kwnt deploy logs at each start, so treat logs as sensitive. This is independent community packaging, not affiliated with or endorsed by the kwant project.
- On the sign-in screen, paste the KWNT_API_TOKEN value from the kwnt service's Variables tab. Your browser stays signed in for a year after that.
- Add an Anthropic, OpenAI or xAI API key under Settings, then This space, then Accounts. Bots will not answer until at least one account works.
- Add more devices under Settings, then Signed-in devices, or run kwnt signin-link over railway ssh on the kwnt service to get a one-time sign-in link.
- Check that the service is healthy by opening /api/health on your domain:
https://your-domain/api/health
A healthy instance answers with status ok and the kwant version, so you know the app is ready before configuring bots.
How to self host kwant on other VPS Services (kwant self hosting guide)
Clone the Repository
Clone the upstream repository on a Linux server, then move into it:
git clone https://github.com/alexsergivan/kwant.git
cd kwant
Install Dependencies
You need Docker with the Compose plugin and about 4 GB of free RAM, as upstream measures it.
Configure Environment Variables
Set the HTTPS address kwant answers at, and optionally name the AI CLIs to bake into the image:
echo KWNT_ALLOWED_ORIGINS=https://your-domain >> .env
KWNT_CLIS=claude,codex docker compose up -d --build
Leave KWNT_CLIS out for none. The UI listens on 127.0.0.1:8799, so put a Caddy reverse proxy in front of it for HTTPS on your-domain.
Start the kwant Application
Confirm the stack is up, then ask kwnt for a one-time sign-in link:
docker compose ps
docker compose exec kwnt kwnt signin-link
Open the printed link once to sign in.
Official Pricing of kwant (kwant pricing)
kwant is free and open source under the AGPL-3.0, so you can use, change and run it at any size.
kwant hosted vs self hosted comparison (Pricing, features, costs, and more)
kwant is free to self host under the AGPL-3.0. You pay only for the infrastructure you run it on and any AI accounts you add. Upstream offers a separate commercial license (COMMERCIAL.md) if you want to sell or host kwant without publishing your changes.
Monthly cost of self hosting kwant on Railway
Railway bills by usage, so monthly cost depends on RAM and CPU used by the three services, /data volume growth and services kept running.
System Requirements for Hosting kwant on a VPS
A VPS needs enough free RAM for kwnt, Laya and the browser together, plus disk for data and Docker images.
Frequently Asked Questions (FAQs)
How do I sign in to kwant on Railway?
Open your kwant domain and paste the KWNT_API_TOKEN value from the kwnt service's Variables tab. A one-time sign-in link is also printed in the deploy logs at each start, so treat logs as sensitive.
Do bots answer without an API key?
No. The app boots healthy and the health check passes, but bots need at least one working account before they can answer.
Are the Claude, Codex or Grok CLIs included in the template?
No, they are not baked into the image. If you sign a CLI in over railway ssh, that sign-in persists under /data/.home.
Why is execute_shell missing?
kwant's own execute_shell tool needs a Docker socket, which is not available on Railway or in upstream's Compose setup.
Can I remove Laya to save RAM?
Yes. Without Laya, kwant falls back to keyword routing. Laya idles around 1.7 to 2.3 GB RAM per upstream measurements.
What should I back up?
Back up the /data volume, which holds your chats, bots, vault and token.
Template Content

