Tweaking FileRun can be very troublesome for beginners, as it require some understanding of some specific commands or location. But once you know that, your FileRun should run automatically without little maintenance.

Connecting FileRun’s Webdav service

As mentioned in my installation tutorial, FileRun will not automatically index your folders, so any changes made outside of FileRun (for example you upload some files to the folder by using QTS’s File Station or performed some Qfiling tasks), FileRun will not be aware of that. It might cause some searching errors. So it is advised to upload / modify your files by using the FileRun platform.

As Webdav included its own Webdav server, you may use it to replace QNAP’s own server. And all modifications made through FileRun’s Webdav will inform FileRun.

To connect that, you may need to bear in mind this path, it will connect to your Home Directory:

https://[your public hostname]/dav.php/%40Home/

How to Enter FileRun docker for Tweaking

Most of the time, you will need to access your NAS’s console via SSH. After entering the console, you will need to enter your FileRun docker console. Use this command, replace filerun_web_1 with the name of the container you may find in your Container Station:

docker exec -it filerun_web_1 sh

Installation of AES Crypt

In FileRun’s demo site, AES Crypt is installed and can perform well. But in the docker image we use on our QNAP NAS, it is not installed by default. Here are the steps of enabling it:

  1. Enter your FileRun docker console.

  2. Download AES Crypt by using this command

    curl https://www.aescrypt.com/download/v3/linux/aescrypt-3.16.tgz > install.tgz 
    
  3. Unzip the file, tar -xzf install.tgz, a folder named aescrypt-x.xx appears (whereas the x.xx is the version)

  4. You shall find a README.md in that folder, follow the instruction to compile and install it.

  5. It will show you the installation location: /usr/bin/aescrypt, copy this path

    • You may go to this directory to check the existence of this binary.
  6. Then go back to FileRun, login as Superuser, enter the Control panel, navigate to Plugins > AES File Encryption and paste the above copied location to Path the AESCrypt.

  7. And this is done, you may try to encrypt a file by selecting a file, right click and Open with AES File Encryption.


Make LibreOffice Preview and Thumbnail creation workable

As we are using the Docker version of FileRun, the default setting is not working, you will need to do the following things to make the Preview and Thumbnail creation works, you may need to refer this page for more info:

  1. Enter your FileRun docker console.

  2. Create or edit customizables/config.php by this command

    vim customizables/config.php
    
  3. Add the following to the document:

    <?php
    putenv('HOME=/tmp');
    
    • Note the <?php is the standard beginning of PHP files.
  4. Press Esc button and key in wq! to save the file.

  5. Then go to your FileRun Control panel, navigate to Files > Thumbs and previews > Enable LibreOffice support, make sure it is enabled.

  6. For the previews of Office files, it should work. Please note that the Thumbnail creation needs a little bit of time. It is normal.

Note: In the newest version 2021.1.0, this issue seems to the fixed. Leave it here for future reference.


Show CJKV characters in LibreOffice (docker version)

For the default FileRun docker image, it includes no typeface which supports CKJV characters, therefore, for those documents, FileRun would return thumbnails and previews with countless squares.

To fix this issue, we need to perform the following:

  1. Choose a decent font and download them to your server, we use the open sourced Source Hans font developed by Adobe:

    wget https://github.com/adobe-fonts/source-han-sans/raw/release/Variable/TTF/SourceHanSansTC-VF.ttf
    
  2. Copy the font into FileRun docker:

    docker cp ./SourceHanSansTC-VF.ttf [your container id]:/usr/share/fonts/
    
    • Get your container id by using docker ps command.
  3. Enter your docker:

    docker exec -it filerun_web_1 sh
    
  4. Scan the font directory and rebuild the cache:

    fc-cache -vf
    
  5. You may see a list of CKJV font installed by checking if they are installed correctly (Chinese characters are shown as an example):

    fc-list :lang=zh
    
  6. If you see a list of fonts shown, then you can just restart your FileRun container, and voila! You can generate thumbnails and preview documents with CJKV characters correctly.


HTML Sync problem - Cloudflare version fix

If you use FileRun with Nextcloud or Owncloud to perform sync jobs, some documents might fail in syncronization, particularly html files. Owncloud or Nextcloud will return error messages regarding ‘e-tag’. If you use Cloudflare in your network structure, a quick fix can tackle this problem.

Navigate to your Cloudflare dashboard, under Caching, choose Cache Rules(I assume you are as poor as me, using the free version of Cloudflare).

Create a cache rule with the following specifications:

  • User Agent contains ownCloud or nextCloud.
  • Enable strong ETag header
  • Clear your Cloudflare cache under Caching > Configuration > Purge Cache > Purge Everything.

It should fix the problem.