# Self-host PrivateBin

> A minimalist, encrypted pastebin where the server has zero knowledge of what you paste.

- Page: https://levelrail.com/templates/privatebin/
- JSON: https://levelrail.com/templates/privatebin.json
- Category: Security
- Licence: Zlib (Permissive license)
- Source: https://github.com/PrivateBin/PrivateBin
- Upstream docs: https://github.com/PrivateBin/PrivateBin/blob/master/doc/README.md

## Requirements
- Memory: about 128 MiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: 1.7.4

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| privatebin | privatebin/nginx-fpm-alpine | 1.7.4 | 8080 | privatebin_data -> /srv/data |

## Deploy

### CLI

```bash
levelrail-cli templates deploy privatebin --name my-privatebin
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/privatebin/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy PrivateBin on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id privatebin for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image privatebin/nginx-fpm-alpine:1.7.4 is what you deploy there.

Self-host PrivateBin, PrivateBin docker compose file, deploy PrivateBin on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
