Skip to main content

Docker Compose Deployments

M3U Editor offers multiple Docker Compose configurations to fit different use cases.

Deployment Options Overview

Use CaseFileDescription
⭐⭐ Recommendeddocker-compose.proxy.ymlModular setup with separate containers for m3u-editor, m3u-proxy, and Redis
Simpledocker-compose.aio.ymlAll-in-one container for quick testing
VPNdocker-compose.proxy-vpn.ymlModular deployment with Gluetun VPN
Advanceddocker-compose.external-all.ymlFully modular with external Nginx
Advanceddocker-compose.external-all-caddy.ymlFully modular with Caddy (auto HTTPS)

File: docker-compose.proxy.yml

This is the recommended production setup with separate containers for each service.

Features

  • ✅ Hardware acceleration support (via external m3u-proxy)
  • ✅ Independent service scaling
  • ✅ Redis-based stream pooling
  • ✅ Easy to manage and troubleshoot

Quick Start

# Download configuration
curl -O https://raw.githubusercontent.com/m3ue/m3u-editor/master/docker-compose.proxy.yml

# Generate secure tokens
echo "M3U_PROXY_TOKEN=$(openssl rand -hex 32)" >> .env
echo "PG_PASSWORD=$(openssl rand -base64 32)" >> .env
echo "APP_URL=http://localhost" >> .env

# Start services
docker-compose -f docker-compose.proxy.yml up -d

Services Included

ServiceContainerPortPurpose
m3u-editorm3u-editor36400Main application
m3u-proxym3u-proxy8085*Streaming proxy
Redism3u-redis6379*Caching and pooling
PostgreSQLembedded5432*Database

*Internal ports only

Management Commands

# View logs
docker-compose -f docker-compose.proxy.yml logs -f

# Restart services
docker-compose -f docker-compose.proxy.yml restart

# Stop services
docker-compose -f docker-compose.proxy.yml down

# Check status
docker-compose -f docker-compose.proxy.yml ps

All-in-One Deployment

File: docker-compose.aio.yml

Simple single-container deployment for testing and development.

Features

  • ✅ Quick setup
  • ✅ Minimal configuration
  • ❌ No hardware acceleration support

Quick Start

# Download configuration
curl -O https://raw.githubusercontent.com/m3ue/m3u-editor/master/docker-compose.aio.yml

# Start service
docker-compose -f docker-compose.aio.yml up -d
warning

This setup does not support hardware acceleration for transcoding.

VPN Deployment

File: docker-compose.proxy-vpn.yml

Route proxy traffic through a VPN using Gluetun.

Features

  • ✅ All modular deployment benefits
  • ✅ VPN protection for streaming
  • ✅ Support for multiple VPN providers

Quick Start

# Download configuration
curl -O https://raw.githubusercontent.com/m3ue/m3u-editor/master/docker-compose.proxy-vpn.yml

# Configure VPN settings in the file
# Edit the gluetun service section

# Start services
docker-compose -f docker-compose.proxy-vpn.yml up -d

Supported VPN Providers

Gluetun supports many providers including:

  • NordVPN
  • ProtonVPN
  • ExpressVPN
  • Mullvad
  • And many more...

See Gluetun documentation for configuration details.

Fully External Deployment

Files:

  • docker-compose.external-all.yml (Nginx)
  • docker-compose.external-all-caddy.yml (Caddy)

Maximum modularity with all services externalized.

Features

  • ✅ Complete service isolation
  • ✅ Independent scaling
  • ✅ External reverse proxy (Nginx or Caddy)
  • ✅ Automatic HTTPS (Caddy only)

Architecture

Nginx/Caddy (Reverse Proxy)
├── M3U Editor (PHP-FPM)
├── M3U Proxy (Streaming)
├── PostgreSQL (Database)
└── Redis (Cache)

When to Use

Choose fully external deployment when you need:

  • Maximum control over each service
  • Independent service updates
  • Custom reverse proxy configuration
  • Multi-instance deployment

See the deployment guides for detailed configuration options.

Persisting User-Uploaded Assets

By default, all compose configurations mount ./data for configuration persistence and a named volume for PostgreSQL. However, files uploaded through the Assets manager (logos, images, etc.) are stored in storage/app/public inside the container and are not covered by the ./data mount.

Without a volume for this path, uploaded assets will be lost whenever the container is recreated (e.g., after a docker-compose pull and up).

All provided compose files already include this volume:

volumes:
- ./storage:/var/www/html/storage/app/public

This maps a local ./storage directory next to your compose file to the container's public storage path. The directory will be created automatically by Docker on first run.

tip

If you are migrating an existing deployment, copy the contents of the container's /var/www/html/storage/app/public to your local ./storage directory before adding the volume mount to avoid losing existing uploaded files.

Port Configuration

Default ports for each setup:

ServiceDefault PortCustomizable
M3U Editor36400APP_PORT
M3U Proxy38085M3U_PROXY_PORT
PostgreSQL5432PG_PORT
Redis6379REDIS_PORT
Nginx8080NGINX_PORT
Caddy8080CADDY_PORT

Change ports by setting environment variables in your .env file.

Next Steps