[portable] — Tinyfilemanager Docker Compose

version: '3.8'
services:
  tinyfilemanager:
    image: prasath89/tinyfilemanager:latest
    container_name: tinyfilemanager
    restart: unless-stopped
    ports:
      - "8080:80"
    volumes:
      - ./data:/var/www/html/data          # Persistent storage for uploaded files
      - ./config/config.php:/var/www/html/config.php  # Optional: custom config
    environment:
      - USERNAME=admin                      # Optional: set custom username
      - PASSWORD=admin123                   # Optional: set custom password
      - TZ=UTC                              # Timezone
    networks:
      - filemanager-net
networks:
  filemanager-net:
    driver: bridge

Cannot Upload Large Files

Add to docker-compose.yml:

environment:
  - MAX_UPLOAD_SIZE=500M

Backup data

tar -czf tinyfilemanager-backup.tar.gz data/

File Permissions

If you cannot upload files or edit files, it is usually a permission issue on the host machine. Run this command on your host (inside the tinyfilemanager folder) to allow the container to write to the data folder: tinyfilemanager docker compose

# Makes the data folder writable by the container
chmod -R 777 data

(Note: 777 is the easiest for personal servers. For stricter security, use chown to match the container user ID, usually www-data / ID 33). version: '3

Option 2: Advanced Setup (MySQL + Docker Management)

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. Cannot Upload Large Files Add to docker-compose

6.4 Run as Non-Root User

The official image already runs Nginx and PHP-FPM as www-data (UID 82). But ensure mounted volumes have correct permissions:

chown -R 82:82 ./data

7.2 TFM + Jellyfin / Plex

If you run a media server, mount your media folders into TFM to upload/manage movies, subtitles, and metadata directly from the web.

6.6 Disable PHP Execution

If you don’t need to execute PHP files, you can mount a custom Nginx config that serves .php files as plain text or denies them.


Notes and recommended changes