How to Install PrivateBin on Your Synology NAS

How to Install PrivateBin on Your Synology NAS

PrivateBin is a minimalist open source web service that allows you to create a paste of your text output and bind it to a single URL that you can then share. It’s similar to Yopass and Password Pusher. This method is perfect for sharing private information inside a Facebook chat, WhatsApp chat or any other IM platform, email etc. The end-user would just click on the link and get the output in a browser. The information will be automatically deleted/destroyed at a time of your choice: as soon as the receiver reads it, after a few minutes, after a week or several months etc. Data is encrypted and decrypted in the browser using 256bit AES in Galois Counter mode. In this step by step guide I will show you how to install PrivateBin on your Synology NAS using Docker.

💡Note: This guide works perfectly with the latest PrivateBin v1.7.1 release.

💡Note: Check out my new guide on how to Install PrivateBin Using Portainer.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Container Manager via Synology “Package Center”. If you run an older DSM version (under 7.2), search for Docker instead of Container Manager.

Download Container Manager Synology Docker

  • STEP 3

Install Text Editor via Synology “Package Center”. (Mandatory STEP.) If you already have Text Editor installed on your Synology NAS, skip this STEP.

Synology Install Text Editor 2023

  • STEP 4

Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.

  • STEP 5

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 1 new 2023

  • STEP 6

Now click the “Create” button. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 2 new 2023

  • STEP 7

After you click the Create button, the window below will open. Follow the instructions in the image below.

On the General area, set the Reverse Proxy Name description: type in PrivateBin. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: privatebin.yourname.synology.me
Port: 443

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 8092

PrivateBin Synology NAS Set up 3 new 2023

  • STEP 8

On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.

Synology Proxy WebSocket

  • STEP 9

Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 4 new 2023

  • STEP 10

Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 5 new 2023

  • STEP 11

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it privatebin. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

PrivateBin Synology NAS Set up 6 new 2023

  • STEP 12

Download (click on the blue link below) then upload the conf.php file below in the privatebin folder that you have previously created at STEP 11. Follow the instructions in the image below. 🔒Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!

👉🏻conf.php

PrivateBin Synology NAS Set up 7 new 2023

  • STEP 13

Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the images below.

PrivateBin Synology NAS Set up 8 new 2023

  • STEP 14

Once you click on User-defined script a new window will open. Follow the instructions below:

  1. General: In the Task field type in Install PrivateBin. Uncheck “Enabled” option. Select root User.
  2. Schedule: Select Run on the following date then select “Do not repeat“.
  3. Task Settings: Check “Send run details by email“, add your email then copy paste the code below in the Run command area. After that click OK.
docker run -d --name PrivateBin \
-p 8092:8080 \
-v /volume1/docker/privatebin:/srv/data \
-v /volume1/docker/privatebin:/run \
-v /volume1/docker/privatebin:/tmp \
-v /volume1/docker/privatebin/conf.php:/srv/cfg/conf.php \
--restart always \
privatebin/nginx-fpm-alpine
chmod -R 0777 /volume1/docker/privatebin

PrivateBin Synology NAS Set up 9 new 2024

  • STEP 15

After you click OK on STEP 14 a new warning pop up window will open. Click OK.

PrivateBin Synology NAS Set up 10 new 2024

After you click OK, type in your DSM Password then click Submit. Follow the instructions in the image below.

Synology Task Scheduler Confirm Admin Password

  • STEP 16

After you click Submit on STEP 15, select your “Install PrivateBin” Task then click the “Run” tab. You will be asked to run Install PrivateBin – click OK. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 11 new 2024

  • STEP 17

Go back to STEP 1 or you will deal with karma 🙂.

  • STEP 18

Now open your browser and type in your HTTPS/SSL certificate like this https://privatebin.yourname.synology.me In my case it’s https://privatebin.mariushosting.synology.me If everything goes right you will see the Privatebin dashboard page. Add your text, select the expiration time, burn after reading, optionally set up a password then click Send. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 12 new 2023

  • STEP 19

You should now see your synology.me DDNS link with a really long green alphanumerical code. Copy the link and send it wherever you want. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 13 new 2023

  • STEP 20

Your message will look like this. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 14 new 2023

  • STEP 21

Open the conf.php file that you have previously uploaded at STEP 12. In this file you can fully customize your PrivateBin instance. For example, you can add a function that will allow you to upload files. Change the fileupload value from false to true then save the file. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 15 new 2023

  • STEP 22

Restart your PrivateBin Container. Open the Docker or the Container Manager package. Click Container then restart PrivateBin.

  • STEP 23

Open your PrivateBin DDNS URL address. As you can see, you have an option to upload files. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 16 new 2023

  • STEP 24

Your files at a glance!

PrivateBin Synology NAS Set up 17 new 2023

  • STEP 25

If you want to remove PrivateBin from your NAS, just delete the privatebin docker container, the privatebin image and the privatebin folder. Once you create the privatebin folder in your main docker folder, you can’t delete it manually. As a workaround, follow the instructions below to delete the privatebin folder.

  • STEP 26

Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.

Synology User Defined Script

  • STEP 27

Once you click on User-defined script, a new window will open. Follow the instructions below:

  1. General: In the Task field type in “Remove PrivateBin Folder“. Uncheck the “Enabled” option. Select root User.
  2. Schedule: Select Run on the following date then select “Do not repeat“.
  3. Task Settings: Check “Send run details by email“, add your email then copy paste the code below in the Run command area. After that, click OK.
rm -r /volume1/docker/privatebin

PrivateBin Synology NAS Set up 18 new 2024

  • STEP 28

After you click OK on STEP 27 a new warning pop up window will open. Click OK.

PrivateBin Synology NAS Set up 19 new 2024

After you click OK, type in your DSM Password then click Submit. Follow the instructions in the image below.

Synology Task Scheduler Confirm Admin Password

  • STEP 29

After you click Submit on STEP 28, select your “Remove PrivateBin Folder” Task then click the “Run” tab. You will be asked to run Remove PrivateBin Folder – click OK. Follow the instructions in the image below.

PrivateBin Synology NAS Set up 20 new 2024

Enjoy PrivateBin!

🆘TROUBLESHOOTING

If you encounter issues by using this container, make sure to check out the Common Docker issues article.

Note: Which is the best: Tornote or PrivateBin? For sure PrivateBin.
Note: If you need more information about PrivateBin, you can take a look at their official website.
Note: Find out how to update PrivateBin container with the latest image.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: Instead of a free DDNS you can also set up your own domain name using Reverse Proxy.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Saturday / February 24th, 2024 at 6:40 AM