A self-hosted media server for streaming movies via torrents.
β οΈ This repo is under heavy development and we dont have a consistent way to migrat your media data in your loal db or on the file system when we make breaking changes. Use this project at your own peril.
- Add magnet links and stream while downloading
- Browse and search your movie collection
- Search for movies and TV shows, add to library or stream directly, just like Netflix
- Access to any movie or show
- Secure user accounts
- Profile-like organizations with admin controls
- Docker ready
- Get subtitles in any language
bash <(curl -fsSL https://raw.githubusercontent.com/logscore/plank/master/scripts/deploy.sh)The script will install dependencies, clone the repo, configure environment, and start the app.
IMPORTANT: This software is provided for educational and legitimate use only. Users are solely responsible for ensuring compliance with their local copyright laws and regulations.
- Copyright Laws: Check your country's copyright laws before using torrents
- File Safety: I as the developer have no control over torrent content, safety, or legality
- Use at Your Own Discretion: All torrent downloads are at your own risk
- Privacy Protection: Strongly consider using a torrent-ready VPN for privacy protection
- Use a reputable VPN or tunnel service for all torrent activities
- Scan downloaded files with antivirus software (soon-to-be-feature)
- Verify file contents before opening
- Never download suspicious or unverified torrents
- Never run executable likes like .exe, .bat, .scr unless you explicitly intend to (ie. video games)
- Provides a media streaming interface for torrent content
- Integrates with Prowlarr for torrent search functionality
- Does NOT host, upload, or distribute any copyrighted material accessible on the internet
The fastest way to get started is my running the script above. It handles nearly everything for you.
We recommend using Docker for installation as it automatically sets up Prowlarr (media torrent searching) and FlareSolverr (captchas) for torrent browsing.
If you wish to use the bare metal version, you will need to manually run those services. That documentation can be found here and here.
You can also opt out of those services by not configuring them if you want to manually add media files to your media library via magnet links. The choice is yours.
Torrent indexers are the sources that provide torrent search results. Choose based on your content preferences:
Recommended for most users seeking movies, TV shows, and general content:
- YTS - Movies only, high quality, small file sizes
- 1337x - Well-established tracker, mixed content types (not stable sometimes)
- The Pirate Bay - Largest library, requires careful verification of media
Recommended for anime enthusiasts:
- Nyaa.si - Largest anime torrent repository
- AnimeTosho - Automated mirroring service, high reliability
- AniDex - Alternative anime source with good organization
Recommended for TV series focus:
- EZTV - Specialized in TV series, recent episodes
- TorrentGalaxy - Good TV/movie mix, active community
- TorLock - Verified torrents focus, fewer fake files
Look it up yourself, you filthy animal
Update your .env file with these essential variables:
# Database
DATABASE_URL=./plank.db
# Where the files are saved when downloaded
DATA_PATH=./data
# Get yours here https://www.themoviedb.org/settings/api
TMDB_API_KEY=your_tmdb_api_key_here
# Prowlarr (Torrent Search)
PROWLARR_URL=http://prowlarr:9696 # Use service name 'prowlarr' if inside docker, or localhost:9696 if bare metal
PUBLIC_PROWLARR_URL=${PROWLARR_URL}
PROWLARR_API_KEY= # We recommend leaving this blank when running fully self hosted. Configured automatically
# OpenSubtitles (Subtitle Downloads)
# Create and account and get API key at https://www.opensubtitles.com/consumers
OPENSUBTITLES_API_KEY=
OPENSUBTITLES_USERNAME=
OPENSUBTITLES_PASSWORD=
# Authentication
BETTER_AUTH_SECRET=super-secret-32-char-string
BETTER_AUTH_URL=http://localhost:3300
# Reserved for future functionality. Keep as true
ENABLE_FILE_STORAGE=true
PORT=3300
ORIGIN=http://localhost:3300 # Required for Docker CSRF protectionIn an ineractive shell:
-
Start containers:
docker compose -f docker/docker-compose.yml --env-file .env up -d
-
Check container status:
docker ps
You should see
plank,prowlarr, andflaresolverrrunning. -
Test Prowlarr:
- Access
http://localhost:9696 - Try searching for content on your configured indexers
- Access
-
Test Plank:
- Access
http://localhost:3300 - Create an account and try searching for content
- Access
VPN Usage (Strongly Recommended):
- Use a reputable torrent VPN service for all torrent activities
- Ensure your VPN has a no-logs policy
- Consider a kill switch feature for connection drops
Network Security:
- Run this software in a Docker container (already configured)
- Consider network isolation if possible
- Use TailScale for direct encrypted access
- Keep your system and antivirus software updated
File Safety:
- Scan downloaded files before opening
- Never run executable files (.exe, .bat, .scr)
- Verify file sizes and types match expectations
- Use file scanning tools for suspicious content
Issue: Can't access Prowlarr api
- Solution: Check if containers are running:
docker ps - Solution: Ensure you have the Prowlarr api key by checking the
/settingspage - Solution: Verify port 9696 isn't blocked by firewall (if running outside the docker network)
- Solution: Restart containers:
docker compose restart
Issue: Indexer configuration fails
- Solution: Check internet connection
- Solution: Try different indexer url (some may be down)
- Solution: Check if FlareSolverr is running (needed for some indexers)
Issue: No search results
- Solution: Ensure you have a TMDB api key configured in
/settingssearch results are dependant on TMDB - Solution: Ensure at least one indexer is configured and tested
- Solution: Check if FlareSolverr is running:
http://localhost:8191 - Solution: Try different search terms
Issue: Container fails to start
- Solution: Check environment variables in
.envfile - Solution: Verify Docker is running:
docker version - Solution: Check port conflicts (3300, 9696, 8191)
- Solution: Sometimes distro mirrors are out of sync. Wait and try again.
Issue: "Cross-site POST form submissions are forbidden"
- Solution: Ensure
ORIGINenv var matches your browser URL (e.g.http://localhost:3300,http://192.168.1.2:3300, etc.)
Issue: Permission errors
- Solution: Check volume permissions for media directories
- Solution: Ensure proper PUID/PGID if using custom user IDs
Issue: Slow torrent downloads
- Solution: Use an ethernet connection instead of WiFi
- Solution: Configure port forwarding for 6881 (the exposed torrent client port) in your router
- Solution: Check VPN isn't throttling speeds, or that it isnt blocking torrent traffic all together
- Solution: Verify tracker health in Prowlarr
Issue: Memory usage high
- Solution: Monitor Docker container resource usage
- Solution: Limit or expand the container resources
- Solution: Restart the containers in case of a memory leak
- Check container logs:
docker compose logs -f - Verify each service is accessible individually
- Test with minimal configuration first
- Check GitHub issues for known problems
- Email me if you genuinely can't figure it out. No AI slop or you're insta-banned.
I highly recommend running
./scripts/deployfor Docker and bare metal deployments.
git clone https://github.com/logscore/plank.git
cd plank
cp .env.example .env
# Edit your .env file with your environment variables
docker compose -f docker/docker-compose.yml --env-file .env up -dgit clone https://github.com/logscore/plank.git
cd plank
cp .env.example .env
# Edit your .env file with your environment variables
npm install
npm run build
npx drizzle-kit migrate
node build| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
Path to SQLite database | ./plank.db |
DATA_PATH |
Where downloaded files are saved | ./data |
TMDB_API_KEY |
TMDB API key for metadata (get one here) | - |
PROWLARR_URL |
Prowlarr API URL | http://localhost:9696 |
PUBLIC_PROWLARR_URL |
Public-facing Prowlarr URL | Same as PROWLARR_URL |
PROWLARR_API_KEY |
Prowlarr API key (auto-configured when fully self hosted) | - |
OPENSUBTITLES_API_KEY |
OpenSubtitles API key (get one here) | - |
OPENSUBTITLES_USERNAME |
OpenSubtitles account username | - |
OPENSUBTITLES_PASSWORD |
OpenSubtitles account password | - |
BETTER_AUTH_SECRET |
Auth secret (auto-generated) | - |
BETTER_AUTH_URL |
Base URL for auth | http://localhost:3300 |
ENABLE_FILE_STORAGE |
Save downloaded files to disk (reserved for future use) | true |
PORT |
Server port | 3300 |
ORIGIN |
Public URL for CSRF (Docker) | http://localhost:3300 |
We develop in Docker containers with live reloads. It keeps the dev environment and production closely knit so writing code that runs everywhere is easier.
Fill in your .env then run:
./scripts/dev.sh