---
title: "Deploy PrivateBin"
description: "Zero-knowledge encrypted pastebin, pinned 2.1.1, data on a volume"
category: "Storage"
url: https://railway.com/deploy/privatebin-1
---

# Deploy PrivateBin

Zero-knowledge encrypted pastebin, pinned 2.1.1, data on a volume

**[Deploy PrivateBin on Railway](https://railway.com/template/privatebin-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/privatebin-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Storage

## Template content

### PrivateBin https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/privatebin.png

- **Source:** https://github.com/aalfath/privatebin-railway-template
- **Health check:** /
- **Public domain:** Yes

## Documentation

# 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:

```ini
[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.



## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Neo4j 2026.10 Community](https://railway.com/deploy/neo4j-202610-community) — Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

Open this page in a browser: https://railway.com/deploy/privatebin-1
