Filerun
Stack
access your files anywhere through self-hosted secure cloud storage, file backup and sharing for your photos, videos, files and more.
Template by mediadepot·Source
Services
db
Configuration
Imagemariadb:10.1/var/lib/mysql : /opt/mediadepot/apps/filerun/dbMYSQL_ROOT_PASSWORD=filerunrootMYSQL_USER=filerunMYSQL_PASSWORD=filerunMYSQL_DATABASE=filerunImage details
app
Configuration
Imageafian/filerun80/user-files/depot/tvshows : /media/storage/tvshows/user-files/depot/movies : /media/storage/movies/user-files/depot/music : /media/storage/music/user-files/depot/photos : /media/storage/photos/user-files/depot/ebooks : /media/storage/ebooks/user-files/depot/documents : /media/storage/documents/user-files/depot/downloads : /media/storage/downloads/user-files/depot/software : /media/storage/software/user-files/depot/blackhole : /media/temp/blackhole/user-files/depot/processing : /media/temp/processing/var/www/html : /opt/mediadepot/apps/filerun/webFR_DB_HOST=dbFR_DB_PORT=3306FR_DB_NAME=filerunFR_DB_USER=filerunFR_DB_PASS=filerunAPACHE_RUN_USER=www-dataAPACHE_RUN_USER_ID=15000APACHE_RUN_GROUP=www-dataAPACHE_RUN_GROUP_ID=15000alwaysStandalone Install
Select an install method, to see config/commands for deploying Filerun
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select Filerun, fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
Original stackfile
The compose file this template deploys, straight from its repo:
version: '2'
# https://docs.filerun.com/docker
services:
db:
image: mariadb:10.1
environment:
MYSQL_ROOT_PASSWORD: filerunroot
MYSQL_USER: filerun
MYSQL_PASSWORD: filerun
MYSQL_DATABASE: filerun
volumes:
- /opt/mediadepot/apps/filerun/db:/var/lib/mysql
networks:
- filerun
app:
restart: always
image: afian/filerun
ports:
- "80"
volumes:
- /media/storage/tvshows:/user-files/depot/tvshows
- /media/storage/movies:/user-files/depot/movies
- /media/storage/music:/user-files/depot/music
- /media/storage/photos:/user-files/depot/photos
- /media/storage/ebooks:/user-files/depot/ebooks
- /media/storage/documents:/user-files/depot/documents
- /media/storage/downloads:/user-files/depot/downloads
- /media/storage/software:/user-files/depot/software
- /media/temp/blackhole:/user-files/depot/blackhole
- /media/temp/processing:/user-files/depot/processing
- /opt/mediadepot/apps/filerun/web:/var/www/html
labels:
- "traefik.enable=true"
- "traefik.http.services.filerun.loadbalancer.server.port=80"
- "traefik.http.routers.filerun.rule=Host(`filerun.${DEPOT_DOMAIN_NAME}`)"
- 'traefik.http.routers.filerun.entrypoints=websecure'
- 'traefik.http.routers.filerun.tls.certresolver=mydnschallenge'
environment:
- FR_DB_HOST=db
- FR_DB_PORT=3306
- FR_DB_NAME=filerun
- FR_DB_USER=filerun
- FR_DB_PASS=filerun
- APACHE_RUN_USER=www-data
- APACHE_RUN_USER_ID=15000
- APACHE_RUN_GROUP=www-data
- APACHE_RUN_GROUP_ID=15000
depends_on:
- db
links:
- db:db
networks:
- traefik
- filerun
networks:
traefik:
external: true
filerun:
Or deploy it directly from the source:
git clone https://github.com/mediadepot/templates
cd templates
docker compose -f stacks/filerun/docker-compose.yml up -dMore install options in our documentation.
Container Documentation
db Documentation
MariaDB Server is a high performing open source relational database, forked from MySQL.
Serve Filerun on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.
Proxying filerun.example.com to http://app:80
Add this to your Caddyfile
filerun.example.com {
reverse_proxy http://app:80
}Check the logs first
Nine times out of ten the logs tell you exactly what went wrong.
- In Portainer, go to Containers, click the container, then Logs. Or run
docker logs <container> - Exit codes help too:
137means killed, usually out of memory.126or127means the command inside the image is broken.
Published on a random port
This template exposes 80 without setting a host port,
so Docker picks a random free one on every deploy.
- Find it in the Ports column of Portainer's container list, or with
docker port <container>
Permission denied on volumes
If the logs show "permission denied", the app can't write to its data folder on the host.
- Fix the ownership:
sudo chown -R 1000:1000 /opt/mediadepot/apps/filerun/db(and the same for the other mapped folders)
Image won't pull
Test the pull directly on the host: docker pull mariadb:10.1
- "manifest unknown" means the tag no longer exists.
- "toomanyrequests" is the Docker Hub rate limit. Log in with
docker loginto raise it. - "no space left on device" means a full disk. Reclaim space with
docker system prune
"exec format error"
This means the image was built for a different CPU architecture than your server.
- Check yours with
uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.
Container keeps restarting
The always restart policy relaunches the app after every crash, so the real error can scroll past.
- Check the logs right after a restart, the last few lines before it died are the useful ones.
- Get the exit code with
docker inspect <container> --format '{{.State.ExitCode}}' - Still stuck? Redeploy once with the restart policy set to
noso the failure stays visible.
Stack won't deploy
Compose stacks fail fast on small mistakes, and Portainer shows the reason just above the editor.
- YAML only accepts spaces for indentation, a single tab breaks the whole file.
Raise an issue
Found something which isn't working as it should? Here's how to report it.
- Bug within the app: Open an issue within filerun's repo
- Template not working: Open an issue on mediadepot/templates
- This website not working: Open an issue on lissy93/portainer-templates
A Compose stack
Filerun is a Compose stack, a set of containers (2 of them) defined in one file and brought up together by Portainer, then started and stopped as a single app.
The services
This stack is built from 2 containers that run side by side. Here's each one, with the image it runs and anything it waits for first:
dbrunsmariadb:10.1apprunsafian/filerun, starts after db
Ports
A port is the door the app answers on. Here the app exposes a port but leaves the host side blank, so Docker picks a free one for you. It opens:
80, published on a random host port
Volumes
A volume is where Filerun keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:
/var/lib/mysqlfrom/opt/mediadepot/apps/filerun/dbon the host/user-files/depot/tvshowsfrom/media/storage/tvshowson the host/user-files/depot/moviesfrom/media/storage/movieson the host/user-files/depot/musicfrom/media/storage/musicon the host/user-files/depot/photosfrom/media/storage/photoson the host/user-files/depot/ebooksfrom/media/storage/ebookson the host/user-files/depot/documentsfrom/media/storage/documentson the host/user-files/depot/downloadsfrom/media/storage/downloadson the host/user-files/depot/softwarefrom/media/storage/softwareon the host/user-files/depot/blackholefrom/media/temp/blackholeon the host/user-files/depot/processingfrom/media/temp/processingon the host/var/www/htmlfrom/opt/mediadepot/apps/filerun/webon the host
Environment variables
Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Filerun takes 13 of them, all with defaults you can leave alone or tweak:
MYSQL_ROOT_PASSWORD, defaults tofilerunrootMYSQL_USER, defaults tofilerunMYSQL_PASSWORD, defaults tofilerunMYSQL_DATABASE, defaults tofilerunFR_DB_HOST, defaults todbFR_DB_PORT, defaults to3306FR_DB_NAME, defaults tofilerunFR_DB_USER, defaults tofilerunFR_DB_PASS, defaults tofilerunAPACHE_RUN_USER, defaults towww-dataAPACHE_RUN_USER_ID, defaults to15000APACHE_RUN_GROUP, defaults towww-dataAPACHE_RUN_GROUP_ID, defaults to15000
Restart policy
The restart policy here is always, so Docker brings Filerun back up after a crash and again when the server reboots. Good for anything you want running around the clock. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).
Networking
Portainer puts these services on one shared private network, so they can find each other by name (like db) while only the ports above are open to you.
Portainer app templates
Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Filerun up. Add the template list to Portainer once, then deploying Filerun is a click rather than a wall of config.