2021-08-11 00:00:00

Technologycloud|file|self-hosted|storage|web server

How to set up a self-hosted file storage with Filerun

More and more privacy and cybersecurity-aware people are looking for alternative solutions to popular cloud file storage services like Dropbox, Google Drive, and Microsoft Onedrive. These services have plenty of functionality, but they don't respect your privacy, and they are also lucrative targets for hackers. Setting up and hosting your own file storage service is a straightforward task for anyone who has some experience with web servers. Here is our guide for installing and configuring Filerun as your self-hosted system.

This is what you need to create a self-hosted Filerun file storage

You need a computer that is running on Linux or Windows. It can be a VPS (Virtual Private Server), a home server, or even a laptop. Disk space is the critical factor here, not performance.

Filerun service is accessed in a web browser or app on any computer or mobile device, but the computer where Filerun service runs requires the following software:

  • Web server, like Apache or Nginx.
  • Mysql/Mariadb 5.6 database or later.
  • PHP 7.1 or later version.
  • PHP extensions exif, gd, mbstring, openssl, POD, xml, zlib. Linux systems often come with these extensions activated. You can check yours with this command line command: php -m . If a required extension is missing, you may have to install it for your operating system, or just activate it in command line. The method depends on your operating system. For instance, for Debian and its derivatives, command phpenmod activates extensions.
  • IonCube loader.
ioncube php loader setup wizard

How to install Filerun

Our production system runs on Debian 10 Linux, so this guide is based on that, but the process is the same for all servers.

I assume that you already have a web server, Mysql/Mariadb and PHP running, so I will skip them. IonCube is a piece of software that enrypts and decrypts PHP code, and Filerun uses it.

Download Ioncube from the developer's page:
https://www.ioncube.com/loaders.php
The easiest way to setup Ioncube is to download and unpack the Loader Wizard on the server, and run it in a web browser. If it runs and the test says Ioncube is ready, skip to the database setup.

If Ioncube Loader Wizard fails (as it did for us when we wanted to run it on a Linux VPS), you have to install Ioncube manually. The best path is to follow instructions given at the screen where the wizard stopped. In our case (Debian 10 on a VPS), we had to download the Linux (64 bits) package, unpack it, and follow instructions in the package.

Next, create a database for Filerun. You may do it, for instance, with phpmyadmin or in command line. The command line process goes like this (replace databasename and username with your own):

mysql -u root -p mysqlrootpasswordhere
create database databasename;
grant all on databasename.* TO username@localhost identified by "passwordforthismysqluser";
exit;

Now, we are ready to download the latest version of Filerun:

wget -O FileRun.zip https://filerun.com/download-latest

Move the downloaded file to a directory that the web server can access. For instance /var/www/html or give Filerun its own directory /var/www/html/filerun. Unzip the file into the directory.

On Linux systems, you have to check permissions of the system/data directory that is located under the Filerun directory. The web server user must be the owner of the data directory and its files. Command line (assuming you are in the Filerun directory):

chown -R www-data system/data
chgrp -R www-data system/data

Now, everything is ready, and you can login to the brand new file storage. Point your browser to (assuming you installed Filerun in a directory named filerun):
https://mydomain.com/filerun
or if you have installed the software on a local computer:
localhost/filerun

A simple setup form asks you to fill in the database name and a few other items. The system automatically generates superuser admin and a complex password. SAVE THE PASSWORD.

Once you are inside Filerun, go straight to the Control Panel (top right corner), open the user account, and select Permissions. Set a directory path for the file storage that is outside web server's public space. For instance, if you create a directory /var/www/filerunfiles and set that path as the file storage, files are not visible to the internet (except through Filerun). Set permissions on Linux:

chown www-data /var/www/filerunfiles

While you are logged in as superuser, create a user account for your own daily use as well.

An installation document with additional security tips can be viewed here.

filerun superuser settings

How to use Filerun

Our small team accesses, downloads, uploads and shares documents stored in Filerun in web browser only, but dedicated applications for phones, tablets, and PCs are available as well.

Two choices are available for mobile devices: apps that can transfer files using Webdav protocol and the Nextcloud sync app.

A sync app for Windows, Mac, and Linux PCs is available. It is the same PC app as Nextcloud uses.

Backup

Two sets of data - files uploaded to the Filerun system, and Filerun database - should be backed up.

Mysql database that stores Filerun's metadata can be backed up with phpmyadmin, but an automated tool is better in the long run. For instance, Mysqldump command comes with Mysql. It exports a given database that can be imported to the system when required.

Files uploaded to Filerun are the same as they were before the upload because Filerun doesn't modify them. Depending on your usage, you may consider if and how to back them up.

News

2025-01-15 08:59:00

Not to mention travel – when real life experiences in a destination don’t match the expectations and everything that can go wrong, goes wrong. Well, that’s the beauty of #travel. #Europehttps://klaava.com/nitpickers-travel-journal-travel-lessons-learned-in-2024/


News

2025-01-11 13:25:00

A conclusion from the Traffic Scorecard 2024 results is it takes about double the time to drive along the streets of London (the most congested city in #Europe) than the streets of Munich, which is ranked the 21st most congested European city. #traffic #travelhttps://klaava.com/the-cities-in-europe-where-people-are-stuck-in-traffic-most-often/


A shop dedicated to tasty juice

2025-01-09 14:04:10

arihak

A shop dedicated to tasty juice


in the busy old town center.

2025-01-08 16:16:08

in the busy old town center.


News

2025-01-07 14:56:00

A reminder for keeping your data safe when traveling. Why? It is likely that you have to access your most critical data in risky situations on the road.https://cybernews.com/privacy/how-to-protect-your-sensitive-information-while-traveling/


News

2025-01-02 16:33:00

What about the scenery, you who are hurrying to the other side?#streetphotography#streetphoto


News

2025-01-01 16:06:00

According to a survey, third of travelers are victims of online booking scams. Since it is so convenient to make travel reservations online, that’s what we do. The problem is that we haven’t adopted new methods to avoid online scams. #travel #scamhttps://klaava.com/a-traveler-is-more-likely-to-get-scammed-when-booking-a-trip-than-being-robbed-in-a-destination/


Perhaps road builders had too much time?

2024-12-29 15:19:44

Perhaps road builders had too much time?


News

2024-12-27 18:25:00

#Photography is full of so-called “rules” that can feel overwhelming. However, some of these “rules” are downright myths.https://www.diyphotography.net/debunking-seven-common-myths-photographers-still-believe-in/


What should I read next?

2024-12-25 15:18:22

arihak

What should I read next?


News

2024-12-23 11:34:00

Since #EU #DMA has specified #Apple as a #gatekeeper in #mobile devices, EU considers Apple should implement several iOS connectivity features, predominantly used for and by connected devices. For instance, notifications, automatic Wi-Fi connection, AirPlay, AirDrop, or Bluetooth audio switching.https://digital-markets-act.ec.europa.eu/commission-seeks-feedback-measures-apple-should-take-ensure-interoperability-under-digital-markets-2024-12-19_en


News

2024-12-21 14:51:00

Smartphone users in the US are not impressed with the latest artificial intelligence features on their devices with 73 percent of Apple users and 87 percent of Samsung users unsatisfied, according to a new study. #phone #AIhttps://petapixel.com/2024/12/19/majority-of-smartphone-users-are-unimpressed-with-ai-features-study-finds/


There should be enough ice already to open the hotel

2024-12-20 16:40:17

There should be enough ice already to open the hotel


Hiking on a mountain experience: the end of an ancient tunnel

2024-12-09 14:12:31

arihak

Hiking on a mountain experience: the end of an ancient tunnel


on a hot summer day

2024-12-02 18:47:01

on a hot summer day


Cloudy day in a valley

2024-11-25 16:31:59

arihak

Cloudy day in a valley


In the shade of a lone palm tree

2024-11-25 15:46:29

In the shade of a lone palm tree


an abandoned town?

2024-11-07 18:35:22

an abandoned town?


A quiet moment between heavy rain

2024-10-24 17:34:45

A quiet moment between heavy rain


Everyone loves a pretty mountain scenery

2024-10-24 16:54:02

arihak

Everyone loves a pretty mountain scenery