---
title: "Deploy Thunderbolt"
description: "Mozilla Thunderbird's self-hosted AI client with sign-in and device sync"
category: "AI/ML"
url: https://railway.com/deploy/thunderbolt
---

# Deploy Thunderbolt

Mozilla Thunderbird's self-hosted AI client with sign-in and device sync

**[Deploy Thunderbolt on Railway](https://railway.com/template/thunderbolt)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/thunderbolt/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** AI/ML
- **Total deploys:** 2

## Template content

### PowerSync https://raw.githubusercontent.com/thunderbird/thunderbolt/v0.1.168/src-tauri/icons/icon.png

- **Source:** https://github.com/aalfath/thunderbolt-railway-template
- **Health check:** /probes/liveness
- **Public domain:** Yes

### Thunderbolt https://raw.githubusercontent.com/thunderbird/thunderbolt/v0.1.168/src-tauri/icons/icon.png

- **Source:** https://github.com/aalfath/thunderbolt-railway-template
- **Health check:** /
- **Public domain:** Yes

### Backend https://raw.githubusercontent.com/thunderbird/thunderbolt/v0.1.168/src-tauri/icons/icon.png

- **Source:** https://github.com/aalfath/thunderbolt-railway-template
- **Health check:** /v1/health

### Keycloak https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/keycloak.png

- **Source:** https://github.com/aalfath/thunderbolt-railway-template
- **Health check:** /health/ready
- **Public domain:** Yes

### Postgres https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/postgresql.png

- **Source:** https://github.com/aalfath/thunderbolt-railway-template

## Documentation

# Deploy and Host Thunderbolt on Railway

Thunderbolt is Mozilla Thunderbird's open-source AI client (MPL-2.0). It gives your team a private chat app for the AI models you choose (frontier providers such as Anthropic, or any OpenAI-compatible endpoint, including local models), with chats stored on each device and optionally synced across devices through your own server, so your conversations stay on infrastructure you control.

## About Hosting Thunderbolt

Thunderbolt's self-hosted stack has five parts, and this template deploys all of them from upstream's v0.1.168 images, wired together over Railway's private network. The web app (nginx) serves the interface and proxies the API. The Bun backend handles accounts, settings and model calls, and runs its database migrations on start. Keycloak handles sign-in over OIDC. PowerSync streams synced chats to the browser. PostgreSQL 18, with logical replication on, stores app data, Keycloak's data and PowerSync's bucket storage on one volume. Secrets, database passwords and every URL are generated at deploy time. You only enter the first user's email.

## Common Use Cases

* A private, self-hosted ChatGPT-style app for a team, with sign-in and your own model keys
* Keeping AI chats in sync across a user's browsers and devices through a server you own
* Trying Mozilla's open-source AI client before rolling it out on your own infrastructure

## Dependencies for Thunderbolt Hosting

* PostgreSQL 18 with `wal_level=logical` (included, on a volume)
* Keycloak for sign-in and PowerSync for sync (both included)

### Deployment Dependencies

* Thunderbolt source and docs: https://github.com/thunderbird/thunderbolt
* Template source (Dockerfiles and changelog): https://github.com/aalfath/thunderbolt-railway-template
* A model provider API key (for example Anthropic), added after deploy

### Implementation Details

Services in this template:

* **Thunderbolt** (public): the web app on nginx; `/v1/` is proxied to Backend.
* **Backend** (private): the Bun API with health check `/v1/health`; migrations run on start.
* **Keycloak** (public): sign-in pages in production mode, realm `thunderbolt`, data in Postgres. Self-registration is off.
* **PowerSync** (public): the sync service the browser connects to; its JWT key is derived from Backend's generated secret.
* **Postgres** (private, volume): databases `thunderbolt`, `keycloak` and `powersync_storage`.

After deploy:

1. Open the Thunderbolt service's URL and sign in with `THUNDERBOLT_ADMIN_EMAIL` and the generated `THUNDERBOLT_ADMIN_PASSWORD`, both on the Keycloak service's Variables tab.
2. Add a model in **Settings → Models** with your provider key, or set `ANTHROPIC_API_KEY` on the Backend service to give every user a model.
3. Add more users in the Keycloak admin console at `https://YOUR-KEYCLOAK-DOMAIN/admin/` (user `admin`, password `KC_BOOTSTRAP_ADMIN_PASSWORD` on the Keycloak service), realm `thunderbolt`.

Email sign-in codes and other optional features are off by default; see upstream's configuration docs. The services build from the template's GitHub repo. When we bump the Thunderbolt version there, Railway shows an update notice on your project, and you choose when to apply it. Read the repo's `CHANGELOG.md` and back up Postgres first, because migrations can't be undone by going back to an older image.

## Why Deploy Thunderbolt 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 Thunderbolt 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.



## 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/thunderbolt
