---
title: "Deploy Proton Mail Bridge"
description: "Proton Mail bridge (hydroxide) with IMAP, SMTP and CardDAV access"
category: "Other"
url: https://railway.com/deploy/proton-mail-bridge
---

# Deploy Proton Mail Bridge

Proton Mail bridge (hydroxide) with IMAP, SMTP and CardDAV access

**[Deploy Proton Mail Bridge on Railway](https://railway.com/template/proton-mail-bridge)**

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

- **Creator:** Ju Li's Projects
- **Category:** Other
- **Total deploys:** 2

## Template content

### railway-proton-mail-bridge

- **Source:** ju-li/railway-proton-mail-bridge
- **Public domain:** Yes

## Documentation

# 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 auth` once and create `auth.json`

### Implementation Details

Log in locally and encode the session:

```bash
git clone https://codeberg.org/emersion/hydroxide.git
cd hydroxide &amp;&amp; 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 of `auth.json`. Used only when `/data` has no session yet.
- `HYDROXIDE_AUTH_FORCE` (optional): set to `1` for 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.

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/proton-mail-bridge
