How to Install Jirafeau on Ubuntu Server

Jirafeau is a free and open-source web-based file sharing software that allows users to securely share files with colleagues, friends, and family members. In this tutorial, we will guide you through the process of installing Jirafeau on Ubuntu Server.

Prerequisites

Before you begin, make sure you have a few things ready:

Step 1: Update Packages

The first thing you should do is update all the installed packages on your server. You can do this by running the following command:

sudo apt update && sudo apt upgrade -y

Step 2: Install Required Packages

Jirafeau requires some PHP extensions to be installed on the server. So, you will have to install them by running the following command:

sudo apt install apache2 php php-curl php-gd php-mbstring php-xml zip unzip -y

Once the installation completes, restart the Apache server by executing the below command:

sudo service apache2 restart

Step 3: Install Jirafeau

Now, it's time to download and install the Jirafeau software. Follow the below steps:

  1. Switch to your web server document root directory:
cd /var/www/html/
  1. Download the latest version of Jirafeau from Gitlab by running:
sudo wget https://gitlab.com/mojo42/Jirafeau/-/archive/master/Jirafeau-master.zip
  1. Extract the downloaded zip file:
sudo unzip Jirafeau-master.zip
  1. Rename the extracted folder by running:
sudo mv Jirafeau-master jirafeau
  1. Change the ownership of the jirafeau folder to the Apache user:
sudo chown -R www-data:www-data jirafeau/

Step 4: Configure Apache

Next, we need to configure Apache to serve the Jirafeau web application.

  1. Create a new Apache virtual host configuration file by running the below command:
sudo nano /etc/apache2/sites-available/jirafeau.conf
  1. Add the below contents in the file:
<VirtualHost *:80>
        ServerAdmin admin@example.com
        DocumentRoot /var/www/html/jirafeau/

        ErrorLog ${APACHE_LOG_DIR}/jirafeau_error.log
        CustomLog ${APACHE_LOG_DIR}/jirafeau_access.log combined

        <Directory /var/www/html/jirafeau/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

        <Directory /var/www/html/jirafeau/upload/>
            Options -Indexes
        </Directory>

</VirtualHost>

Please ensure you replace example.com with your actual domain or subdomain.

  1. Save and close the file.

  2. Enable the configuration by running:

sudo a2ensite jirafeau.conf
  1. Restart the Apache server for the changes to take effect:
sudo systemctl restart apache2

Step 5: Configure database

Jirafeau uses SQLite as its default database. We will create a new database and user. Follow the steps:

  1. Navigate to the Jirafeau directory:
cd /var/www/html/jirafeau
  1. Create a new database file by running:
sudo touch jirafeau.sqlite
  1. Set the appropriate permissions for the SQLite database file:
sudo chown www-data:www-data jirafeau.sqlite
  1. Open the config.php file in the Jirafeau directory:
sudo nano config.php
  1. Find the lines that start with // Database Config.

  2. Uncomment the following line:

// define('JIRAFEAU_DB_DSN', 'sqlite::memory:');
  1. Add the following line below it to specify the path of your database file:
define('JIRAFEAU_DB_DSN', 'sqlite:/var/www/html/jirafeau/jirafeau.sqlite');
  1. Save and close the config.php file.

Step 6: Access Jirafeau

You are almost there. Open your web browser, enter your domain or subdomain name into the address bar and press enter.

The Jirafeau installation wizard will automatically launch. Follow the prompts to complete the installation.

Once the installation is complete, you can begin using Jirafeau by uploading and sharing files securely.

Conclusion

In this tutorial, we demonstrated how to install Jirafeau on Ubuntu Server. Jirafeau is a robust file sharing application that offers an impressive range of features for both personal and professional use. With proper installation and configuration, Jirafeau can provide a simple and effective solution for file sharing that is both secure and easy-to-use.

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!