Tinyfilemanager Docker Compose Updated
services: tinyfilemanager: image: tinyfilemanager/tinyfilemanager:master container_name: tinyfilemanager restart: always ports: - "8080:80" volumes: # Mount the folder you want to manage to /var/www/html/data - /path/to/your/files:/var/www/html/data # (Optional) Persist config if you plan to edit config.php directly # - ./config.php:/var/www/html/config.php Use code with caution. Copied to clipboard Essential Guide Details
This ensures that files created by the container have the correct ownership on your host system.
: To manage specific host files, mount the desired host path to /var/www/html/data or another specified root path within the container. Advanced Configuration
: The container expects the files it manages to be located at /var/www/html/data inside the container. Ensure your host path in the volumes section is an absolute path for reliability. Custom Configuration : tinyfilemanager docker compose
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"
docker exec -it tinyfilemanager sh vi tinyfilemanager.php # or use nano if installed
Create a file named docker-compose.yml : Advanced Configuration : The container expects the files
TinyFileManager requires a configuration file to manage users and access permissions. Create a file named config.php in the same directory. nano config.php Use code with caution.
Binds a local configuration file so you can customize settings permanently. Step 3: Configure Security and Users
Check if port is available:
Update docker-compose.yml to use .env :
Mount this file into your docker-compose.yml under the volumes section of the service: - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:ro Use code with caution. 3. Implement Automatic Updates
docker-compose logs -f
volumes: - ./config.php:/var/www/html/config.php:ro
