Setting Up Private Pastebin With Privatebin

Setting Up Private Pastebin with Privatebin
Pastebin is a very useful utility for sharing debug and error mesasges online. Privatebin is a self-hosted alternative that has multiple security options like burn after read mode and uses 256bit AES-GCM for all messages.
Linux installation:
Step 1. Make sure Docker and Docker Compose are installed and setup. Guide
Step 2. Make a directory for privatebin configs.
mkdir -p /home/(username)/docker/privatebin
Step 3. Configure docker-compose.yml for privatebin.
 | 
 | 
Step 4. Configure conf.php which stores the main configuration settings for Privatebin.
- Configure website title on line 7
 - Configure file upload on line 19
 - Configure size limit on line 32(php.ini requires Step 5)
 - Configure forwarded headers on line 129 by uncommenting ;
 - Configure MYSQL_PASSWORD on line 165 from docker-compose.yml
 - Other configurations maybe changed according to preferences
 
Step 5. Configure php.ini if file upload is enabled.
- Configure upload_max_filesize on line 841
 - Configure post_max_size on line 689
 
Step 6. Make directory for metadata and set required permissions.
mkdir -p /home/(username)/docker/privatebin/privatebin-data
chown 65534:82 /home/(username)/docker/privatebin/privatebin-data
Step 7. Start Privatebin service and connect to url on port 8080.
docker-compose up -d
Step 8. To update or make changes to service make sure to rebuild.
destroys containers without affecting volumes
docker-compose down
pulls new docker images
docker-compose pull
starts docker containers in the background
docker-compose up -d