In this tutorial, we will go through the steps to install PrivateBin, a self-hosted service for sharing and storing sensitive information such as passwords, notes or any kind of text. This guide is specifically for users running EndeavourOS Latest.
Before we begin, make sure you have the following:
Firstly, let's create the directory where we will install PrivateBin.
sudo mkdir /var/www/privatebin
Next, we will navigate to the directory and download the latest version of PrivateBin.
cd /var/www/privatebin
sudo curl -L https://github.com/PrivateBin/PrivateBin/archive/refs/tags/1.3.4.tar.gz -o privatebin.tar.gz
After the download is complete, we need to extract the files from the archive.
sudo tar xvzf privatebin.tar.gz --strip-components=1 -C /var/www/privatebin
The flag --strip-components=1
is used to remove one component from the directory path to avoid creating a subdirectory.
Now that PrivateBin is installed, we need to create the configuration file.
sudo cp /var/www/privatebin/cfg/conf.sample.php /var/www/privatebin/cfg/conf.php
Then, we need to edit the conf.php
file.
sudo nano /var/www/privatebin/cfg/conf.php
Here are some of the basic settings you should configure:
$mainSalt
: A string used to generate a unique key for encrypting your data. It should not be the same as the $password salt.$passwordSalt
: A string used to generate a unique key for encrypting user passwords. It should not be the same as the $main salt.$uploadDir
: The directory where uploaded files will be stored.$fileLifetime
: The time in seconds that uploaded files will be stored.$expireBurn
: Should uploaded files be removed from server memory after they expire?$sessionLifetime
: The time in seconds that user sessions will remain active.$forceTor
: Should the service only be available over Tor?Make sure to save the changes to the conf.php
file.
Now, we need to configure the web server to serve the PrivateBin installation.
If you're using Apache, add the following code to your VirtualHost configuration (usually found in /etc/httpd/conf/httpd.conf
or /etc/httpd/conf.d/vhosts.conf
):
<VirtualHost *:80>
ServerName privatebin.example.com # Replace with your domain name
DocumentRoot /var/www/privatebin/
<Directory /var/www/privatebin/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/privatebin_error.log
CustomLog ${APACHE_LOG_DIR}/privatebin_access.log combined
</VirtualHost>
Then restart Apache for the changes to take effect.
sudo systemctl restart httpd
If you're using Nginx, add the following code to your VirtualHost configuration (usually found in /etc/nginx/sites-available/default
or /etc/nginx/conf.d/vhosts.conf
):
server {
listen 80;
server_name privatebin.example.com; # Replace with your domain name
root /var/www/privatebin/;
index index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}
Then restart Nginx for the changes to take effect.
sudo systemctl restart nginx
Visit http://privatebin.example.com
(replace with your domain name) in a web browser to test the installation. You should see the PrivateBin homepage.
Congratulations! You have successfully installed PrivateBin on EndeavourOS Latest. Now you can share and store your sensitive information with added security.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!