Skip to content

Instantly share code, notes, and snippets.

@johannesvogel
Created April 27, 2025 09:59
Show Gist options
  • Save johannesvogel/9d34fb62e6f9fc8db2440a21fcb78063 to your computer and use it in GitHub Desktop.
Save johannesvogel/9d34fb62e6f9fc8db2440a21fcb78063 to your computer and use it in GitHub Desktop.
Piped docker compose example (for TrueNAS)

Piped docker compose example (for TrueNAS)

This is an example of how to setup a working Piped video instance on a system like TrueNAS. You will also need an nginx-proxy-manager instance.

Steps

  1. Add a folder piped to your system.
  2. Add a folder called pgdata in there.
  3. Adapt the Piped Config file (config.properties) and put it in the piped folder
  4. Adapt the docker compose file and add it to TrueNAS (Apps > Discover apps > three dots > Install via YAML)
  5. Configure proxy hosts in Nignx proxy manager

Docker compose file:

  • Replace example.com with your own domain
  • For the two volumes, replace /my-path/ with your own path to the folder you created for piped on your system
  • Replace 1234567890 with your own db password

Piped Config file:

  • Replace example.com with your own domain
  • Replace 1234567890 with your own db password

Nignx proxy manager:

  • Add three domains to the SSL certificates page to create lets encrypt certificates:
    • piped.example.com
    • api.piped.example.com
    • proxy.piped.example.com
  • Setup three Proxy Hosts
    1. piped.example.com which points towards port 32635
    2. api.piped.example.com which points towards port 32636
    3. proxy.piped.example.com which points towards port 32637
services:
bg-helper:
container_name: piped-bg-helper
image: 1337kavin/bg-helper-server:latest
restart: unless-stopped
frontend:
container_name: piped-frontend
depends_on:
- piped
environment:
BACKEND_HOSTNAME: api.piped.example.com
HTTP_MODE: https
image: 1337kavin/piped-frontend:latest
ports:
- '32635:80'
restart: unless-stopped
piped:
container_name: piped-backend
depends_on:
- postgres
image: 1337kavin/piped:latest
ports:
- '32636:8080'
restart: unless-stopped
volumes:
- /my-path/piped/config.properties:/app/config.properties:ro
postgres:
container_name: piped-postgres
environment:
- POSTGRES_DB=piped
- POSTGRES_USER=piped
- POSTGRES_PASSWORD=1234567890
image: pgautoupgrade/pgautoupgrade:16-alpine
restart: unless-stopped
volumes:
- /my-path/piped/pgdata:/var/lib/postgresql/data
proxy:
container_name: piped-proxy
image: 1337kavin/piped-proxy:latest
ports:
- '32637:8080'
restart: unless-stopped
# The port to Listen on.
PORT: 8080
# The number of workers to use for the server
HTTP_WORKERS: 2
# Proxy
PROXY_PART: https://proxy.piped.example.com
# Outgoing HTTP Proxy - eg: 127.0.0.1:8118
#HTTP_PROXY: 127.0.0.1:8118
# Captcha Parameters
#CAPTCHA_BASE_URL: https://api.capmonster.cloud/
#CAPTCHA_API_KEY: INSERT_HERE
# Public API URL
API_URL: https://api.piped.example.com
# Public Frontend URL
FRONTEND_URL: https://piped.example.com
# Enable haveibeenpwned compromised password API
COMPROMISED_PASSWORD_CHECK: true
# Disable Registration
DISABLE_REGISTRATION: false
# Feed Retention Time in Days
FEED_RETENTION: 30
# Disable CPU expensive timers (for nodes with low CPU, at least one node should have this disabled)
DISABLE_TIMERS:false
# RYD Proxy URL (see https://github.com/TeamPiped/RYD-Proxy)
RYD_PROXY_URL:https://ryd-proxy.kavin.rocks
# SponsorBlock Servers(s)
# Comma separated list of SponsorBlock Servers to use
SPONSORBLOCK_SERVERS:https://sponsor.ajay.app,https://sponsorblock.kavin.rocks
# Disable the usage of RYD
DISABLE_RYD:false
# Disable API server (node just runs timers if enabled)
DISABLE_SERVER:false
# Disable the inclusion of LBRY streams
DISABLE_LBRY:false
# How long should unauthenticated subscriptions last for
SUBSCRIPTIONS_EXPIRY:1
# Send consent accepted cookie
# This is required for certain features to work in some countries
CONSENT_COOKIE:true
# Sentry DSN
# Use Sentry to log errors and trace performance
#SENTRY_DSN:INSERT_HERE
# Matrix Client Server URL
MATRIX_SERVER:https://matrix-client.matrix.org
# Matrix Access Token
# If not present, will work in anon mode
#MATRIX_TOKEN:INSERT_HERE
# Geo Restriction Checker for federated bypassing of Geo Restrictions
#GEO_RESTRICTION_CHECKER_URL:INSERT_HERE
# BG Helper URL for supplying PoTokens
BG_HELPER_URL:http://bg-helper:3000
# S3 Configuration Data (compatible with any provider that offers an S3 compatible API)
#S3_ENDPOINT:INSERT_HERE
#S3_ACCESS_KEY:INSERT_HERE
#S3_SECRET_KEY:INSERT_HERE
#S3_BUCKET:INSERT_HERE
# Hibernate properties
hibernate.connection.url:jdbc:postgresql://postgres:5432/piped
hibernate.connection.driver_class:org.postgresql.Driver
hibernate.dialect:org.hibernate.dialect.PostgreSQLDialect
hibernate.connection.username:piped
hibernate.connection.password:1234567890
# Frontend configuration
#frontend.statusPageUrl:changeme
#frontend.donationUrl:changeme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment