PrivateBin is a minimalist, open source online pastebin where the server (can) has zero knowledge of pasted data. We all need to paste data / log files somewhere when it doesn't make sense to paste it inline. With PasteBin, you can own the hosting, access, and eventual deletion of this data.
- Docker swarm cluster with persistent shared storage
- Traefik configured per design
- DNS entry for the hostname you intend to use (or a wildcard), pointed to your keepalived IP
- Traefik Forward Auth to secure your Traefik-exposed services with an additional layer of authentication
Setup data locations¶
We'll need a single location to bind-mount into our container, so create /var/data/privatebin, and make it world-writable (there might be a more secure way to do this!)
mkdir /var/data/privatebin chmod 777 /var/data/privatebin/
Setup Docker Swarm¶
Create a docker swarm config file in docker-compose syntax (v3), something like this:
I automatically and instantly share (with my sponsors) a private "premix" git repository, which includes necessary docker-compose and env files for all published recipes. This means that sponsors can launch any recipe with just a
git pull and a
docker stack deploy 👍.
🚀 Update: Premix now includes an ansible playbook, so that sponsors can deploy an entire stack + recipes, with a single ansible command! (more here)
version: '3' services: app: image: privatebin/nginx-fpm-alpine volumes: - /var/data/privatebin:/srv/data networks: - traefik_public deploy: labels: - traefik.frontend.rule=Host:privatebin.example.com - traefik.docker.network=traefik_public - traefik.port=4180 networks: traefik_public: external: true
Launch PrivateBin stack¶
Launch the PrivateBin stack by running
docker stack deploy privatebin -c <path -to-docker-compose.yml>
Log into your new instance at https://YOUR-FQDN, with user "root" and the password you specified in gitlab.env.
Chef's notes 📓¶
Tip your waiter (sponsor) 👏¶
Did you receive excellent service? Want to make your waiter happy? (..and support development of current and future recipes!) Sponsor me on Github / Patreon, or see the contribute page for more (free or paid) ways to say thank you! 👏
Flirt with waiter (subscribe) 💌¶
Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the RSS feed, or leave your email address below, and we'll keep you updated. (*double-opt-in, no monkey business, no spam)