How To Install FileRun on Ubuntu 20.04 (No More Cloud Fails)
Want a private, lightning‑fast file server without paying for a cloud plan? FileRun gives you that and more. In the next few minutes we’ll get it running on Ubuntu 20.04, so you can share photos, documents, or even your own music library the way you want.
Why FileRun over other solutions?
FileRun is a self‑hosted, feature‑rich alternative to Dropbox or Google Drive. It’s lightweight enough for a single server and still ships with webDAV, calendar sync, and a slick admin panel. I’ve seen people drop the whole cloud stack because they hit that 500 error after installing PHP 8.1—FileRun keeps its happy path clear.
Prerequisites you should have
- Ubuntu 20.04 LTS (or later) running as root or a sudoer
- A fresh, empty MySQL user for FileRun
- An Apache web server with mod_php enabled
If your machine is still on the old PHP‑7.4 stack, you’ll need to upgrade before proceeding.
Step 1: Update your system
sudo apt update && sudo apt upgrade -y
An up‑to‑date OS means fewer dependency headaches later.
Step 2: Install PHP, MySQL, and Apache
FileRun requires PHP 7.4+ (8.x works too). The simplest combo is:
sudo apt install apache2 php php-mysql libapache2-mod-php mysql-server -y
Why this matters? PHP must be compiled with the mysqli extension; otherwise FileRun’s installer will complain that it can’t talk to MySQL.
Step 3: Set up the database
sudo mysql_secure_installation # set root password, remove anonymous users, etc. sudo mysql -u root -p
Inside MySQL:
CREATE DATABASE filerun CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON filerun.* TO 'filerun_user'@'localhost' IDENTIFIED BY 'strong_password'; FLUSH PRIVILEGES; EXIT;
FileRun will look for a database named exactly filerun. A typo and the installer stalls.
Step 4: Download and unpack FileRun
cd /tmp wget https://www.filerun.com/download/filerun-latest.zip sudo unzip filerun-latest.zip -d /var/www/
Rename the folder to something simple, like filerun:
sudo mv /var/www/filerun-*/ /var/www/filerun
Step 5: Configure Apache virtual host
Create a new site file:
sudo nano /etc/apache2/sites-available/filerun.conf
Paste in:
<VirtualHost *:80>
ServerName filerun.local
DocumentRoot /var/www/filerun
<Directory /var/www/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>
Enable the site and rewrite module:
sudo a2ensite filerun.conf sudo a2enmod rewrite sudo systemctl restart apache2
The ServerName can be any hostname you’ll use; if you’re testing locally, add it to /etc/hosts.
Step 6: Run the installer via web browser
Open your favorite browser and go to http://filerun.local. The FileRun wizard will walk you through:
1. Accepting the license
2. Providing database details (use the credentials from Step 3)
3. Creating an admin account
If you hit a “500 Internal Server Error,” double‑check that PHP has the mysqli extension (php -m | grep mysqli). If it’s missing, reinstall PHP with:
sudo apt install php-mysqli
Step 7: Secure your installation
- HTTPS: Even on a LAN, use Let’s Encrypt or self‑signed certs.
sudo apt install certbot python3-certbot-apache sudo certbot --apache -d filerun.local
- Strong admin password: FileRun doesn’t enforce complexity, but you should pick something that would make your ex laugh.
- Back up the filerun directory and database regularly; a simple cron job with mysqldump does the trick.
That’s it—your own self‑hosted drive.