Tinyfilemanager Docker Compose May 2026
Use this if you want a dedicated database (better for many users/large directories) or if you want Tiny File Manager to be able to manage your Docker containers.
docker compose logs -f tinyfilemanager
Run the following command from within your project directory:
docker compose up -d
Check if it's running:
docker compose ps
Now, open your browser to http://localhost:8080. You should see the elegant TinyFile Manager interface prompting for a password. Enter your defined credentials. tinyfilemanager docker compose
Troubleshooting:
version: '3'services: db: image: mariadb:latest container_name: tfm_db environment: MYSQL_ROOT_PASSWORD: my_secret_root_password MYSQL_DATABASE: tinyfilemanager MYSQL_USER: tfm_user MYSQL_PASSWORD: tfm_password volumes: - ./db_data:/var/lib/mysql restart: unless-stopped
web: image: tinyfilemanager/tinyfilemanager:master container_name: tinyfilemanager ports: - "8080:80" volumes: - ./data:/var/www/html/data # Allow TinyFilemanager to manage your docker containers (Optional) - /var/run/docker.sock:/var/run/docker.sock environment: - TZ=America/New_York # Database Configuration - DB_HOST=db - DB_NAME=tinyfilemanager - DB_USER=tfm_user - DB_PASS=tfm_password depends_on: - db restart: unless-stoppedUse this if you want a dedicated database
version: '3.8'services: tinyfilemanager: image: pritunl/tinyfilemanager:latest container_name: tinyfilemanager restart: unless-stopped ports: - "8080:80" volumes: - ./data:/var/www/html - ./uploads:/var/www/html/uploads - ./config:/config environment: - USERNAME=$TFM_USERNAME:-admin - PASSWORD=$TFM_PASSWORD:-admin123 - TZ=$TZ:-America/New_York - MAX_UPLOAD_SIZE=100M - THEME=dark networks: - webnet logging: driver: "json-file" options: max-size: "10m" max-file: "3"
networks: webnet: driver: bridge
One of TinyFile Manager’s most powerful (and dangerous) features is the ajax terminal. It gives you command-line access to the container. To enable it, you must mount the Docker socket or provide SSH access – but an easier way is to set the environment variable:
environment:
- TFM_ALLOW_EXTERNAL=true
- TFM_ALLOW_TERMINAL=true
Security Warning: Only enable the terminal if you absolutely trust all users who have the TFM password. The terminal runs as www-data inside the container. To make it useful, you may need additional tools (apt-get install -y vim git) – but this requires building a custom Dockerfile. Run the following command from within your project