FileRun installation using Docker

1. Install Docker

Please see https://docs.docker.com/engine/install/

2. Create the FileRun "docker-compose.yml" file

Create a text file named docker-compose.yml:

 1vim docker-compose.yml

and paste the following inside, adjusting the settings accordingly to your needs:

 1services:
 2  db:
 3    image: mariadb:12.2
 4    environment:
 5      MARIADB_ROOT_PASSWORD: your_mysql_root_password
 6      MYSQL_USER: your_filerun_username
 7      MYSQL_PASSWORD: your_filerun_password
 8      MYSQL_DATABASE: your_filerun_database
 9      MARIADB_AUTO_UPGRADE: 1
10    volumes:
11      - /filerun/db:/var/lib/mysql
12  web:
13    image: filerun/filerun:exp
14    user: "1001:1001"
15    environment:
16      FR_DB_HOST: db
17      FR_DB_PORT: 3306
18      FR_DB_NAME: your_filerun_database
19      FR_DB_USER: your_filerun_username
20      FR_DB_PASS: your_filerun_password
21    depends_on:
22      - db
23    links:
24      - db:db
25    ports:
26      - "80:80"
27    volumes:
28      - /filerun/html:/var/www/html
29      - /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.

In other words, if you use the above configuration text as it is, you just need to create two empty folders, /filerun/html and /filerun/user-files and you can start the FileRun Docker container up:

 1mkdir /filerun /filerun/html /filerun/user-files /filerun/db

3. Start the containers

And start FileRun up using the following command:

 1docker compose up -d

FileRun is now ready, and you can access it with your browser.

After completing the web-based installation

You will want to set the home folder path of the FileRun Superuser account to /user-files.

SSL/HTTPS

Please see this guide.

Troubleshooting Desktop resync

If your desktop sync app redownload everything every time your server restarts, it may be because your Docker container is changing the device ID of the volume mounts. To fix this, please use the option

 1$config['system']['webdav']['skip_device_id_for_etag'] = true;

See this page.

Adding Full-Text Search

Your server would need at least 2GB of RAM memory for ElasticSearch.

Edit your existing docker-compose.yml to include the two additional services (tika and elasticsearch) and link them by service name:

 1services:
 2  [...]
 3  web:
 4    image: [FileRun]
 5    links:
 6      - db
 7      - tika
 8      - elasticsearch
 9  tika:
10    image: logicalspark/docker-tikaserver
11  elasticsearch:
12    image: docker.elastic.co/elasticsearch/elasticsearch-wolfi:9.2.1
13    container_name: elasticsearch
14    environment:
15      - "discovery.type=single-node"
16      - "xpack.security.http.ssl.enabled=false" #disable SSL
17      - "xpack.security.enabled=false" #disable authentication
18      - "xpack.security.enrollment.enabled=false" #disable authentication
19      - cluster.name=docker-cluster
20      - bootstrap.memory_lock=true
21      - "ES_JAVA_OPTS=-Xms2g -Xmx2g"
22    ulimits:
23      memlock:
24        soft: -1
25        hard: -1
26    mem_limit: 6g
27    volumes:
28      - /filerun/esearch:/usr/share/elasticsearch/data

For more information on running ElasticSearch via Docker, please see the official documenation.

Please note the above volumes configuration for the Elasticsearch index data, with the mount path set to /usr/share/elasticsearch/data. Chown this folder 1000:1000.

Enable full-text file indexing

To configure the file indexing feature please follow this guide.

The Elasticsearch Host URL that needs to be configured is http://elasticsearch:9200.

The Apache Tika server hostname should be configured with tika and the port number 9998.