Railway

Deploy PrivateBin | Self-Hosted Encrypted Pastebin, Zero Knowledge

Self-host PrivateBin on Railway — encrypted pastes with burn-after-reading.

Deploy PrivateBin | Self-Hosted Encrypted Pastebin, Zero Knowledge

privatebin/nginx-fpm-alpine:2.0.5

privatebin/nginx-fpm-alpine:2.0.5

Just deployed

/srv/data

Deploy and Host PrivateBin on Railway

PrivateBin is a minimalist, open-source online pastebin where the server has zero knowledge of the data being posted. Text is encrypted and decrypted in your browser with 256-bit AES-GCM, and the decryption key never leaves the URL fragment — so the server only ever stores ciphertext it cannot read.

About Hosting PrivateBin

Hosting PrivateBin yourself means the things your team pastes — a credential handed to a contractor, a stack trace containing customer data, a config snippet — never touch someone else's service. This template runs the official privatebin/nginx-fpm-alpine image (nginx and PHP-FPM in a single container) with a persistent Railway volume mounted at /srv/data, so pastes survive restarts and redeploys. No database, no object storage, no external dependencies to wire up.

Common Use Cases

  • Handing secrets, tokens or credentials to a teammate or client with an expiry attached
  • Sharing logs and stack traces that contain customer data without posting them to a public pastebin
  • Burn-after-reading notes for one-time handoffs

Dependencies for PrivateBin Hosting

  • The official PrivateBin Docker image (privatebin/nginx-fpm-alpine), which bundles nginx, PHP-FPM and PrivateBin

Deployment Dependencies

Implementation Details

Pastes are stored on a Railway volume at /srv/data using PrivateBin's filesystem backend. The upstream image runs as UID 65534, which cannot write to a freshly mounted Railway volume — the usual cause of "Error saving document" on a self-hosted PrivateBin. This template sets RAILWAY_RUN_UID=0 and starts PHP-FPM with root permitted, so the volume is writable and the deployment works on the first try.

Encryption and decryption happen entirely in the browser. The key lives after the # in the paste URL and is never transmitted, which is what makes the zero-knowledge claim real rather than a promise.

Why Deploy PrivateBin 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 PrivateBin 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

privatebin/nginx-fpm-alpine:2.0.5

privatebin/nginx-fpm-alpine:2.0.5

More templates in this category

View Template
Garage S3 Storage
Ultra-light S3 server: fast, open-source, plug-and-play.

PROJETOS
7
View Template
NEW
Redis
Self Host Latest Redis with Railway

Arloodots
0
View Template
Postgres Backup to Cloudflare R2 (S3-Compatible)
Automated PostgreSQL backups to S3-compatible storage with encryption

Artour
7