Savior Faire

Filerun on QNAP

By self-hosting the Free but not open sourced FileRun platform, we can greatly increase the overall performance of QNAP NAS as document management system. Note: it is faster and even more powerful than Google Drive!

Update: The docker compose file has been updated. phpMyAdmin is also included in this configuration, so that it will be more convenient to perform the backup tasks.

Update: As the free version of FileRun has been sunsetting. For those who had installed but not yet registered, you can register till the end of June, 2023. If you appreciate this tool, you may consider purchasing a license. Not cheap, but definitely worth it!

As I have mentioned before, the native QNAP WebUI is very slow, not to mention the malfunctioned QFile or QuMagie mobile apps. The auto upload function often fails and file access speed is very slow.

I endured the situation for a long time and thought it was because of the specification of my NAS (TS-453Bmini). For I realize, it was not necessarily the case, by simply replacing the default QFile with other Webdav enabled app, like Document on iOS, I already enjoy a significant improvement.

And I found a great tool named FileRun. Yes, it is NOT open sourced, but it is free of charge for personal use. For those who self hosts their service with their own hardware, it can be a concern, but for those who use QNAP NAS, it should not be a problem, as QTS itself is also not open sourced.

Then let’s choose a better and safer tool!

FileRun is the combination of QNAP’s File Station / Photo Station / Video Station / Music Station. Of course, their functions are not identical, but overall speaking, FileRun provides a mature and stable using experience with many tweaks possible.

FileRun does not significantly increase the system resources usage, which is quite amazing.

There are many open source projects available, for example Next Cloud or ownCloud, they do provide a good service. Yet I personally think FileRun outperforms them.

FileRun has a relatively long history (more than 15 years), this is the reason I eventually opt for this tool. For document management tools, longevity, stability and security is more important than anything else. You want a stable secure service that can last for years. Migration of database is always a nightmare.

FileRun makes good use of your existing file structure. This is the tutorial of installing FileRun on a QNAP NAS. Again, it can fill in the absence of these knowledge, for there can be some tricks that need to be done.

This tutorial is divided into two parts:


Installation of FileRun

Again, this is a very laymen’s tutorial, if you know the docker structure, you can even skip these parts.

I assume you have downloaded the Container Station on your QNAP NAS.

  1. Click Create and Create Application in Container Station

# You will need to paste a Docker compose file, I share mine here:

version: '3'
services:
  db:
    image: 'mariadb:10.8'
    environment:
      MYSQL_ROOT_PASSWORD: [change it to your password]
      MYSQL_USER: filerun
      MYSQL_PASSWORD: filerun
      MYSQL_DATABASE: filerundb
      TZ: America/Toronto
    networks:
      - filerun
    volumes:
      - './filerun/db:/var/lib/mysql'
  phpmyadmin:
    depends_on:
      - db
    image: phpmyadmin/phpmyadmin
    restart: always
    ports:
      - '777:80'
    environment:
      PMA_HOST: db
      MYSQL_ROOT_PASSWORD: [change it to your password]
      UPLOAD_LIMIT: 300M
    networks:
      - filerun
  web:
    image: filerun/filerun:8.1
    environment:
      FR_DB_HOST: db
      FR_DB_PORT: 3306
      FR_DB_NAME: filerundb
      FR_DB_USER: filerun
      FR_DB_PASS: filerun
      APACHE_RUN_USER: www-data
      APACHE_RUN_USER_ID: 33
      APACHE_RUN_GROUP: www-data
      APACHE_RUN_GROUP_ID: 33
      TZ: America/Toronto
    depends_on:
      - db
    ports:
      - '888:80'
    networks:
      - filerun
    volumes:
      - './filerun/html:/var/www/html'
      - '/share/Vault:/user-files'
      - '/share/Multimedia/:/user-files/Multimedia'
      - '/share/zotero/:/user-files/zotero'
networks:
  filerun:
  1. In the above document, you only need to change three things.
    1. MYSQL_ROOT_PASSWORD: give it a strong password of your choice
    2. By default, phpMyAdmin only allows uploading 2 MB SQL backup, which is not enough, so increasing it to 300 MB by using including UPLOAD_LIMIT under environment
    3. ports:, you may edit the former one, let’s say 999 rather than 888, but please don’t change the latter 80
    4. volumes, this is the setting to include what folders to your FileRun service. Please do not change the first one /var/www/html
  1. Now click Create and wait for the installation, it will create two containers named filerun_web_1 and filerun_db_1 packed in one application. As the docker images are quite big in size, time to have some rest.

Accessing your FileRun from the Internet

After that, you will need to make the FileRun container accessible from the Internet!

As I am using the Cloudflare Tunnel service, when you check on the Network & Virtual Switch on your QNAP, you may realize the filerun_web_1 and cloudflare-1 Virtual adaptors are NOT connected to each other.

They cannot communicate with each other. To do that, it is a simple process, courtesy to this page, you will need to enter the QNAP console by using SSH. And enter the following:

docker network create fileruncloudflare
docker network connect fileruncloudflare filerun_web_1
docker network connect fileruncloudflare cloudflare-1

It is time to go back to Cloudflare Tunnel, create a Public Hostname of your choice, for example: https://files.example.ga. If you don’t know how to do so, please refer to this tutorial for the configuration.

This time, for the Public Hostname Service, you need to fill in the arrowed IP address with port 80 as shown in the above caption. In this case, it is 172.29.32.3:80.

And voila! You may access your FileRun from the Internet for the first time installation! By using the public hostname you just configured: https://files.example.ga.

Now enjoy the real speed of your NAS brought by FileRun.


Some notes on this tutorial

#Tutorials