FileRun is a free and open-source self-hosted file share and sync based on PHP and MySQL that allows you to access your files anywhere through secure cloud storage, and also offers file backup and sharing for your photos, videos, files, and more. If you want to create a self-hosted file share and sync platform for your home or office, FileRun might be the simplest way to do it, especially if you will need a platform that’s easy to manage. This tutorial is based on Ubuntu Linux. We’ll be installing the Apache web server, MariaDB database server, and PHP modules. We’ll also link to another post that will show you how to secure your FileRun website using Let’s Encrypt free SSL certificates. For more about FileRun, please check its homepage To get started with installing FileRun on Ubuntu Linux, follow the steps below:
How to install Apache on Ubuntu Linux
As mentioned above, we’re going to be using an Apache web server to run FileRun. FileRun requires a web server to function, and Apache is the most popular open-source web server available today. To install Apache on Ubuntu, run the commands below: After installing Apache, the commands below can be used to stop, start and enable Apache services always to start up every time your server starts up. To test whether Apache is installed and functioning, open your web browser and browse to the server’s IP address or hostname. If you see the above page in your browser, then Apache is working as expected.
How to install MariaDB on Ubuntu Linux
A database server is required for FileRun to function. FileRun stores its content in a database, and MariaDB is probably the best database server available to run FileRun. MariaDB is fast, secure and the default server for almost all Linux servers. To install MariaDB, run the commands below: After installing MariaDB, the commands below can be used to stop, start and enable MariaDB services always to start up when the server boots. Next, run the commands below to secure the database server with a root password if you were not prompted to do so during the installation. When prompted, use the guide below to answer: To verify and validate that MariaDB is installed and working, log in to the database console using the commands below: You should automatically be logged in to the database server since we initiated the login request as root. Only the root can log in without a password, and only from the server console. If you see a similar screen as shown above, then the server was successfully installed.
How to install PHP on Ubuntu Linux
As we also mentioned above, we’re installing PHP on Ubuntu since FileRun requires it. PHP packages are added to Ubuntu repositories. The versions of the repositories might not be the latest. If you need to install the latest versions, you’ll need to add a third-party PPA repository. To a third-party repository with the latest versions of PHP, run the commands below. At the time of this writing, the latest PHP version is 7.4. Next, run the commands below to install PHP 7.4 and related modules. Next, you’ll want to change some PHP configuration settings that work great with FileRun. Run the commands below to open the PHP default configuration file. Then copy the lines below and paste them into the file above. Save your changes and exit. One last module which is required is ionCube. Run the steps below to install it and add it to PHP configurations as well. Download the package for Ubuntu 64-bit. Next, run the commands below to extract it into the /usr/lib/php directory. Then run the commands below to create an ioncube config file. And paste the following line in the file and save. Save the file and exit. With the ionCube extension installed, you can now continue with creating the FileRun database and other configurations.
How to create FileRun database on Ubuntu
At this point, we’re ready to create a FileRun database. As mentioned above, FileRun uses databases to store its content. To create a database for FileRun, run the commands below: Then create a database called filerun Next, create a database user called filerunuser and set a password Then grant the user full access to the database. Finally, save your changes and exit.
How to download FileRun on Ubuntu Linux
We’re ready to download FileRun and begin configuring it. First, run the commands below to download the latest version of FileRun from its repository. Next, extract the downloaded content into a new folder called filerun. Then run the command below to allow the www-data user to own the new FileRun directory.
How to configure Apache for FileRun
We have downloaded FileRun content into a new folder we called FileRun. Now, let’s configure Apache to create a new server block to use with our FileRun website. You can create as many server blocks with Apache. To do that, run the commands below to create a new configuration file called file to run. conf in the /etc/apache2/sites-available/ directory to host our FileRun server block. In the file, copy and paste the content below into the file and save. Save the file and exit. After saving the file above, run the commands below to enable the new file that contains our FileRun server block. Restart Apache after that. At this stage, FileRun is ready and can be launched by going to the server’s IP or hostname. You will see the FileRun setup wizard. However, we want to make sure our server is protected with Let’s Encrypt free SSL certificates. So, continue below to learn how to generate a Let’s Encrypt SSL certificate for websites.
How to setup Let’s Encrypt for FileRun
We have written a great post on how to generate and manage Let’s Encrypt SSL certificates for Apache web servers. You can use that post, to apply it here for your FileRun website. To read the post on how to generate Let’s Encrypt SSL certificates for a website, click on the link below: How to Setup Let’s Encrypt on Ubuntu Linux with Apache – Website for Students If you were successful in generating a Let’s Encrypt SSL certificate, you should then reopen the server block for our FileRun website by running the commands below. The new FileRun server block configurations should look similar to the line below. Take notes of the highlighted lines.
The first server block listens on port 80. It contains a 301 redirect to redirect HTTP to HTTPS. The second server block listens on port 443. It contains a 301 redirect to redirect www to the non-www domain.
Save the file above, then restart Apache and PHP using the commands below. Finally, if everything went as planned, you should be able to start the FileRun setup wizard by browsing to the server hostname or IP address over HTTPS. A FileRun setup wizard should appear. Follow the wizard to complete the setup. Make sure all requirements are met. You will need to know the following items before proceeding. Use the database connection info you created above.
Database name Database username Database password Database host
Then, type in the database connection info and click Next Take notes of the super admin account password. Log in and begin setting up your environment.
How to install ImageMagick and FFmpeg on Ubuntu Linux
For generating thumbnails for image files, photography files, and even PDF documents, install ImageMagick. After installing FileRun, enable it inside FileRun from the control panel, under the System configuration > Files > Image preview section, using the path /usr/bin/ffmpeg. Also enable ImageMagic in the control panel, under the Configuration > Interface > Thumbnails and preview section, by setting ImageMagick support’s Mode to IMagick PHP Extension. That should do it! Conclusion: This post showed you how to install FileRun on Ubuntu Linux with a link to set up Let’s Encrypt. If you find any error above or have something to add, please use the comment form below.