Deploy Bichon Email Archiver
Archive and full-text search your IMAP email (Gmail, Outlook) in a web UI
bichon
Just deployed
Deploy and Host Bichon on Railway
Bichon is a lightweight email archiver written in Rust. It downloads your IMAP mailboxes (Gmail, Outlook, Fastmail, any IMAP server) into a private archive with full-text search, attachment browsing, contacts and dashboards in a web UI. It only reads and stores mail. It never sends, forwards or replies.
About Hosting Bichon
Bichon is a single Rust server with an embedded search index and a compressed blob store, so it needs no database: one container and one volume. This template runs upstream's unmodified rustmailer/bichon:2.2.0 image with your archive on a Railway volume.
Upstream seeds an admin login of admin / admin@bichon on first start. On a public URL that default is open to anyone until you change it. This template sets a generated password before the app ever accepts a connection from the internet, so your instance is never reachable with the default login.
Common Use Cases
- Keep a searchable backup of Gmail, Outlook or a work mailbox before it hits a quota or a retention policy
- Archive several accounts in one place, including old ones you no longer log into
- Import historical mail from MBOX (Gmail Takeout), EML folders, Thunderbird profiles or Outlook PST files
- Give teammates read-only access to selected shared mailboxes with Bichon's roles and per-account permissions
Dependencies for Bichon Hosting
- A Railway volume for the search index, mail blobs and metadata
Deployment Dependencies
- Bichon source and docs: https://github.com/rustmailer/bichon
- An IMAP account with a password, an app password, or an OAuth2 app (Gmail and Outlook)
Implementation Details
Logging in. The deploy form asks for nothing. When the deploy is up, open the bichon service's Variables tab, copy BICHON_ADMIN_PASSWORD, and log in at your public URL as admin with that password. The default admin@bichon password never works on this template.
Changing the password. Edit BICHON_ADMIN_PASSWORD and redeploy; the new value replaces the old one. Use 8 to 256 characters without quotes or backslashes. You can also change it in the app under Settings, Profile. If you do, the variable is no longer applied (the logs say admin password was changed in the app), so use the app from then on.
Adding mailboxes. Under Accounts, add an IMAP account. For Gmail and other providers with two-factor login, use an app password. OAuth2 for Gmail or Outlook needs your own OAuth app, configured under Settings, with the redirect URI https://your.domain/oauth2/callback. Downloads start right away and continue on a schedule; a large mailbox can take hours on the first pass.
Variables
| Variable | What it does |
|---|---|
BICHON_ADMIN_PASSWORD | Admin password, generated per deploy. Edit and redeploy to change it |
BICHON_ENCRYPT_PASSWORD | Encrypts stored IMAP passwords and OAuth tokens. Never change it, or saved accounts become unreadable |
BICHON_PUBLIC_URL | Public origin, used for OAuth2 redirects. Change to https://your.domain after adding a custom domain |
BICHON_LOG_LEVEL | trace, debug, info, warn or error |
Any other setting from the upstream configuration table, such as BICHON_SYNC_CONCURRENCY or BICHON_CORS_ORIGINS, can be added as a variable on the bichon service.
Command-line import and export. bichon-cli (MBOX, PST, Thunderbird import and MBOX export) talks to the server's API, so run it from your own machine against your Railway URL with an API token created in the web UI.
Troubleshooting
- Logs say
Bichon refused BICHON_ADMIN_PASSWORD: the value broke Bichon's rules (8 to 256 characters). Set a new value and redeploy; the previous password keeps working until then. - Locked out after changing the password in the app: run
bichon-adminin the service shell (railway ssh) and pick Reset Admin Password. The root directory is/data/bichonand the encryption key isBICHON_ENCRYPT_PASSWORD. - OAuth2 redirect goes to the wrong host: set
BICHON_PUBLIC_URLto your current domain and redeploy.
Scaling and storage. Search speed and download throughput scale with CPU and memory; upstream recommends 2 GB of RAM for 10 or more accounts. The archive grows with your mail, so watch the volume size and grow it in the service settings. Keep one replica, because the volume belongs to one container.
Why Deploy Bichon on Railway?
An email archive is only useful if it is always running and reachable from anywhere. Railway keeps Bichon online with HTTPS and a persistent volume, with nothing to operate, and your mail stays in storage you control instead of a third-party archiving service.
Template Content
bichon
rustmailer/bichon:2.2.0