FileGator is a free, open-source web-based file manager that allows you to upload, download, and edit files on your server. This tutorial will guide you on how to install FileGator on your Elementary OS Latest operating system.
Before starting with the installation process, make sure your system meets the following requirements:
It is always recommended to update your system before installing any new software or application. So, run the following command to update your system:
sudo apt update && sudo apt upgrade
Choose your preferred web server (Apache or Nginx) and install it on your system. You can install Apache by running the following command:
sudo apt install apache2
Or, if you prefer Nginx, run the following command:
sudo apt install nginx
Install the latest version of PHP along with the required extensions by running the following command:
sudo apt install php7.4 php7.4-common php7.4-curl php7.4-json php7.4-mbstring php7.4-mysql php7.4-xml php7.4-zip libapache2-mod-php7.4
Install either MySQL or MariaDB database server according to your preference. You can install MariaDB by running the following command:
sudo apt install mariadb-server
After installing, run the following command to secure your database server:
sudo mysql_secure_installation
Now, create a virtual host configuration file for FileGator. For Apache, run the following command:
sudo nano /etc/apache2/sites-available/filegator.conf
And for Nginx, run the following command:
sudo nano /etc/nginx/sites-available/filegator.conf
Add the following content in the configuration file.
For Apache, replace yourdomain.com
with your own domain name:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/filegator
ServerName yourdomain.com
ServerAlias www.yourdomain.com
<Directory /var/www/filegator>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/filegator_error.log
CustomLog ${APACHE_LOG_DIR}/filegator_access.log combined
</VirtualHost>
For Nginx, replace yourdomain.com
with your own domain name:
server {
listen 80;
root /var/www/filegator;
index index.php index.html index.htm;
server_name yourdomain.com;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~\.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ /uploads/.*\.php$ {
deny all;
}
error_log /var/log/nginx/filegator_error.log;
access_log /var/log/nginx/filegator_access.log;
}
Save and close the file.
Download the latest version of FileGator from their official website at https://filegator.io/.
Now, unzip the downloaded file and move the filegator
folder to /var/www/
:
sudo unzip filegator.zip
sudo mv filegator /var/www/
Change the ownership of the /var/www/filegator
directory to the www-data
user and group:
sudo chown -R www-data:www-data /var/www/filegator
Create a new MySQL or MariaDB database for FileGator and a new database user with full access to the database:
sudo mysql -u root -p
CREATE DATABASE filegatordb;
GRANT ALL ON filegatordb.* TO 'filegatoruser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;
Replace filegatordb
with your preferred database name, filegatoruser
with your preferred database username, and password
with your preferred database password.
Copy the sample configuration file and create a new configuration file:
cd /var/www/filegator/config
sudo cp config.inc.sample.php config.inc.php
Edit the config.inc.php
file and update the database details by adding the following lines:
$db_host = "localhost";
$db_name = "filegatordb";
$db_user = "filegatoruser";
$db_password = "password";
Replace filegatordb
, filegatoruser
, and password
with your own values.
Restart your web server to apply the configuration changes:
For Apache:
sudo systemctl restart apache2
For Nginx:
sudo systemctl restart nginx
Now, open your web browser and browse to the following URL:
http://yourdomain.com/filegator
Replace yourdomain.com
with your own domain name.
You should see the FileGator login page.
In this tutorial, you have learned how to install FileGator on your Elementary OS Latest operating system. You can now upload, download, and edit files on your server through the web interface of FileGator.
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!