Deploy PrivateBin
Zero-knowledge encrypted pastebin, pinned 2.1.1, data on a volume
PrivateBin
Just deployed
/srv/data
Deploy and Host PrivateBin on Railway
PrivateBin is a minimalist, open-source pastebin where the server has zero knowledge of what is pasted. Your browser encrypts each paste with 256-bit AES-GCM before sending it, and the key stays in the part of the link after #, which is never sent to the server. Pastes can expire, burn after reading, or carry a password.
About Hosting PrivateBin
This template runs PrivateBin 2.1.1 from the official privatebin/nginx-fpm-alpine image, pinned by version and digest, and builds it from a public GitHub repository. One service gets a public HTTPS domain and a health check. A Railway volume at /srv/data holds the pastes, comments, the server salt behind delete links, and the rate-limiter state, so all of it survives restarts and redeploys. There is no admin account and nothing to answer at deploy: open the URL and paste. nginx takes the visitor's address from Railway's proxy, so the one-paste-per-10-seconds limit applies to each visitor separately. To update, apply the "update available" notice Railway shows when we bump the version.
Common Use Cases
- Handing over a password or API key in a burn-after-reading paste with its own password
- Sharing logs, stack traces and config snippets that expire on their own
- A private paste service for a team, instead of public paste sites
Dependencies for PrivateBin Hosting
- A Railway volume mounted at
/srv/data(included) - No database: PrivateBin stores pastes as files on the volume
Deployment Dependencies
- PrivateBin: https://github.com/PrivateBin/PrivateBin (release 2.1.1)
- Official image: https://hub.docker.com/r/privatebin/nginx-fpm-alpine
- Template repository: https://github.com/aalfath/privatebin-railway-template
- Configuration options: https://github.com/PrivateBin/PrivateBin/blob/master/cfg/conf.sample.php
Implementation Details
The only variable is PORT (8080). To change settings such as the site name, file uploads, default expiry or size limit, add a PRIVATEBIN_CONFIG variable to the service with the full text of PrivateBin's conf.php. It must contain the [main], [model] and [model_options] sections. Keep the file storage so pastes stay on the volume:
[main]
name = "Our PrivateBin"
fileupload = true
[model]
class = Filesystem
[model_options]
dir = PATH "data"
Anyone with the URL can create pastes. To restrict that, set creators in the [traffic] section to your own IP ranges. Updates: this template builds from its GitHub repository. When we bump the pinned version, Railway shows an "update available" notice on your project. Read the repository's CHANGELOG.md before you apply it.
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
aalfath/privatebin-railway-template