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.
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.
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.
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.
STEP 6
Now click the “Create” button. Follow the instructions in the image below.
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
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.
STEP 9
Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.
STEP 10
Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.
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.
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!
STEP 13
Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the images below.
STEP 14
Once you click on User-defined script a new window will open. Follow the instructions below:
- General: In the Task field type in Install PrivateBin. Uncheck “Enabled” option. Select root User.
- Schedule: Select Run on the following date then select “Do not repeat“.
- 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
STEP 15
After you click OK on STEP 14 a new warning pop up window will open. Click OK.
After you click OK, type in your DSM Password then click Submit. Follow the instructions in the image below.
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.
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 Create. At the top right of the page you also have the option to switch the theme to dark mode. Follow the instructions in the image below.
STEP 19
You should now see your synology.me DDNS link with a really long alphanumerical code. Copy the link and send it wherever you want. Follow the instructions in the image below.
STEP 20
Your message will look like this. Follow the instructions in the image below.
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.
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. Upload your file, then click the Create button. Follow the instructions in the image below.
STEP 24
You should now see your synology.me DDNS link with a really long alphanumerical code. Copy the link and send it wherever you want. Follow the instructions in the image below.
STEP 25
Your files at a glance!
STEP 26
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 27
Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.
STEP 28
Once you click on User-defined script, a new window will open. Follow the instructions below:
- General: In the Task field type in “Remove PrivateBin Folder“. Uncheck the “Enabled” option. Select root User.
- Schedule: Select Run on the following date then select “Do not repeat“.
- 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
STEP 29
After you click OK on STEP 28 a new warning pop up window will open. Click OK.
After you click OK, type in your DSM Password then click Submit. Follow the instructions in the image below.
STEP 30
After you click Submit on STEP 29, 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.
Enjoy PrivateBin!
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 Monday / November 18th, 2024 at 8:11 PM