Install PrivateBin on Plesk Obsidian

ArashiK 0

Here an easy-to-follow guide on how to install PrivateBin on a Plesk Obsidian server.
Some information before the guide:

  • Plesk is in the Service Provider View (some steps in the GUI may differ in Power User View)
    bin.example.com is the subdomain here I will install it, replace it with your subdomain or domain where you want to install PrivateBin
  • Backup over Plesk for the Server/Subscription should be done before applying any steps here
    Any action you do on your server is on your own risk and will, I am not responsible for any issues.
  • SSH access

Let’s start with the preparation:

  1. Go to Domains > example.com > PHP Settings:
    Make sure, that you have selected there PHP 7+, I will use PHP 7.4.8
    If you use a PHP version by Plesk then libsodium should be already pre-installed (check the PHP Info page)
  2. Add /dev/urandom to your Open Base dir, in my case the field looks like this:
    {WEBSPACEROOT}{/}{:}{TMP}{/}:/dev/urandom
  3. Now if not done yet install mcrypt for your PHP version (Tutorial for PHP 7.4)
  4. Create a new database in Plesk for the Domain/Subdomain
  5. Clone the git from PrivateBin to the folder where you want to have the application, in my case I will install it on a subdomain privatebin.help-server.net the path for me would be /var/www/vhosts/help-server.net/privatebin.help-server.net/.
    I will use for this the GIT option from Plesk:

    As I do not need to clone it again I will also remove it again after the initial clone:
  6. Go to the cfg folder and rename the conf.sample.php to conf.php
  7. Open the conf.php
  8. Comment out the [model] and [model_options] sections and add following text block:











    Replace the following attributes:
    > dbname=privatebin with the correct DB name
    > usr = “privatebin” with the correct username
    > pwd = “newpassword” with the correct password:

  9. Now you can open the site with the application and do the first save the first secret:
 
If there are any questions leave a comment.
[model]
class = Database
[model_options]
dsn = "mysql:host=localhost;dbname=privatebin;charset=UTF8"
tbl = "privatebin_" ; table prefix
usr = "privatebin"
pwd = "newpassword"
opt[12] = true ; PDO::ATTR_PERSISTENT 

Leave a Reply

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