This guide assumes you have Docker (with Docker Compose) installed on a server with at least 1GB of RAM memory.

Create a text file named docker-compose.yml and paste the following inside:

version: '2'

    image: mariadb:10.1
      MYSQL_ROOT_PASSWORD: filerun
      MYSQL_USER: filerun
      MYSQL_PASSWORD: filerun
      MYSQL_DATABASE: filerun
      - /filerun/db:/var/lib/mysql
    image: logicalspark/docker-tikaserver
    container_name: filerun
      - db
      - db
      - tika
    image: afian/filerun
      - "80:80"
      - /filerun/html:/var/www/html
      - /filerun/user-files:/user-files

Please note the above volumes configuration. There are two folders you need to configure. One for the FileRun application files. It can be located in any empty folder and must have the mount path set to /var/www/html and one for the FileRun user files, with the mount path set to /user-files.

And start FileRun up using the following command:

docker-compose up -d

FileRun should be now up and running and you can access it with your browser.

The default FileRun credentials are as follows:

* Username: superuser

* Password: superuser

Enable full-text file indexing

This step is optional and needed only if you will be using the full text indexing to search files based on their textual contents.

To configure the file indexing feature:

  • Sign in as superuser
  • Open the Control panel
  • Browse to Files > Indexing
  • Check Enable file indexing
  • Set tika as the Apache Tika server hostname
  • Set 9998 as the Port number
  • Click Test server to make sure the settings work. You should see a green message reading Apache Tika 1.16 (the version number can differ)

Setup the indexing process

From the server's command line, open a console inside the FileRun Docker container:

docker exec -it filerun bash

filerun is the container name. You can use the ID if a name is not given. To check the Docker containers ID, you can use the docker ps command.

Now, install vim and cron inside the container:

apt-get update
apt-get install vim
apt-get install cron

Create the indexation script file which will run periodically:

vim /var/www/html/cron/

and paste (press “i” and then “CTRL+V”) the following inside:

php /var/www/html/cron/process_search_index_queue.php

Press “Esc” then “:wq” and “Enter” to save the changes and close the editor.

Adjust the script file permissions by making it executable:

chmod 755 /var/www/html/cron/

Open the crontab:

vim /etc/crontab

and paste (press “i” and then “CTRL+V”) the following at its end (leaving the empty line at the bottom of the file):

* * * * * root /var/www/html/cron/

Press “Esc” then “:wq” and “Enter” to save the changes and close the editor.

Start cron:

/etc/init.d/cron start

You should now have FileRun automatically index the contents of all the file types supported by Apache Tika. Note that the above cronjob runs once every minute and it may take a minute or two for a file to be found by its content after uploading.

Important note: If your FileRun Docker container ever gets stopped for some reason, you will need to redo the whole “Setup the indexing process” section.