0

I'm configuring Piped on my RPI home lab.

In my router I created DNS records youtube.home, api.youtube.home and proxy.youtube.home with the IP of my RPI.

I download Piped and execute the configure script inputting the three domains and selecting nginx at the end.

If I connect to http://youtube.home:8080 I'm getting page loading but errors everywhere looking for: https://api.youtube.home/config https://api.youtube.home/config https://api.youtube.home/trending?region=US https://api.youtube.home/trending?region=US

Am I missing an SSL certificate and SSL configuration somewhere?

Im asking here because the piped doc is not clear and I am a bit over my head.

looking at my nginx conf files none of them are referencing 443 or an SSL certificate. Can someone help ?

I tried replacing https to http in config.properties but that does not change anything. I don't want to use caddy because I have other services running on the pi.

I know how to create a self signed cert but where do I put it? Do I need to create 443 servers in nginx? I don't understand their logic here.

here are my files: config.properties

PORT: 8080
HTTP_WORKERS: 2

# Proxy
PROXY_PART: https://proxy.youtube.home

# 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.youtube.home

# Public Frontend URL
FRONTEND_URL: https://youtube.home

nginx.conf

user root;
worker_processes auto;

error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;


events {
    worker_connections 1024;
}


http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    server_names_hash_bucket_size 128;

    log_format main '$remote_addr - $remote_user [$time_local] "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';

    access_log /var/log/nginx/access.log main;

    sendfile on;
    tcp_nodelay on;

    keepalive_timeout 65;

    include /etc/nginx/conf.d/*.conf;
}

pipedapi.conf

proxy_cache_path /tmp/pipedapi_cache levels=1:2 keys_zone=pipedapi:4m max_size=2g inactive=60m use_temp_path=off;

upstream backend {
    server piped:8080;
}
server {
    listen 80;
    server_name api.youtube.home;

    location / {
        proxy_cache pipedapi;
        proxy_pass http://backend;
        proxy_http_version 1.1;
        proxy_set_header Connection "keep-alive";
    }
}

piped frontend.conf

upstream frontend {upstream frontend {
    server piped-frontend:80;
}
server {
    listen 80;
    server_name youtube.home;

    location / {
        proxy_pass http://frontend;
        proxy_http_version 1.1;
        proxy_set_header Connection "keep-alive";
    }
}



    server piped-frontend:80;
}
server {
    listen 80;
    server_name youtube.home;

    location / {
        proxy_pass http://frontend;
        proxy_http_version 1.1;
        proxy_set_header Connection "keep-alive";
    }
}

pipedproxy.conf

server {
    listen 80;
    server_name proxy.youtube.home;

    location ~ (/videoplayback|/api/v4/|/api/manifest/) {
        include snippets/ytproxy.conf;
        add_header Cache-Control private always;
    }

    location / {
        include snippets/ytproxy.conf;
        add_header Cache-Control "public, max-age=604800";
    }
}

docker compose

servicesservices:
    piped-frontend:
        image: 1337kavin/piped-frontend:latest
        restart: unless-stopped
        depends_on:
            - piped
        environment:
            BACKEND_HOSTNAME: api.youtube.home
        container_name: piped-frontend
    piped-proxy:
        image: 1337kavin/piped-proxy:latest
        restart: unless-stopped
        environment:
            - UDS=1
        volumes:
            - piped-proxy:/app/socket
        container_name: piped-proxy
    piped:
        image: 1337kavin/piped:latest
        restart: unless-stopped
        volumes:
            - ./config/config.properties:/app/config.properties:ro
        depends_on:
            - postgres
        container_name: piped-backend
    nginx:
        image: nginx:mainline-alpine
        restart: unless-stopped
        ports:
            - "8080:80"
        volumes:
            - ./config/nginx.conf:/etc/nginx/nginx.conf:ro
            - ./config/pipedapi.conf:/etc/nginx/conf.d/pipedapi.conf:ro
            - ./config/pipedproxy.conf:/etc/nginx/conf.d/pipedproxy.conf:ro
            - ./config/pipedfrontend.conf:/etc/nginx/conf.d/pipedfrontend.conf:ro
            - ./config/ytproxy.conf:/etc/nginx/snippets/ytproxy.conf:ro
            - piped-proxy:/var/run/ytproxy
        container_name: nginx
        depends_on:
            - piped
            - piped-proxy
            - piped-frontend
        labels:
            - "traefik.enable=true"
            - "traefik.http.routers.piped.rule=Host(`FRONTEND_HOSTNAME`, `BACKEND_HOSTNAME`, `PROXY_HOSTNAME`)"
            - "traefik.http.routers.piped.entrypoints=websecure"
            - "traefik.http.services.piped.loadbalancer.server.port=8080"
    postgres:
        image: postgres:15
        restart: unless-stopped
        volumes:
            - ./data/db:/var/lib/postgresql/data
        environment:
            - POSTGRES_DB=piped
            - POSTGRES_USER=piped
            - POSTGRES_PASSWORD=changeme
        container_name: postgres
    watchtower:
        image: containrrr/watchtower
        restart: always
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock
            - /etc/timezone:/etc/timezone:ro
        environment:
            - WATCHTOWER_CLEANUP=true
            - WATCHTOWER_INCLUDE_RESTARTING=true
        container_name: watchtower
        command: piped-frontend piped-backend piped-proxy varnish nginx postgres watchtower
volumes:
    piped-proxy: null


:
    piped-frontend:
        image: 1337kavin/piped-frontend:latest
        restart: unless-stopped
        depends_on:
            - piped
        environment:
            BACKEND_HOSTNAME: api.youtube.home
        container_name: piped-frontend
    piped-proxy:
        image: 1337kavin/piped-proxy:latest
        restart: unless-stopped
        environment:
            - UDS=1
        volumes:
            - piped-proxy:/app/socket
        container_name: piped-proxy
    piped:
        image: 1337kavin/piped:latest
        restart: unless-stopped
        volumes:
            - ./config/config.properties:/app/config.properties:ro
        depends_on:
            - postgres
        container_name: piped-backend
    nginx:
        image: nginx:mainline-alpine
        restart: unless-stopped
        ports:
            - "8080:80"
        volumes:
            - ./config/nginx.conf:/etc/nginx/nginx.conf:ro
            - ./config/pipedapi.conf:/etc/nginx/conf.d/pipedapi.conf:ro
            - ./config/pipedproxy.conf:/etc/nginx/conf.d/pipedproxy.conf:ro
            - ./config/pipedfrontend.conf:/etc/nginx/conf.d/pipedfrontend.conf:ro
            - ./config/ytproxy.conf:/etc/nginx/snippets/ytproxy.conf:ro
            - piped-proxy:/var/run/ytproxy
        container_name: nginx
        depends_on:
            - piped
            - piped-proxy
            - piped-frontend
        labels:
            - "traefik.enable=true"
            - "traefik.http.routers.piped.rule=Host(`FRONTEND_HOSTNAME`, `BACKEND_HOSTNAME`, `PROXY_HOSTNAME`)"
            - "traefik.http.routers.piped.entrypoints=websecure"
            - "traefik.http.services.piped.loadbalancer.server.port=8080"
    postgres:
        image: postgres:15
        restart: unless-stopped
        volumes:
            - ./data/db:/var/lib/postgresql/data
        environment:
            - POSTGRES_DB=piped
            - POSTGRES_USER=piped
            - POSTGRES_PASSWORD=changeme
        container_name: postgres
    watchtower:
        image: containrrr/watchtower
        restart: always
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock
            - /etc/timezone:/etc/timezone:ro
        environment:
            - WATCHTOWER_CLEANUP=true
            - WATCHTOWER_INCLUDE_RESTARTING=true
        container_name: watchtower
        command: piped-frontend piped-backend piped-proxy varnish nginx postgres watchtower
volumes:
    piped-proxy: null

0

You must log in to answer this question.

Browse other questions tagged .