Skip to main content
Docker deployment is highly recommended as it automatically sets up Plank, Prowlarr (torrent search), and FlareSolverr (captcha solving) with proper networking.

Quick Start

1

Clone the repository

git clone https://github.com/logscore/plank.git
cd plank
2

Create environment file

cp .env.example .env
Edit .env with your settings (see Environment Variables).
3

Start services

docker compose -f docker/docker-compose.yml --env-file .env up -d
4

Verify deployment

Check that all services are running:
docker ps
You should see three containers: plank, prowlarr, and flaresolverr.

Services

The Docker Compose setup includes three services:

Plank (Main Application)

  • Ports: 3300 (web interface), 6881 (torrent client)
  • Volumes:
    • plank-db - SQLite database
    • plank-data - Downloaded media files
    • ./media - Media library (optional, configurable via MEDIA_PATH)
  • Health Check: HTTP endpoint at http://localhost:3000/health

Prowlarr (Torrent Indexer)

  • Port: 9696
  • Image: lscr.io/linuxserver/prowlarr:latest
  • Volume: prowlarr-config - Configuration and API keys
  • Purpose: Searches torrent indexers and provides results to Plank

FlareSolverr (Captcha Solver)

  • Port: 8191
  • Image: ghcr.io/flaresolverr/flaresolverr:latest
  • Purpose: Bypasses captchas on torrent sites

Docker Compose Configuration

The complete docker-compose.yml configuration:
docker/docker-compose.yml
services:
  plank:
    container_name: plank
    build:
      context: ..
      dockerfile: docker/Dockerfile
    ports:
      - "3300:3000"
      - "6881:6881/tcp"
      - "6881:6881/udp"
    environment:
      - ENABLE_FILE_STORAGE=true
      - DATABASE_URL=/app/db/plank.db
      - TMDB_API_KEY=${TMDB_API_KEY}
      - PROWLARR_URL=http://prowlarr:9696
      - PROWLARR_API_KEY=${PROWLARR_API_KEY:-}
      - OPENSUBTITLES_API_KEY=${OPENSUBTITLES_API_KEY:-}
      - OPENSUBTITLES_USERNAME=${OPENSUBTITLES_USERNAME:-}
      - OPENSUBTITLES_PASSWORD=${OPENSUBTITLES_PASSWORD:-}
      - FLARESOLVERR_URL=http://flaresolverr:8191
      - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
      - BETTER_AUTH_URL=${BETTER_AUTH_URL}
      - ORIGIN=${ORIGIN:-http://localhost:3300}
      - PORT=3000
      - HOST=0.0.0.0
      - PROWLARR_CONFIG_PATH=/prowlarr-config/config.xml
    volumes:
      - plank-db:/app/db
      - plank-data:/app/data
      - ${MEDIA_PATH:-./media}:/app/data/library
      - prowlarr-config:/prowlarr-config:ro
    depends_on:
      prowlarr:
        condition: service_started

  prowlarr:
    image: lscr.io/linuxserver/prowlarr:latest
    container_name: prowlarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=${TZ:-America/New_York}
    volumes:
      - prowlarr-config:/config
    ports:
      - "9696:9696"
    restart: unless-stopped
    depends_on:
      - flaresolverr

  flaresolverr:
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: flaresolverr
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
      - TZ=${TZ:-America/New_York}
    ports:
      - "8191:8191"
    restart: unless-stopped

volumes:
  plank-db:
  plank-data:
  prowlarr-config:

Essential Environment Variables

The ORIGIN variable is required for Docker deployments to prevent CSRF errors. It must match the URL you use to access Plank.
Minimal .env for Docker:
.env
# TMDB API (required for metadata)
TMDB_API_KEY=your_tmdb_api_key

# Authentication (auto-generated secret)
BETTER_AUTH_SECRET=your-random-32-char-secret
BETTER_AUTH_URL=http://localhost:3300

# CSRF Protection (must match browser URL)
ORIGIN=http://localhost:3300

# Prowlarr (API key auto-configured)
PROWLARR_API_KEY=

# Optional: Subtitles
OPENSUBTITLES_API_KEY=
OPENSUBTITLES_USERNAME=
OPENSUBTITLES_PASSWORD=

Management Commands

Start Services

docker compose -f docker/docker-compose.yml --env-file .env up -d

Stop Services

docker compose -f docker/docker-compose.yml down

View Logs

# All services
docker compose -f docker/docker-compose.yml logs -f

# Specific service
docker compose -f docker/docker-compose.yml logs -f plank
docker compose -f docker/docker-compose.yml logs -f prowlarr

Restart Services

# All services
docker compose -f docker/docker-compose.yml restart

# Specific service
docker compose -f docker/docker-compose.yml restart plank

Rebuild Image

docker compose -f docker/docker-compose.yml up -d --build

Update to Latest Version

git pull
docker compose -f docker/docker-compose.yml up -d --build

Volumes and Data

Named Volumes

Docker automatically manages these volumes:
  • plank-db - SQLite database at /app/db/plank.db
  • plank-data - Downloaded torrent files at /app/data
  • prowlarr-config - Prowlarr configuration and API keys

Host Bind Mount

The media library can be mounted from your host:
volumes:
  - ${MEDIA_PATH:-./media}:/app/data/library
Set MEDIA_PATH in .env to customize:
MEDIA_PATH=/mnt/media

Backup Data

# Backup database
docker cp plank:/app/db/plank.db ./plank-backup.db

# Backup volumes
docker run --rm -v plank-db:/data -v $(pwd):/backup alpine tar czf /backup/plank-db-backup.tar.gz /data

Networking

Internal Docker Network

Services communicate using Docker service names:
  • Plank → Prowlarr: http://prowlarr:9696
  • Plank → FlareSolverr: http://flaresolverr:8191
Use service names (e.g., prowlarr) for internal communication, not localhost.

Port Mapping

ServiceInternal PortHost Port
Plank Web30003300
Plank Torrent68816881
Prowlarr96969696
FlareSolverr81918191

Custom Ports

To change host ports, edit docker-compose.yml:
ports:
  - "8080:3000"  # Access Plank on port 8080
Update ORIGIN accordingly:
ORIGIN=http://localhost:8080

Prowlarr Configuration

1

Access Prowlarr

Navigate to http://localhost:9696 after starting the containers.
2

Add indexers

Go to IndexersAdd Indexer and configure your preferred torrent sources:
  • YTS (movies, small file sizes)
  • 1337x (general content)
  • The Pirate Bay (largest library)
  • Nyaa.si (anime)
  • EZTV (TV shows)
3

Configure FlareSolverr (if needed)

Some indexers require FlareSolverr for captcha solving:
  • Go to SettingsIndexers
  • Set FlareSolverr URL: http://flaresolverr:8191
4

Verify API key

Plank automatically reads the API key from Prowlarr’s config. To verify:
  • Go to Plank Settings
  • Check that Prowlarr is connected

Troubleshooting

This CSRF error occurs when ORIGIN doesn’t match your browser URL.Solution:
.env
# If accessing via IP
ORIGIN=http://192.168.1.100:3300

# If accessing via domain
ORIGIN=https://plank.yourdomain.com
Restart after changing:
docker compose -f docker/docker-compose.yml restart plank
Check for port conflicts:
# Check if ports are in use
sudo netstat -tlnp | grep -E '3300|9696|8191|6881'
View detailed logs:
docker compose -f docker/docker-compose.yml logs
Verify Prowlarr is running:
docker ps | grep prowlarr
Test connectivity from Plank container:
docker exec plank curl http://prowlarr:9696
Check Prowlarr logs:
docker compose -f docker/docker-compose.yml logs prowlarr
The Plank container runs as the default user. For custom user IDs:
docker-compose.yml
plank:
  user: "1000:1000"  # Add this line
Or set ownership on host:
sudo chown -R 1000:1000 ./media
Monitor container resources:
docker stats
Limit memory in docker-compose.yml:
plank:
  deploy:
    resources:
      limits:
        memory: 2G

Production Deployment

For production deployments:
  1. Use a reverse proxy (Nginx, Traefik, Caddy) for HTTPS
  2. Set strong secrets:
    BETTER_AUTH_SECRET=$(openssl rand -hex 32)
    
  3. Configure firewall to restrict access to ports 9696, 8191
  4. Enable restart policies (already configured in docker-compose.yml)
  5. Set up regular backups of volumes
  6. Use a VPN for torrent traffic (see Security)

Next Steps

Environment Variables

Complete reference for all configuration options

Security Best Practices

Configure secure deployments and VPN protection

Torrent Indexers

Configure Prowlarr indexers for best results

Troubleshooting

Common issues and solutions

Build docs developers (and LLMs) love