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
- Tweaks of FileRun on your QNAP NAS (that would be in another page)
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.
- Click
Create
andCreate Application
in Container Station
-
- The benefit of using Container Station to Create this Application is that you may restart the service by using QNAP’s WebGUI, you don’t need to login to the SSH management console that often.
- And you can delete and make some changes to this application without using the console. It can save some time.
- The benefit of using Container Station to Create this Application is that you may restart the service by using QNAP’s WebGUI, you don’t need to login to the SSH management console that often.
# 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:
- In the above document, you only need to change three things.
MYSQL_ROOT_PASSWORD
: give it a strong password of your choice- 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
underenvironment
ports:
, you may edit the former one, let’s say999
rather than888
, but please don’t change the latter80
volumes
, this is the setting to include what folders to your FileRun service. Please do not change the first one/var/www/html
-
-
- For the remaining, here comes the format:
:/user-files
is the root directory of all folders, map it with the most commonly used folder you will be using, in my case, it would be/share/Vault
for me.- You can map shared folders from other storage pool to FileRun,
/share/Multimedia
is another shared folder located in another storage pool, I map it under/user-files/Multimedia
. - Please note that after the installation, you will be seeing an empty shadow folder when you access through QNAP’s File Station. It is normal to see that.
- You can map shared folders from other storage pool to FileRun,
- For the remaining, here comes the format:
-
- Now click
Create
and wait for the installation, it will create two containers namedfilerun_web_1
andfilerun_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
-
- Note that a
fileruncloudflare
virtual switch will be created and connecting two container servicesfilerun_web_1
andcloudflare-1
together. After creating that, refresh your Network & Virtual Switch, you shall be seeing a new virtual switch appeared and connecting the services you will need. Please see caption below.
- Note that a
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
- Please note you may add the mapped user files later, by editing the Docker compose file, but please note that if you configure some settings in the docker (for example edited the
/etc/crontab
for some customized cron jobs), these settings would be replaced. So plan ahead what folders you may need to map. - If you want to use the Photos / Album functions on FileRun, you may realize it is empty. FileRun will not perform indexing or thumbnail creation automatically, please refer my Tweak tutorial for more information.