YouTube has an extremely invasive privacy policy which relies on using user data in unethical ways. You give them a lot of data – ranging from ideas, music taste, content, political opinions, and much more than you think. By using Piped, you can freely watch and listen to content without the fear of prying eyes watching everything you are doing. One of the things I most appreciate about Piped is that you can watch YouTube videos without any kind of commercial interruption. In this step by step guide I will show you how to install Piped on your Synology NAS using Docker & Portainer.
STEP 1
Please Support My work by Making a Donation.
STEP 2
Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.
STEP 3
Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.
STEP 4
Install Text Editor via Synology “Package Center”. (Mandatory STEP.) If you already have Text Editor installed on your Synology NAS, skip this STEP.
STEP 5
Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.
STEP 6
Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.
STEP 7
Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.
STEP 8
Now click the “Create” button. Follow the instructions in the image below.
STEP 9
After you click the Create button, the window below will open. Follow the instructions in the image below.
On the General area, set the Reverse Proxy Name description: type in Piped-PROXY. After that, add the following instructions:
Source:
Protocol: HTTPS
Hostname: pipedproxy.yourname.synology.me
Port: 443
Check Enable HSTS
Destination:
Protocol: HTTP
Hostname: localhost
Port: 8045
STEP 10
On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.
STEP 11
Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.
STEP 12
Now click the “Create” button. Follow the instructions in the image below.
STEP 13
After you click the Create button, the window below will open. Follow the instructions in the image below.
On the General area, set the Reverse Proxy Name description: type in Piped-API. After that, add the following instructions:
Source:
Protocol: HTTPS
Hostname: pipedapi.yourname.synology.me
Port: 443
Check Enable HSTS
Destination:
Protocol: HTTP
Hostname: localhost
Port: 8045
STEP 14
On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.
STEP 15
Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.
STEP 16
Now click the “Create” button. Follow the instructions in the image below.
STEP 17
After you click the Create button, the window below will open. Follow the instructions in the image below.
On the General area, set the Reverse Proxy Name description: type in Piped. After that, add the following instructions:
Source:
Protocol: HTTPS
Hostname: piped.yourname.synology.me
Port: 443
Check Enable HSTS
Destination:
Protocol: HTTP
Hostname: localhost
Port: 8045
STEP 18
On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.
STEP 19
Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it piped. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 20
Now create two new folders inside the piped folder that you created at STEP 19 and name them db and piped-proxy. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 21
Download the config.properties file by clicking the blue link below. Using notepad or something similar on your computer, change the 3 lines in this file then save it. Follow the instructions in the image below. 🔒Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!
After PROXY_PART: Type in your own synology.me DDNS that you have previously created at STEP 9.
After API_URL: Type in your own synology.me DDNS that you have previously created at STEP 13.
After FRONTEND_URL: Type in your own synology.me DDNS that you have previously created at STEP 17.
STEP 22
Upload the modified config.properties file below in the piped folder that you have previously created at STEP 19. Follow the instructions in the image below.
STEP 23
Download (click on the blue link below), unzip, then upload the files inside the piped folder that you have previously created at STEP 19. Follow the instructions in the image below. 🔒Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!
STEP 24
It’s mandatory to have Text Editor installed as per the instructions at STEP 4. Double click on the pipedapi.conf file. Change the server_name with your own synology.me DDNS that you have previously created at STEP 13. Click X at the top right to save the file. Follow the instructions in the image below.
STEP 25
It’s mandatory to have Text Editor installed as per the instructions at STEP 4. Double click on the pipedfrontend.conf file. Change the server_name with your own synology.me DDNS that you have previously created at STEP 17. Click X at the top right to save the file. Follow the instructions in the image below.
STEP 26
It’s mandatory to have Text Editor installed as per the instructions at STEP 4. Double click on the pipedproxy.conf file. Change the server_name with your own synology.me DDNS that you have previously created at STEP 9. Click X at the top right to save the file. Follow the instructions in the image below.
STEP 27
Log into Portainer using your username and password. In the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.
STEP 28
In the Name field type in piped. Follow the instructions in the image below.
version: "3.9"
services:
db:
image: postgres:16
container_name: Piped-DB
hostname: piped-db
mem_limit: 512m
cpu_shares: 768
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "piped", "-U", "pipeduser"]
timeout: 45s
interval: 10s
retries: 10
volumes:
- /volume1/docker/piped/db:/var/lib/postgresql/data:rw
environment:
POSTGRES_DB: piped
POSTGRES_USER: pipeduser
POSTGRES_PASSWORD: pipedpass
restart: on-failure:5
piped-proxy:
image: 1337kavin/piped-proxy:latest
container_name: Piped-PROXY
hostname: piped-proxy
mem_limit: 512m
cpu_shares: 768
security_opt:
- no-new-privileges:true
read_only: true
volumes:
- /volume1/docker/piped/piped-proxy:/app/socket:rw
environment:
UDS: 1
restart: on-failure:5
piped-back:
image: 1337kavin/piped:latest
container_name: Piped-BACKEND
hostname: piped-backend
mem_limit: 2g
cpu_shares: 768
security_opt:
- no-new-privileges:true
healthcheck:
test: stat /etc/passwd || exit 1
volumes:
- /volume1/docker/piped/config.properties:/app/config.properties:ro
restart: on-failure:5
depends_on:
db:
condition: service_healthy
piped-front:
image: 1337kavin/piped-frontend:latest
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/pipedapi.yourname.synology.me/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
container_name: Piped-FRONTEND
hostname: piped-frontend
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:80
restart: on-failure:5
depends_on:
piped-back:
condition: service_healthy
nginx:
image: nginx:mainline-alpine
container_name: Piped-NGINX
hostname: nginx
mem_limit: 512m
cpu_shares: 768
security_opt:
- no-new-privileges:true
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:80
ports:
- 8045:80
volumes:
- /volume1/docker/piped/nginx.conf:/etc/nginx/nginx.conf:ro
- /volume1/docker/piped/pipedapi.conf:/etc/nginx/conf.d/pipedapi.conf:ro
- /volume1/docker/piped/pipedproxy.conf:/etc/nginx/conf.d/pipedproxy.conf:ro
- /volume1/docker/piped/pipedfrontend.conf:/etc/nginx/conf.d/pipedfrontend.conf:ro
- /volume1/docker/piped/ytproxy.conf:/etc/nginx/snippets/ytproxy.conf:ro
- /volume1/docker/piped/piped-proxy:/var/run/ytproxy:rw
restart: on-failure:5
depends_on:
piped-back:
condition: service_healthy
piped-front:
condition: service_healthy
piped-proxy:
condition: service_started
Note: On the entrypoint area type in your own synology.me DDNS that you have previously created at STEP 13 without https at the beginning.
STEP 29
Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.
Please wait approximately 5/10 minutes for the installation to be completed.
STEP 30
If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.
STEP 31
Go back to STEP 1 or you will deal with karma 🙂
STEP 32
Now open your browser and type in your HTTPS/SSL (STEP 17) certificate like this https://piped.yourname.synology.me In my case it’s https://piped.mariushosting.synology.me If everything goes right, you will see the Piped homepage with the Trending videos. Search for something in complete autonomy. Follow the instructions in the image below.
Enjoy Piped!
Take a look at the Piped Full Documentation.
Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find out how to update the Piped container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.
This post was updated on Monday / August 26th, 2024 at 12:30 AM