MQ-Jr
MQ-Jr
unixcop Admin

How To Install FileRun on Ubuntu 20.04


Today you will learn How To Install FileRun on Ubuntu 20.04

FileRun is a self-hosted Google Drive alternative. It is a full featured web based file manager with an easy to use user interface. It is great for managing your photo, movie, audio collection, or sharing files with your family and friends.

FileRun is a reliable and performant File management desktop sync and file sharing

It runs great on any server, including hosting accounts or small devices like Raspberry PiAccess your files from anywhere (desktop, mobile app or browser).

Installation

Just follow the steps below to get start with fileRun

  • Update and upgrade your system packages
- Advertisement -
sudo apt update && sudo apt upgrade
  • Install LAMP Server (LAMP stack).
  • Install php modules as follows:
sudo apt install php-gd php-json php-mbstring php-mysqli php-xmlrpc php libapache2-mod-php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php libapache2-mod-php php-mysql php-mysql wget unzip php-cli php-zip php-curl -y
  • Also you have to Install ionCube Loader module for PHP, You can follow the steps in this guide below to install it

How to Install ionCube Loader in Ubuntu

  • Install apache web server and maria database as shown below:
sudo apt install apache2 mariadb-server-10.3 -y
  • Start and enable apache and mariadb.
systemctl start apache2 mariadb 
systemctl enable apache2 mariadb 
systemctl status apache2 mariadb
  • Configure and secure MariaDB as follows:
- Advertisement -
mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
  • Log in to MariaDB shell:
mysql -u root -p
CREATE DATABASE filerun_db;
CREATE USER 'filerun_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON `filerun_db`.* TO 'filerun_user'@'localhost';
FLUSH PRIVILEGES;
  • Download the latest version of filerun with the following command:
wget -O FileRun.zip https://filerun.com/download-latest
  • unzip the downloaded file using the following command:
unzip FileRun.zip -d /var/www/html/filerun/
  • Change some folders permissions as follows:
chown -R www-data:www-data /var/www/html/filerun
chmod -R 755 /var/www/html/filerun
  • Create a PHP configuration file for FileRun
vim /etc/php/7.4/apache2/conf.d/filerun.ini

Then add the following configuration:

expose_php = Off
error_reporting = E_ALL & ~E_NOTICE
display_errors = Off
display_startup_errors = Off
log_errors = On
ignore_repeated_errors = Off
allow_url_fopen = On
allow_url_include = Off
variables_order = "GPCS"
allow_webdav_methods = On
memory_limit = 128M
max_execution_time = 300
output_buffering = Off
output_handler = ""
zlib.output_compression = Off
zlib.output_handler = ""
safe_mode = Off
register_globals = Off
magic_quotes_gpc = Off
upload_max_filesize = 20M
post_max_size = 20M
enable_dl = Off
disable_functions = ""
disable_classes = ""
session.save_handler = files
session.use_cookies = 1
session.use_only_cookies = 1
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_httponly = 1
date.timezone = "UTC"
  • Save and close the file.
  • Restart the Apache.
sudo systemctl reload apache2

Also create an Apache virtual host config file for FileRun.

vim /etc/apache2/sites-available/filerun.conf

Then add the following virtual host as follows

<VirtualHost *:80>
        ServerName filerun.unixcop.com.com

        DocumentRoot /var/www/html/filerun

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

        ErrorLog ${APACHE_LOG_DIR}/filerun.error.log
        CustomLog ${APACHE_LOG_DIR}/filerun.access.log combined
</VirtualHost>
  • Save and close the file then restart Apache with the below commands:
sudo a2ensite filerun.conf 
sudo a2enmod rewrite
sudo systemctl restart apache2
  • Open ports 80 and 443 on Firewall to allow HTTP and HTTPS traffic:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reload
  • Access FileRun Web Interface by opening your web browser and access it using the URLhttps://filerun.unixcop.com
  • You should see the below, Click Next to get started with the FileRun installation
  • FileRun will check the server requirements to continue the installation as shown below
  • Enter your Database Connection information that we created before then click Next.
  • The default user for FileRun was created and you have to note down these credentials to be able to login to filerun
  • Use the credentials as shown above in the screenshot to login to Filerun as shown below
  • You will be directed to the Dashboard of FileRun

Congratulations! You have successfully installed FileRun.

Conclusion

That’s it

In this guide, we showed you how to install FileRun on Ubuntu 20.04

thanks

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook