How to Install FileShelter on Debian Latest

FileShelter is an open-source solution to share large files securely. In this tutorial, we will learn how to install FileShelter on Debian latest.

Prerequisites

To follow this tutorial, you need:

Step 1: Update the package list

Before starting the installation process, it's always a good practice to update the package list to ensure that you are getting the latest version of the packages. Run the following command to update the package list:

sudo apt update

Step 2: Install the required packages

FileShelter requires some packages to be installed on the system. We can use the following command to install them:

sudo apt install git gcc make apache2 libapache2-mod-perl2 libapache2-mod-deflate libssl-dev libdb5.3-dev libtemplate-perl libhtml-mason-psgihandler-perl libdbd-mysql-perl libcgi-pm-perl build-essential

Step 3: Install Perl and CPAN modules

To run FileShelter, we need to have Perl and some CPAN modules installed on the system. The following command will install them:

sudo apt install perl libwww-perl libdatetime-perl libdatetime-format-http-perl libdatetime-format-mail-perl libdatetime-format-w3cdtf-perl libemail-valid-perl libhttp-date-perl libipc-shareable-perl libjson-perl liblocale-codes-perl libunicode-linebreak-perl libnet-openid-consumer-perl libnet-openid-server-perl libnet-oauth-perl

Step 4: Clone the FileShelter repository

Now we can clone the FileShelter repository from GitHub using the following command:

git clone https://github.com/epoupon/fileshelter.git

Step 5: Configure Apache and FileShelter

We need to configure Apache to run FileShelter. Run the following commands:

sudo a2enmod ssl
sudo a2enmod deflate
sudo a2enmod rewrite
sudo a2enmod perl
sudo ln -s /etc/apache2/mods-available/perl.conf /etc/apache2/mods-enabled/perl.conf
sudo ln -s /etc/apache2/mods-available/perl.load /etc/apache2/mods-enabled/perl.load

Now, create a new Apache virtual host file for FileShelter using the following command:

sudo nano /etc/apache2/sites-available/fileshelter.conf

Add the following configuration to the file:

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com

    RedirectMatch permanent ^/(.*)$ https://example.com/$1
</VirtualHost>

<VirtualHost *:443>
    ServerName example.com
    ServerAlias www.example.com

    DocumentRoot /path/to/fileshelter/public

    SSLEngine on
    SSLCertificateFile /path/to/cert.pem
    SSLCertificateKeyFile /path/to/key.pem
    SSLCertificateChainFile /path/to/chain.pem

    PerlRequire /path/to/fileshelter/modperl_startup.pl
    PerlModule Apache::DBI
    PerlSetVar FileShelterConfig /path/to/fileshelter/config.yml

    <Directory /path/to/fileshelter/public>
        AllowOverride All
        Options FollowSymLinks
        Require all granted
    </Directory>
</VirtualHost>

Replace example.com, /path/to and certificate paths with your own values.

Now, enable the virtual host using the following command:

sudo a2ensite fileshelter.conf

Step 6: Configure FileShelter

Create a new configuration file for FileShelter using the following command:

sudo nano /path/to/fileshelter/config.yml

Add the following configuration to the file:

file_storage_dir: /path/to/fileshelter/file_storage
query_storage_dir: /path/to/fileshelter/query_storage
session_storage_dir: /path/to/fileshelter/session_storage
app_root: /path/to/fileshelter
app_url: https://example.com
app_name: FileShelter

Replace /path/to and application URL with your own values.

Now, create the directories for file storage, query storage and session storage using the following command:

sudo mkdir /path/to/fileshelter/file_storage
sudo mkdir /path/to/fileshelter/query_storage
sudo mkdir /path/to/fileshelter/session_storage
sudo chown -R www-data:www-data /path/to/fileshelter/*

Step 7: Build and Install FileShelter

We can now build and install FileShelter using the following commands:

cd /path/to/fileshelter
perl Makefile.PL
make
sudo make install

Step 8: Restart Apache

To apply the changes, restart Apache using the following command:

sudo systemctl restart apache2

Step 9: Access FileShelter

Open your web browser and navigate to https://example.com/ (replace example.com with your domain name). You should see the FileShelter interface.

Conclusion

Congratulations! You have successfully installed FileShelter on Debian latest. You can now securely share large files with your colleagues or clients.

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!