FileShelter is an open-source, self-hosted file-sharing platform that provides a secure way to share files with others. In this tutorial, we will learn how to install FileShelter on Ubuntu Server latest.
Before we start with the installation process, make sure you have the following prerequisites installed on your Ubuntu Server:
The first step is to install Git on your Ubuntu Server. To install Git, run the following command on your terminal:
sudo apt-get update
sudo apt-get install git
Once Git is installed, we need to clone the FileShelter repository from GitHub. To clone the repository, run the following command:
git clone https://github.com/epoupon/fileshelter.git
This will clone the repository to the /var/www directory on your Ubuntu Server.
Composer is a package manager for PHP. We need to install Composer to manage dependencies required by FileShelter. To install Composer, run the following command:
sudo apt-get install composer
Before we start the FileShelter installation, we need to install the required dependencies using Composer. To do this, go to the FileShelter directory and run the following command:
cd /var/www/fileshelter
composer install
This command will install all the required dependencies.
In this step, we will configure the MySQL database for FileShelter. First, create a new database for FileShelter:
sudo mysql -u root -p
CREATE DATABASE fileshelter;
GRANT ALL PRIVILEGES ON fileshelter.* TO 'fileshelter_user'@'localhost' IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
Once the database is created, we need to modify the .env file in the FileShelter directory. Use the following command to copy the .env.example file:
cp .env.example .env
Then, open the .env file using a text editor and modify the following lines to match your database settings:
DB_DATABASE=fileshelter
DB_USERNAME=fileshelter_user
DB_PASSWORD=your_password
Save the .env file and exit.
In this step, we will generate an encryption key for FileShelter. To generate the key, run the following command in the FileShelter directory:
php artisan key:generate
This command will generate a new key and update the .env file.
To make sure FileShelter can write to certain directories, we need to set the correct file permissions. To do this, run the following commands:
chgrp -R www-data storage bootstrap/cache
chmod -R ug+rwx storage bootstrap/cache
Finally, we need to configure Nginx to serve FileShelter. Create a new Nginx server block by running the following command:
sudo nano /etc/nginx/sites-available/fileshelter
Add the following configuration:
server {
listen 80;
listen [::]:80;
server_name example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name example.com;
ssl_certificate /path/to/ssl/certificate;
ssl_certificate_key /path/to/ssl/key;
root /var/www/fileshelter/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; # Change the PHP version if needed
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
}
Save the file and exit.
Then, enable the FileShelter server block by creating a symbolic link:
sudo ln -s /etc/nginx/sites-available/fileshelter /etc/nginx/sites-enabled/
Finally, restart Nginx:
sudo systemctl restart nginx
FileShelter installation is complete. You can access it at https://example.com (replace with your domain name).
In this tutorial, we learned how to install FileShelter on Ubuntu Server latest. You can now use FileShelter to securely share files with others.
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!