PrivateBin – OpenSource PasteBin on Docker

PrivateBin – OpenSource PasteBin on Docker

In this tutorial, let’s learn how to set up a PrivateBin instance on Docker

What is PrivateBin ?

  • PrivateBin is a minimalist, open-source pastebin where the server has zero knowledge of pasted data
  • Share information privately and automatically burn the content after its read
  • Encrypt the information using a password
  • Secure way to share private information

Pre-requisites

  • An A name record on your domain pointing to the IP of the instance where PrivateBin is being deployed (Optional)
  • If you do not have a domain registered, PrivateBin can be used on your local network but sharing the pastebin via internet will not be possible
  • Docker should be installed and ready to use

Read more here:
https://privatebin.info/

For more blogs, visit: Blogs

Steps to Deploy PrivateBin on Docker

1. Ensure you have already set up an A name record pointing to the IP of the instance. If you do not have a domain, the same steps below can be followed to deploy and use on the local network

2. Create a folder to store necessary data from the docker container

# Create a directory called privatebin and navigate into it
mkdir privatebin
cd privatebin

2. Use the below docker command to deploy the container

# -d runs the container in detached mode
# --restart="always" restarts the container if it stops due to any circumstances 
# --read-only specifies the volume mount is ready only
# -p 8080:8080 exposes the container port to your local. The container port is to the right wherease the local port is to the left. The local port can be modified to suit your requirements
docker run -d \
  --restart="always" \
  --read-only \
  -p 8080:8080 \
  -v $PWD/privatebin-data:/srv/data privatebin/nginx-fpm-alpine

3. Access the installation from your browser by navigating to http://<ip>:<port>

PrivateBin

Congratulations!! You’ve successfully deployed PrivateBin on Docker

How to use PrivateBin ?

1. Let’s create a secret note. Enter your secret information in the editor and choose the expiration time based on your requirement. If the “Burn after reading” option is checked the note is destroyed once it’s read and is no more accessible. A password can be set to the note as shown below

PrivateBin

2. To create the note and get a link to it click on “Send”.

Note: If you do not have a domain this can only be used on your local network. To set up the domain record to point to the installation and enable SSL using Nginx Proxy Manager as a Reverse Proxy refer to this blog: Nginx Proxy Manager on Docker – Reverse Proxy

PrivateBin

3. This link if deployed on your local machine, will be accessible throughout your local network. If you have setup a domain this link can be shared and accessed directly over the internet

The user is prompted for a password when the note is opened as shown below

PrivateBin

4. Once the password is entered, the note is displayed. If “Burn After Reading” is enabled, this won’t be accessible through the link anymore

PrivateBin

5. Another way to create a note with two-way communication is using a discussion. This option can be enabled while creating the secret note as shown below

PrivateBin

6. This will allow for a discussion thread where users can add comments as shown below

PrivateBin
PrivateBin

7. Additionally, you can also create a QR code for your note by clicking the QR code option in the note

PrivateBin

Congratulations!! You’ve successfully learnt how to use PrivateBin

4200cookie-checkPrivateBin – OpenSource PasteBin on Docker

4 Comments

  1. Pretty section of content. I just stumbled upon your weblog
    and in accession capital to assert that I get actually enjoyed account your blog posts.
    Any way I will be subscribing to your augment and even I achievement you
    access consistently quickly.

Leave a Comment

Your email address will not be published. Required fields are marked *