How to Install PrivateBin on Ubuntu 24.04 PrivateBin is a minimalist, open-source, self-hosted pastebin platform that encrypts data in the browser before sending it to the server. This ensures that the server never sees the content in plaintext, making it ideal for secure note sharing and temporary text storage. This guide walks through installing and configuring PrivateBin on Ubuntu 24.04 LTS using Apache and PHP. Step 1: Install Required PackagesInstall Apache, PHP, and other dependencies required for PrivateBin: sudo apt update sudo apt install -y apache2 php libapache2-mod-php php-mysql php-mbstring \ php-gd php-xml php-json php-zip wget curl unzip Step 2: Configure Apache Enable and start Apache: sudo systemctl unmask apache2 sudo systemctl enable apache2 sudo systemctl start apache2 Step 3: Create Web Root Directory Create the directory where PrivateBin will reside: sudo mkdir -p /var/www/privatebin sudo chown www-data:www-data /var/www/privatebin sudo chmod 755 /var/www/privatebin Step 4: Download and Extract PrivateBin Download the specified version of PrivateBin from GitHub and extract it: wget https://github.com/PrivateBin/PrivateBin/archive/1.7.3.tar.gz -O /tmp/privatebin-1.7.3.tar.gz sudo tar -xzf /tmp/privatebin-1.7.3.tar.gz -C /tmp sudo cp -r /tmp/PrivateBin-1.7.3/* /var/www/privatebin sudo chown -R www-data:www-data /var/www/privatebin Step 5: Create Data Directory Create a directory for storing PrivateBin data: sudo mkdir /var/www/privatebin/data sudo chown www-data:www-data /var/www/privatebin/data sudo chmod 750 /var/www/privatebin/data Step 6: Configure PrivateBin Create the PrivateBin configuration file: sudo tee /var/www/privatebin/cfg/conf.php > /dev/null <<EOF ;<?php http_response_code(403); /* [main] name = "PrivateBin" discussion = true opendiscussion = false password = true fileupload = false burnafterreadingselected = false defaultformatter = "plaintext" sizelimit = 10485760 template = "bootstrap5" languageselection = false qrcode = true icon = "jdenticon" compression = "zlib" [expire] default = "1week" [expire_options] 5min = 300 10min = 600 1hour = 3600 1day = 86400 1week = 604800 1month = 2592000 1year = 31536000 never = 0 [formatter_options] plaintext = "Plain Text" syntaxhighlighting = "Source Code" markdown = "Markdown" [traffic] limit = 10 [purge] limit = 300 batchsize = 10 [model] class = Filesystem [model_options] dir = "data" /* EOF Step 7: Create Apache Virtual Host Create a dedicated virtual host for PrivateBin: sudo tee /etc/apache2/sites-available/privatebin.conf > /dev/null <<EOF <VirtualHost *:80> ServerName 102.211.186.22 ServerAdmin webmaster@localhost DocumentRoot /var/www/privatebin <Directory /var/www/privatebin> Options -Indexes +FollowSymLinks AllowOverride All Require all granted </Directory> <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> ErrorLog \${APACHE_LOG_DIR}/privatebin-error.log CustomLog \${APACHE_LOG_DIR}/privatebin-access.log combined </VirtualHost> EOF Enable required modules and the site: sudo a2enmod rewrite headers sudo a2ensite privatebin.conf sudo a2dissite 000-default.conf sudo apache2ctl configtest sudo systemctl restart apache2 Step 8: Test PrivateBin Open a browser and visit: http://<your-server-ip> You’ll be greeted with the SnapDrop interface, ready for instant peer-to-peer file transfers. Conclusion SnapDrop offers an elegant way to share files instantly over your local network using only a browser.With Node.js, Nginx, and systemd, this setup ensures your instance is fast, secure, and always running. You now have a fully functional SnapDrop instance hosted on Ubuntu 24.04 — perfect for private, seamless file sharing within your network.