Deploy Thunderbolt

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

Deploy Thunderbolt

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

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.


Template Content

More templates in this category

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

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1