PrivateBin — a minimalist, open-source online pastebin where the server has zero knowledge of pasted data (everything is encrypted/decrypted in the browser). Deployed as a single host-networked Nomad service.
Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.
Source ↗ Project ↗ ★ 8.6k ⚑ Report an issue
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "privatebin"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The PrivateBin all-in-one (nginx + php-fpm) image. Pin a tag in production.
image = "privatebin/nginx-fpm-alpine:stable"
# Host port for the PrivateBin web UI.
port = 8080
# Named volume for file-based paste storage (/srv/data).
data_volume = "privatebin_data"
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources.
resources = {
cpu = 300
memory = 256
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "privatebin" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "privatebin/nginx-fpm-alpine:stable" | The PrivateBin all-in-one (nginx + php-fpm) image. Pin a tag in production. |
| port | number | 8080 | Host port for the PrivateBin web UI. |
| data_volume | string | "privatebin_data" | Named volume for file-based paste storage (/srv/data). |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 300
memory = 256
} | The task resources. |
No variables match.
This pack stores data in one Docker named volume:
privatebin_data
restic
# Run on the node hosting this pack. Point restic at your repo first: # export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>" # export RESTIC_PASSWORD="<repo-password>" # export AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY=<secret> restic backup \ /var/lib/docker/volumes/privatebin_data/_data
rclone (sync to S3/R2)
rclone sync /var/lib/docker/volumes/privatebin_data/_data backup:<bucket>/privatebin_data
Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.
PrivateBin is a minimalist, open-source online pastebin where the server has zero knowledge of the data being pasted. Content is encrypted and decrypted in the browser using 256-bit AES; the server only ever stores ciphertext. It supports password-protected pastes, configurable expiration, optional discussions, file/image attachments and burn-after-reading.
This pack runs the PrivateBin all-in-one image (Nginx + php-fpm) as a single host-networked Nomad service with file-based storage.
nomad-pack run privatebin --registry=nomploy
Open http://<node-ip>:8080 and start pasting.
| Variable | Default | Description |
|---|---|---|
image |
privatebin/nginx-fpm-alpine:stable |
All-in-one image (pin a tag in production). |
port |
8080 |
Host port for the web UI. |
data_volume |
privatebin_data |
Volume for paste storage (/srv/data). |
resources |
300 MHz / 256 MB | CPU and memory for the task. |
A prestart init task fixes ownership on the data volume. To customise settings,
mount a conf.php at /srv/cfg/conf.php (see the PrivateBin configuration
docs). Pastes persist in data_volume.