How to Install ViewTube on Your Synology NAS

How to Install ViewTube on Your Synology NAS

ViewTube is an alternative YouTube frontend that lets you watch, search and discover YouTube videos without ads or tracking. ViewTube is like Piped and Invidious. It’s built to be mobile and desktop friendly, with dark and light themes, and a touch-friendly video player with gestures. You can create an account separately from YouTube, read comments, watch playlists, subscribe to channels and receive push notifications for new uploads. In this step by step guide I will show you how to installĀ ViewTubeĀ on yourĀ Synology NASĀ using Docker & Portainer.

šŸ’”Note:Ā This guide works perfectly with the latest version of ViewTube v.0.17.0

  • 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

Go toĀ File Station and open the docker folder. Inside the docker folder, create one new folder and name it viewtube. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

ViewTube Synology NAS Set up 1

  • STEP 4

Now create three new folders inside the viewtube folder that you have previously created at STEP 3 and name them data, db, redis.Ā Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

ViewTube Synology NAS Set up 2

  • STEP 5

Right click on the viewtube folder that you have previously created at STEP 3 then click Properties. Follow the instructions in the image below.

ViewTube Synology Permission 1

  • STEP 6

Go to the Permission tab then click Advanced options. From the drop-down menu choose “Make inherited permissions explicit“. Follow the instructions in the image below.

ViewTube Synology Permission 2

  • STEP 7

Select Everyone then click the Edit tab. Follow the instructions in the image below.

ViewTube Synology Permission 3

  • STEP 8

Check all Read and Write Permissions. Click Done. Follow the instructions in the image below.

ViewTube Synology Permission 4

  • STEP 9

After you click Done on STEP 8, check “Apply to this folder, sub-folders and files“. Click Save. Follow the instructions in the image below.

ViewTube Synology Permission 5

  • STEP 10

Log into Portainer using your username and password. On the left sidebar in Portainer, click on StacksĀ thenĀ + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 11

In the Name field type in viewtube. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

version: '3.9'
services:
  viewtube:
    image: mauriceo/viewtube:dev
    container_name: ViewTube
    depends_on:
       mongodb:
         condition: service_healthy
       redis:
         condition: service_healthy
    networks:
      - viewtube
    volumes:
      - /volume1/docker/viewtube/data:/data:rw
    environment:
      - VIEWTUBE_DATABASE_HOST=mongodb
      - VIEWTUBE_REDIS_HOST=redis
      - VIEWTUBE_CLUSTERED=false
      - YTDL_NO_UPDATE=true
    ports:
      - 8066:8066
    restart: on-failure:5
    
  mongodb:
     restart: on-failure:5
     image: mongo:4.4
     container_name: ViewTube-DB
     networks:
        - viewtube
     volumes:
        - /volume1/docker/viewtube/db:/data/db:rw
        - /volume1/docker/viewtube/db:/data/configdb:rw
     healthcheck:
       test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
       interval: 10s
       timeout: 10s
       retries: 5
     
  redis:
    image: redis
    container_name: ViewTube-REDIS
    mem_limit: 256m
    mem_reservation: 50m
    cpu_shares: 768
    networks:
      - viewtube
    security_opt:
      - no-new-privileges:true
    read_only: true
    user: 1026:100
    healthcheck:
      test: ["CMD-SHELL", "redis-cli ping || exit 1"]
    volumes:
      - /volume1/docker/viewtube/redis:/data:rw
    environment:
      TZ: Europe/Bucharest
    restart: on-failure:5
networks:
  viewtube:

Note: Before you paste the code above in the Web editor area below, change the value numbers for user with your own UID and GID values.Ā 1026 is my personal UID value and 100 is my personal GID value. You have to type in your own values. (Follow my step by step guide on how to do this.)
Note: Before you paste the code above in the Web editor area below, change the value for TZ.Ā (Select your current Time Zone from this list.) Europe/Bucharest is my own Time Zone value. You have to type in your own Time Zone.

ViewTube Synology NAS Set up 3

  • STEP 12

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.

ViewTube Synology NAS Set up 4

  • STEP 13

If everything goes right, you will see the following message at the top right of your screen: ā€œSuccess Stack successfully deployedā€œ.

ViewTube Synology NAS Set up 5

  • STEP 14

Go back to STEP 1 or you will deal with karma šŸ™‚.

  • STEP 15

The installation process can take up to a few seconds/minutes. It will depend on your Internet speed connection. Now open your browser and type inĀ http://Synology-ip-address:8066Ā At the top right of the page, click on the user icon.Ā Follow the instructions in the image below.

ViewTube Synology NAS Set up 6

  • STEP 16

Click Settings. Follow the instructions in the image below.

ViewTube Synology NAS Set up 7

  • STEP 17

Select the options you prefer.

ViewTube Synology NAS Set up 8

Enjoy ViewTube!

Note: If you want to run the ViewTube container over HTTPS, check How to Run Docker Containers Over HTTPS. In order to make ViewTube work over https, itā€™s also mandatory to set up WebSocket as well as additional environment variables in the ViewTube container as in the example below.

- VIEWTUBE_SECURE=true
- VIEWTUBE_PROXY_URL=https://viewtube.yourname.synology.me
- VIEWTUBE_CORS_ORIGIN=https://viewtube.yourname.synology.me

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 ViewTube 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 Wednesday / August 28th, 2024 at 11:42 PM