Tinyfilemanager Docker Compose [upd] May 2026
TinyFileManager Docker Compose a lightweight, single-file PHP management interface that lets you handle your server files directly from a web browser Key Features Provided
Using the Docker Compose setup unlocks several built-in capabilities: Built-in Code Editor : Edit files in-browser using the Cloud9 IDE with syntax highlighting for over 150 languages. Comprehensive File Operations
: Drag-and-drop uploads, folder creation, and the ability to move, copy, or securely delete files. Advanced Previews
: Instant viewing for images, videos, audio, and even PDF/DOC/PPT files via Google/Microsoft viewers. Multi-User Access Control
: Manage multiple accounts with specific folder permissions and secure session-based authentication. Archive Management : Compress and extract files directly on the server in docker-compose.yml You can use the following configuration based on the official Docker Hub instructions to get started: Tiny File Manager tinyfilemanager tinyfilemanager/tinyfilemanager container_name : tinyfilemanager # Map your local directory to the container's data folder /path/to/your/files :/var/www/html/data Use code with caution. Copied to clipboard Important Notes tinyfilemanager docker compose
: It is highly recommended to change the default credentials ( admin/admin@123 ) immediately in your configuration. Persistence : Mount a local volume to /var/www/html/data to ensure your files persist after container restarts. Environment Setup
: For production-like environments, consider using a specialized image like moonbuggy2000/tinyfilemanager which includes Nginx and PHP-FPM for better performance. Docker Hub or setting up a reverse proxy for secure remote access? Tiny File Manager - Awesome Docker Compose
version: '3'
services:
tinyfilemanager:
image: tinyspeck/tinyfilemanager
ports:
- "80:80"
volumes:
- ./data:/var/www/html
environment:
- USER=your_username
- PASS=your_password
Let me explain what each part does:
image: Specifies the Docker image to use.tinyspeck/tinyfilemanageris the official image for Tiny File Manager.ports: Maps port 80 of the host machine to port 80 in the container, allowing you to access the file manager from outside the container.volumes: Maps a directory on your host (./data) to a directory in the container (/var/www/html). This is where your files will be stored and accessed through Tiny File Manager. Make sure to create adatadirectory in the same directory as yourdocker-compose.ymlfile.environment: Sets environment variables in the container. Here, you can set a username (USER) and password (PASS) for logging into Tiny File Manager.
Basic usage
- Start: docker-compose up -d
- Access: http://localhost:8080 (or your domain)
- Login: username/password from env variables
- Files saved under ./data on host.
Part 5: Advanced Configuration
The basic setup works, but let’s tailor TinyFileManager for real-world use. Let me explain what each part does:
Step 1: The Basic docker-compose.yml for TinyFile Manager
Let's start with the absolute minimum configuration. Create a directory for our project:
mkdir tinyfilemanager-docker && cd tinyfilemanager-docker
touch docker-compose.yml
Open docker-compose.yml and paste the following:
version: '3.8'services: tinyfilemanager: image: tinyfilemanager/tinyfilemanager:latest container_name: tinyfilemanager ports: - "8080:80" volumes: # Mount the directory you want to manage - /path/to/your/local/data:/var/www/html/data # Optional: Persist TFM's own config (user accounts, auth string) - tinyfilemanager_config:/var/www/html/config environment: - TFM_USERNAME=admin - TFM_PASSWORD=SecurePass123! - TFM_ALLOW_EXTERNAL=true restart: unless-stopped
volumes: tinyfilemanager_config:
Explanation of directives:
- Image: The official, maintained image by the project author.
- Ports: Maps host port
8080to container port80. After starting, access viahttp://your-server-ip:8080. - Volumes:
- The first bind mount is crucial. Replace
/path/to/your/local/datawith an absolute path on your host (e.g.,/mnt/storageor./filesfor a relative path). This is where your actual files live. - The second is a named volume storing the
config.phpand user auth data so your credentials persist across container updates.
- The first bind mount is crucial. Replace
- Environment Variables: Override default login (default is
admin/admin@123). Note: Do not use weak passwords here; we will harden later.
5.1 Changing the Container’s Document Root
By default, the container serves /var/www/html/. If you want TFM to manage a different directory (e.g., your entire /home), change the volume mount:
volumes:
- /home:/var/www/html/data:ro # ro = read-only if you want safety
Warning: Giving read-write access to sensitive host directories is powerful but dangerous. Use with caution. image : Specifies the Docker image to use