Tinyfilemanager Docker Compose __hot__ -

version: '3.8'

In your config.php , restrict high-risk file extensions (like .php , .sh , .exe ) from being uploaded or executed within public folders. To continue setting up your environment, tell me: Will you access this locally or over the public internet ? What is the average file size you need to upload?

allows you to define your volumes and ports in a reusable YAML file. Docker Docs docker-compose.yml Configuration: tinyfilemanager tinyfilemanager/tinyfilemanager container_name : tinyfilemanager /your/local/data :/var/www/html/data # Files you want to manage

data/ : A bind-mounted host directory where TinyFileManager will read and write files. Step 2: Configuring the Docker Compose File tinyfilemanager docker compose

Here is an advanced docker-compose.yml that includes (a modern reverse proxy) and automatic Let's Encrypt SSL.

# Optional: Mount a custom config.php if you need to override default settings # - ./config.php:/var/www/html/config.php Use code with caution. Copied to clipboard 3. Key Configuration Options

Set environment variable:

Always change the default login credentials after your first login. The default credentials (admin/admin@123 and user/12345) are well-known and pose a significant security risk if left unchanged.

mkdir tiny-file-manager cd tiny-file-manager

services: tinyfilemanager: image: tinyfilemanager/tinyfilemanager:latest container_name: tinyfilemanager restart: unless-stopped ports: - "8080:80" volumes: - ./data:/var/www/html/data # Optional: mount entire host directory for full access # - /home/user/myfiles:/var/www/html/mounted environment: - TFM_USERNAME=admin - TFM_PASSWORD=admin123 - TFM_ALLOWED_EXTENSIONS=php,txt,jpg,png,pdf,zip networks: - tfm_network version: '3

Exposing a file manager over plain HTTP is dangerous. Anyone on your network can sniff credentials, and browsers will mark your site as insecure. Let's integrate a reverse proxy.

First, create a dedicated folder for your project. This keeps your configuration and data organized. mkdir tinyfilemanager && cd tinyfilemanager Use code with caution. Step 2: Create the Docker Compose File

Then reference them in your compose file: allows you to define your volumes and ports

Run the following command from within your project directory:

返回顶部