Files
materialious/docs/DOCKER-FULL.md
T
2026-02-17 20:28:42 +13:00

5.1 KiB

Step 1: Docker

This Guide is for the docker image wardpearce/materialious-full NOT wardpearce/materialious

Invidious Companion support

public_url MUST be set in Invidious under invidious_companion for companion to work with Materialious.

e.g.

invidious_companion:
  - private_url: "http://companion:8282/companion"
    public_url:  "http://companion.example.com/companion"

Proof-of-work Captcha

Will only work while using HTTPS. If in HTTP set PUBLIC_CAPTCHA_DISABLED to true

Docker Compose

services:
  materialious:
    image: wardpearce/materialious-full:latest
    restart: unless-stopped
    ports:
      - 3000:3000
    environment:
      # Secure secret for signing cookies
      # Not required if VITE_INTERNAL_AUTH is false
      COOKIE_SECRET: ""

      # Database connectiong URI
      # Not required if VITE_INTERNAL_AUTH is false
      # postgresql, mysql2, mariadb & sqlite supported
      # guide here for URL structure https://docs.preset.io/docs/uri-connection-strings
      DATABASE_CONNECTION_URI: "sqlite:///materialious-data/materialious.db"

      # Use Materialious account system.
      PUBLIC_INTERNAL_AUTH: "true"

      # If Auth is required to use this instance.
      # Should be left as true, otherwise anyone can use Materialious proxy.
      PUBLIC_REQUIRE_AUTH: "true"

      # Allow anyone to register
      PUBLIC_REGISTRATION_ALLOWED: "false"
      
      # Disable POW Captcha
      PUBLIC_CAPTCHA_DISABLED: "false"
      
      # Allow any domain in proxy
      # This shouldn't be used unless you KNOW what your doing
      # requires VITE_REGISTRATION_ALLOWED to be false
      # VITE_REQUIRE_AUTH to be true
      # VITE_INTERNAL_AUTH to be true
      # to take effect.
      PUBLIC_DANGEROUS_ALLOW_ANY_PROXY: "false"

      # Optionally set a default Invidious instance
      # This will also whitelist this instance in the proxy.
      PUBLIC_DEFAULT_INVIDIOUS_INSTANCE: ""

      # URL TO RYD (Return YouTube Dislike / https://github.com/Anarios/return-youtube-dislike)
      # Leave blank to disable completely.
      # This will also whitelist this instance in the proxy.
      PUBLIC_DEFAULT_RETURNYTDISLIKES_INSTANCE: "https://returnyoutubedislikeapi.com"

      # URL to Sponsorblock
      # Leave blank to completely disable sponsorblock.
      # This will also whitelist this instance in the proxy.
      PUBLIC_DEFAULT_SPONSERBLOCK_INSTANCE: "https://sponsor.ajay.app"

      # URL to DeArrow
      # This will also whitelist this instance in the proxy.
      PUBLIC_DEFAULT_DEARROW_INSTANCE: "https://sponsor.ajay.app"

      # URL to DeArrow thumbnail instance
      # This will also whitelist this instance in the proxy.
      PUBLIC_DEFAULT_DEARROW_THUMBNAIL_INSTANCE: "https://dearrow-thumb.ajay.app"

      # Look at "Overwriting Materialious defaults" for all the accepted values.
      # This will also whitelist this instance in the proxy.
      PUBLIC_DEFAULT_SETTINGS: '{"themeColor": "#2596be","region": "US"}'

    volumes:
      - materialious-data:/materialious-data

volumes:
  materialious-data: 

Overwriting Materialious defaults

Materialious allows you to overwrite the default values using VITE_DEFAULT_SETTINGS, see SETTINGS for more details.

Please note: These overwrites only apply on 1st load & won't replace existing configuration stored in browser local storage.

tor-proxy:
  image: 1337kavin/alpine-tor:latest
  restart: unless-stopped
  environment:
    - tors=15

ryd-proxy:
  image: 1337kavin/ryd-proxy:latest
  restart: unless-stopped
  depends_on:
    - tor-proxy
  environment:
    - PROXY=socks5://tor-proxy:5566
  ports:
    - 3003:3000

Without TOR

ryd-proxy:
  image: 1337kavin/ryd-proxy:latest
  restart: unless-stopped
  ports:
    - 3003:3000

Modify/add VITE_DEFAULT_RETURNYTDISLIKES_INSTANCE for Materialious to be the reverse proxied URL of RYD-Proxy.

services:
  api_extended:
    image: wardpearce/invidious_api_extended:latest
    restart: unless-stopped
    ports:
      - 3004:80
    environment:
      api_extended_postgre: '{"host": "invidious-db", "port": 5432, "database": "invidious", "user": "kemal", "password": "kemal"}'
      api_extended_allowed_origins: '["https://materialious.example.com"]'
      api_extended_debug: false

      # No trailing backslashes!
      api_extended_invidious_instance: "https://invidious.example.com"
      api_extended_production_instance: "https://syncious.example.com"

Add these additional environment variables to Materialious.

VITE_DEFAULT_API_EXTENDED_INSTANCE: "https://syncious.example.com"

Step 4 (Optional): Self-host PeerJS

Read the official guide.

Add these additional environment variables to Materialious.

# Will differ depending on how you self-host peerjs.
VITE_DEFAULT_PEERJS_HOST: "peerjs.example.com"
VITE_DEFAULT_PEERJS_PATH: "/"
VITE_DEFAULT_PEERJS_PORT: 443