Deploy plMail

Self-hosted Gmail-style webmail for all your IMAP accounts

Deploy plMail

Just deployed

/app/var/data

Just deployed

/var/lib/postgresql

Deploy and Host self hosted plMail (Self-Hosted Webmail) on Railway

This independent Railway template deploys plMail, an open-source webmail client, with PostgreSQL 18 and one all-in-one app service. It is not an official or endorsed listing, and we have no affiliation with the plMail authors.

About Hosting plMail open-source software on Railway (self hosted plMail template)

plMail is an open-source, AGPL-3.0 webmail client that you run yourself.

Why Deploy plMail, the open-source webmail client on Railway (Railway Free Trial)

Running plMail on Railway gives you one private inbox over your IMAP, Gmail and Outlook accounts without running a server, and you can start on the free trial credit.

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 plMail 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.

Railway vs Other Hosting Providers and VPS for plMail self hosting

Compare the trade-offs below.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanplMail and PostgreSQL 18 deploy with a volume each and generated secrets, with no server setup.A Linux droplet, but you install Docker and manage the firewall and certificates yourself.
AWSOne template handles networking, the public domain and the health check.Deep control, but wiring compute, storage and networking takes much more configuration.
HetznerUsage-based hosting, with the database and volume created for you.Low-cost VPS hardware, but you handle updates, backups and the reverse proxy.

Back up the database together with the volume's secrets file at /app/var/data/secrets/generated.env, because stored mailbox passwords depend on that key. We have not tested a backup or restore on Railway.

Common Use Cases for hosted plMail

  • Reading several mailboxes in one UI: Read IMAP, Gmail and Outlook accounts side by side with one search box.
  • Searching locally synced conversations: Mail syncs into PostgreSQL, so full text search and filters like from: and subject: stay fast even when a provider is slow.
  • Keeping calendars and contacts beside email: Two-way sync with Google, Microsoft and CalDAV lets you answer invitations in place.
  • Getting live mail updates: IMAP IDLE, Gmail and Outlook push and browser notifications show new messages without a refresh.
  • Using optional AI summaries and drafts: Off by default; point plMail at an Ollama or OpenAI-compatible endpoint, and mail only goes to the host you name.

Dependencies for plMail Docker hosted on Railway

This template runs plMail as one application service plus a PostgreSQL 18 database.

Deployment Dependencies for Managed plMail Service (plMail all-in-one app with workers, scheduler, listeners and Mercure, plus PostgreSQL 18; one volume each)

The app serves port 80 behind Railway's domain and checks /healthz.

VariableServicePurpose
ADMIN_PASSWORDplMailGenerated password for admin@plmail.local
APP_PUBLIC_URLplMailhttps:// plus your Railway public domain
DATABASE_URLplMailConnection to Postgres over the private network
POSTGRES_PASSWORDPostgresGenerated database password
PGDATAPostgresData directory under the mounted volume

The app volume holds /app/var/data/secrets/generated.env, which contains the credential encryption key. Losing APP_ENCRYPTION_KEY makes stored mailbox passwords unreadable.

Implementation Details for plMail (Using onepush-dev 0.4.1 based on pinned upstream image and generated-password first-admin bootstrap)

On first start the wrapper generates the secrets file, runs migrations, then creates the first admin once the health check passes.

How does plMail compare against other tools

plMail vs Roundcube (Roundcube Alternative)

  • Interface Style: plMail offers a Gmail-style inbox with threaded conversations and live updates, while Roundcube is a more traditional webmail interface.
  • Account Model: plMail syncs IMAP, Gmail and Outlook accounts into its own PostgreSQL database, so search runs locally.
  • Where Roundcube Wins: its long track record and wide plugin ecosystem make it the safer pick for conservative setups.

plMail vs SnappyMail (SnappyMail Alternative)

  • Feature Focus: plMail concentrates on multi-account aggregation and Gmail or Outlook OAuth, while SnappyMail stays close to classic IMAP webmail.
  • Resource Footprint: SnappyMail is small and quick on modest hardware, so it may suit a tiny VPS better than plMail's PostgreSQL-backed setup.
  • Where SnappyMail Wins: if you want the simplest webmail with minimal moving parts, SnappyMail is the lighter choice.

plMail vs Gmail web UI (Gmail Alternative)

  • Hosting and Ownership: Gmail is hosted email run by Google, while plMail is a client you host yourself that connects to your existing accounts.
  • Mail Hosting: plMail is not a mail server and does not host your domain, so you still need an existing mailbox provider.
  • Where Gmail Wins: Gmail needs no setup, no database and no maintenance, and its spam filtering is fully managed.

plMail with Docker Compose vs plMail on Railway (Railway Deployment Alternative)

  • Setup Effort: Compose means cloning the repository and running the stack yourself; the Railway template deploys app and PostgreSQL 18 with generated secrets in one step.
  • Secrets and Admin: on Railway the first admin is created at boot with a generated password read from the service Variables, whereas the upstream Compose flow uses the web installer.
  • Operations: Railway handles the domain and restarts; a Compose host means you manage TLS and updates.

How to use plMail on Railway?

Once the deploy finishes, work through these steps.

  1. Open the public domain Railway generated for the plMail service.
  2. Log in as admin@plmail.local, using the ADMIN_PASSWORD value shown under the plMail service's Variables tab. The admin account was created at boot, so the setup page is no longer open.
  3. Go to Settings and change the admin email and password straight away.
  4. Connect an existing IMAP account, with its IMAP and SMTP host, port and login details. plMail is not a mail server, so it needs accounts that already exist at another provider.
  5. For Gmail or Outlook, set up OAuth separately by adding the provider client ID and secret as Variables first, then connect the account from Settings.

Check the app with:

curl https://your-domain/healthz

A healthy instance returns a JSON status of ok, along with checks for the database, queue and workers.

How to self host plMail on other VPS Services (plMail self hosting guide)

Clone the Repository

Clone the upstream project and enter its folder.

git clone https://github.com/karatektus/pl_mail.git
cd pl_mail

Install Dependencies

You need Docker with the Compose plugin on the host.

  • Install Docker Engine and the Compose plugin.
  • Keep ports 80 and 443 free if you want the built-in HTTPS listener.

Configure Environment Variables

Upstream generates its own secrets on first start, so you can begin with little editing.

  • Keep any database password in a local env file, never in a public repo.
  • The first admin in this Railway package is created at boot with a generated password, which differs from upstream's web installer.

Start the plMail Application

Bring the stack up in the background, then open the upstream HTTPS installer in your browser and follow it to create your account.

docker compose up -d

On Railway, the platform handles the public domain, TLS, private networking and persistent volumes for you.

Official Pricing of plMail (plMail pricing)

plMail is open-source software licensed under AGPL-3.0, and it is free to self-host. Source: https://github.com/onepush-dev/plmail.

plMail hosted vs self hosted comparison (Pricing, features, costs, and more)

plMail is a free, AGPL-3.0 open-source webmail client that you run yourself.

Monthly cost of self hosting plMail on Railway

Railway bills by usage: RAM and CPU for plMail and PostgreSQL, plus the volume holding attachments and the secrets file.

System Requirements for Hosting plMail on a VPS

A VPS needs enough memory and CPU for the app with background workers and PostgreSQL 18, plus persistent disk for the database, attachments and secrets file.

Frequently Asked Questions (FAQs)

Does plMail receive mail sent to my domain over SMTP?

No. plMail connects to your existing IMAP, Gmail or Outlook mailboxes and does not accept incoming SMTP mail.

Where do I find the first admin password?

It is stored in the ADMIN_PASSWORD variable on the plMail service. Sign in as admin@plmail.local with it, then change the email and password in Settings.

Why is /install unavailable?

A background bootstrap creates the admin account shortly after the web service is healthy, after which the installer returns a 404. Sign in soon after deploy.

Why does Gmail need OAuth client configuration?

Gmail is documented here through OAuth client configuration you register yourself with Google. This is the documented route for this template, not a claim that Google supports no other sign-in methods.

What must my backups include?

Back up the PostgreSQL database and the secrets file at /app/var/data/secrets/generated.env together. Attachments live on the full app volume, so keep that volume in the backup too.

What changes if I add a custom domain?

Update APP_PUBLIC_URL to the new address so OAuth callbacks, push and live updates use the right host.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
50
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51