Deploy Thunderbolt
Mozilla Thunderbird's self-hosted AI client with sign-in and device sync
PowerSync
Just deployed
Thunderbolt
Just deployed
Just deployed
Just deployed
Just deployed
/var/lib/postgresql/data
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,keycloakandpowersync_storage.
After deploy:
- Open the Thunderbolt service's URL and sign in with
THUNDERBOLT_ADMIN_EMAILand the generatedTHUNDERBOLT_ADMIN_PASSWORD, both on the Keycloak service's Variables tab. - Add a model in Settings → Models with your provider key, or set
ANTHROPIC_API_KEYon the Backend service to give every user a model. - Add more users in the Keycloak admin console at
https://YOUR-KEYCLOAK-DOMAIN/admin/(useradmin, passwordKC_BOOTSTRAP_ADMIN_PASSWORDon the Keycloak service), realmthunderbolt.
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.
Template Content
PowerSync
aalfath/thunderbolt-railway-templateThunderbolt
aalfath/thunderbolt-railway-templateTHUNDERBOLT_ADMIN_EMAIL
Email of the first Thunderbolt user; sign in with it after deploy.

