
Deploy Proton Mail Bridge
Proton Mail bridge (hydroxide) with IMAP, SMTP and CardDAV access
railway-proton-mail-bridge
Just deployed
/data
Deploy and Host Proton Mail Bridge on Railway
Proton Mail Bridge (hydroxide) is an open-source, headless bridge for Proton Mail. It translates standard IMAP, SMTP and CardDAV into Proton Mail API calls, so any regular mail client, script or backend service can read and send Proton mail and access your contacts without Proton's official desktop app.
About Hosting Proton Mail Bridge
This template builds hydroxide from the latest Codeberg source and runs hydroxide serve, which serves IMAP (1143), SMTP (1025) and CardDAV ($PORT, default 8080). Proton requires an interactive login and usually a CAPTCHA, so you log in once on your own machine with hydroxide auth, save the bridge password it prints, and paste the base64-encoded auth.json into HYDROXIDE_AUTH_JSON_B64. On first boot the session is written to a persistent volume at /data, where hydroxide keeps refreshed tokens across redeploys. Clients log in with your Proton address and the bridge password, ideally over Railway's private network.
Common Use Cases
- Sending transactional or notification email from your apps through your Proton Mail account over SMTP
- Reading and processing incoming Proton mail from scripts, automations or AI agents over IMAP
- Syncing Proton contacts to CardDAV-compatible clients and services
Dependencies for Proton Mail Bridge Hosting
- A Proton Mail account (2FA supported only with authenticator-app TOTP codes)
- A local machine with Go 1.26+ to run
hydroxide authonce and createauth.json
Implementation Details
Log in locally and encode the session:
git clone https://codeberg.org/emersion/hydroxide.git
cd hydroxide && go build ./cmd/hydroxide
./hydroxide auth
base64 -w0 ~/.config/hydroxide/auth.json # macOS: base64 -i ~/Library/Application\ Support/hydroxide/auth.json
Variables:
HYDROXIDE_AUTH_JSON_B64(required): base64 ofauth.json. Used only when/datahas no session yet.HYDROXIDE_AUTH_FORCE(optional): set to1for one deploy to replace the stored session, then remove it.
Run a single replica. Connect from other services at .railway.internal:1143 (IMAP) and :1025 (SMTP). Don't expose IMAP/SMTP publicly without TLS, because hydroxide accepts plaintext logins when no certificate is configured. hydroxide is a third-party project and is not affiliated with Proton AG.
Why Deploy
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 Proton Mail Bridge 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
railway-proton-mail-bridge
ju-li/railway-proton-mail-bridgeHYDROXIDE_AUTH_JSON_B64
Base64 of the auth.json created by running hydroxide auth locally. See README for steps. Save the bridge password it prints.
