Project One-Click: Need help installing on Synology NAS

@dea321

OK, so I decided to spin-up a DSM 7.2 VM to see if any issues have crept into OliveTin -- and the good news is that the answer is no, everything continues to work as expected.

I did find one error in the Docker Compose you're using, that I'm guessing you introduced somewhere along the line. The volumes section should look like this:

    volumes:
      - ${HOST_DIR}/olivetin:/config # Add the parent directory on your Docker you'd like to use.
      - ${DVR_SHARE}:/mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT} # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR network share.
      - ${LOGS_SHARE}:/mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT}_logs # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR logs network share.
      #- ${DVR2_SHARE}:/mnt/${CHANNELS_DVR2_HOST}-${CHANNELS_DVR2_PORT} # Note that these volume mounts should always be to /mnt/hostname-port or /mnt/ip-port (dash rather than a colon between).
      #- ${LOGS2_SHARE}:/mnt/${CHANNELS_DVR2_HOST}-${CHANNELS_DVR2_PORT}_logs # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR logs network share.

I believe you inadvertently edited the part to the right of the : on the ${DVR_SHARE} and ${LOGS_SHARE} lines, and removed the /mnt from the path name in the container.

Also you changed port number in the static-file-server section of the stack from :8080 (which is the port number inside the container), to 8081 -- you should have changed the HOST_SFS_PORT environment variable to 8081. Generally speaking, with the way I've setup these docker composes, you shouldn't be changing anything in the compose -- everything is done in the environment section.

I believe if you fix the above, everything in the OliveTin Healthcheck should pass except for the first test of your Channels DVR URL, which will likely still fail until we figure out what's going on with that.

@dea321

Expanding a bit on the above, here's what I installed after creating the DSM 7.2 VM:

Channels DVR, following the instructions here:

Portainer, following this online guide:

OliveTin, using this Docker Compose:

 version: '3.9'
services:
  olivetin: # This docker-compose requires little or no editing. Set the Environment variables section of Portainer.
    # GitHub home for this project: https://github.com/bnhf/OliveTin.
    # Docker container home for this project with setup instructions: https://hub.docker.com/repository/docker/bnhf/olivetin.
    image: bnhf/olivetin:${TAG} # Add the tag like latest or test to the environment variables below.
    container_name: olivetin
    hostname: olivetin
    dns_search: ${DOMAIN} # For Tailscale users using Magic DNS, add your Tailnet (tailxxxxx.ts.net) to use hostnames for remote nodes, otherwise use your local domain name.
    ports:
      - ${HOST_PORT}:1337
    environment:
      - CHANNELS_DVR=${CHANNELS_DVR_HOST}:${CHANNELS_DVR_PORT} # Add your Channels DVR server in the form CHANNELS_DVR_HOST=<hostname or ip> and CHANNELS_DVR_PORT=<port>.
      #- CHANNELS_DVR_ALTERNATES=${CHANNELS_DVR2_HOST}:${CHANNELS_DVR2_PORT} # Space separated list of alternate Channels DVR servers to choose from in the form hostname:port or ip:port.
      - CHANNELS_CLIENTS=${CHANNELS_CLIENTS} # Space separated list of Channels DVR clients you'd like notifications sent to in the form hostname or IP.
      - ALERT_SMTP_SERVER=${ALERT_SMTP_SERVER} # SMTP server to use for sending alert e-mails. smtp.gmail.com:587 for example.
      - ALERT_EMAIL_FROM=${ALERT_EMAIL_FROM} # Sender address for alert e-mails.
      - ALERT_EMAIL_PASS=${ALERT_EMAIL_PASS} # SMTP "app" password established through GMail or Yahoo Mail. Do not use your everyday e-mail address.
      - ALERT_EMAIL_TO=${ALERT_EMAIL_TO} # Recipient address for alert e-mails.
      - UPDATE_YAMLS=${UPDATE_YAMLS} # Set this to true to update config.yaml.
      - UPDATE_SCRIPTS=${UPDATE_SCRIPTS} # Set this to true to update all included scripts.
      - TZ=${TZ} # Add your local timezone in standard linux format. E.G. US/Eastern, US/Central, US/Mountain, US/Pacific, etc.
      - PORTAINER_TOKEN=${PORTAINER_TOKEN} # Generate via <username> dropdown (upper right of WebUI), "My account", API tokens.
      - PORTAINER_HOST=${PORTAINER_HOST} # Hostname or IP of the Docker host you're running Portainer on.
    volumes:
      - ${HOST_DIR}/olivetin:/config # Add the parent directory on your Docker you'd like to use.
      - ${DVR_SHARE}:/mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT} # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR network share.
      - ${LOGS_SHARE}:/mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT}_logs # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR logs network share.
      #- ${DVR2_SHARE}:/mnt/${CHANNELS_DVR2_HOST}-${CHANNELS_DVR2_PORT} # Note that these volume mounts should always be to /mnt/hostname-port or /mnt/ip-port (dash rather than a colon between).
      #- ${LOGS2_SHARE}:/mnt/${CHANNELS_DVR2_HOST}-${CHANNELS_DVR2_PORT}_logs # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR logs network share.
    restart: unless-stopped

  static-file-server:
    image: halverneus/static-file-server:latest
    container_name: static-file-server
    dns_search: ${DOMAIN}
    ports:
      - ${HOST_SFS_PORT}:8080
    environment:
      - FOLDER=${FOLDER}
    volumes:
      - ${HOST_DIR}/olivetin/data:${FOLDER}
    restart: unless-stopped

#volumes: # Use this section if you've setup docker volumes named channels-dvr and channels-dvr-logs, with CIFS or NFS, to bind to /mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT} and  /mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT}_logs inside the container. Set DVR_SHARE=channels-dvr and LOGS_SHARE=channels-dvr-logs in this example.
  #channels-dvr:
    #external: true
  #channels-dvr-logs:
    #external: true

And these environment variables:

TAG=latest
DOMAIN=localdomain
HOST_PORT=1337
CHANNELS_DVR_HOST=192.168.110.57
CHANNELS_DVR_PORT=8089
CHANNELS_CLIENTS=
ALERT_SMTP_SERVER=smtp.gmail.com:587
[email protected]
ALERT_EMAIL_PASS=xxxxxxxxxxxxxxxx
[email protected]
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Central
HOST_DIR=/volume1/docker
DVR_SHARE=/volume1/ChannelsDVR
LOGS_SHARE=/var/packages/ChannelsDVR/target/channels-dvr
HOST_SFS_PORT=8081
FOLDER=/web
PORTAINER_TOKEN=[Redacted]
PORTAINER_HOST=192.168.110.57

OliveTin Post-Install Healthcheck:

Checking your OliveTin installation...
(extended_check=false)

----------------------------------------

Checking that your selected Channels DVR server (192.168.110.57:8089) is reachable by URL:
HTTP Status: 200 indicates success...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1276  100  1276    0     0  1246k      0 --:--:-- --:--:-- --:--:-- 1246k
HTTP Status: 200
Effective URL: http://192.168.110.57:8089/

----------------------------------------

Checking that your selected Channels DVR server's data files (/mnt/192.168.110.57-8089) are accessible:
Folders with the names Database, Images, Imports, Logs, Movies, Streaming and TV should be visible...

total 0
d--------- 1 root   root   72 Jun 20 19:18 .
drwxr-xr-x 1 root   root   86 Jun 20 20:07 ..
drwxrwxrwx 1 root   root    8 Jun 20 19:17 @eaDir
drwx------ 1 242120 242120 44 Jun 20 19:18 Database
drwx------ 1 242120 242120 12 Jun 20 19:18 Images
drwx------ 1 242120 242120 28 Jun 20 19:18 Imports
drwx------ 1 242120 242120  0 Jun 20 19:18 Streaming

----------------------------------------

Checking that your selected Channels DVR server's log files (/mnt/192.168.110.57-8089_logs) are accessible:
Folders with the names data and latest should be visible...

total 4
drwxr-xr-x 1 242120 242120  50 Jun 20 19:18 .
drwxr-xr-x 1 root   root    86 Jun 20 20:07 ..
drwxr-xr-x 1 242120 242120 120 Jun 20 19:18 2024.05.07.1442
drwxr-xr-x 1 242120 242120 436 Jun 20 19:51 data
lrwxrwxrwx 1 242120 242120  15 Jun 20 19:18 latest -> 2024.05.07.1442

----------------------------------------

Here's a list of your current OliveTin-related settings:

HOSTNAME=olivetin
CHANNELS_DVR=192.168.110.57:8089
CHANNELS_DVR_ALTERNATES=
CHANNELS_CLIENTS=
ALERT_SMTP_SERVER=smtp.gmail.com:587
ALERT_EMAIL_FROM=[Redacted]@gmail.com
ALERT_EMAIL_PASS=[Redacted]
ALERT_EMAIL_TO=[Redacted]@gmail.com
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
PORTAINER_TOKEN=[Redacted]
PORTAINER_HOST=192.168.110.57

----------------------------------------

Here's the contents of /etc/resolv.conf from inside the container:

search localdomain
nameserver 127.0.0.11
options ndots:0

----------------------------------------

Here's the contents of /etc/hosts from inside the container:

127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.25.0.3	olivetin

Then I used Project One-Click to install the FrndlyTV container:

Figuring out the paths on Synology takes a moment, but can be found by looking in File Station, and by creating any needed directories in existing shared folders:

Much like you have to create a folder called portainer in the docker directory, you'll need to create a directory called olivetin, and then in the olivetin directory one called data. This is unique to Synology, all other Linux distros I've worked with allow Docker to create the directories it needs.

1 Like

True that you need to create the /volume1/docker/olivetin directory, but you don't need to create the data subdirectory in it. OliveTin for Channels will create that.

Actually, because this is a stack and we're launching two containers, the spin-up will fail if the directory specified in the static-file-server part of the stack doesn't already exist. This didn't used to be true in early OliveTin stacks, before the second container was added, but it's definitely the case now.

Now that I have a Synology VM, I may try to figure out why Docker doesn't create needed directories on DSM -- maybe there's a simple fix.

2 Likes

@dea321

Another cross-check that things are going according to plan, is to check the directory on your Synology you've bound to the OliveTin data directory (/config). You should see something like this in File Station:

When you and @chDVRuser walked me through this process a few months ago, I found out that I needed to create both the /olivetin and /olivetin/data subdirectory by using Synology File Station.

1 Like

He's correct that since he added the static file server to the stack you have to do that.
I started using it before that was added.

I appreciate you all helping me out here. Things seem to have improved, but I just can't connect to the DVR server still for some reason. My folder setup looks correct in File Station now, I believe. And I can still ping the IP address 192.168.4.20 just fine from my Windows PC on the same network as the NAS. I can also get to the Channels DVR Web UI at 192.168.4.20:8089 using that same PC. But there seems to be an issue just between the docker container and the host, and I am struggling to see where. I did verify that Firewall was turned off in the Synology Control Panel. I even toggled it on and back off just in case. But still no luck connecting.

Checking your OliveTin installation...
(extended_check=false)

----------------------------------------

Checking that your selected Channels DVR server (192.168.4.20:8089) is reachable by URL:
HTTP Status: 200 indicates success...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
curl: (28) Connection timed out after 5000 milliseconds
HTTP Status: 000
Effective URL: http://192.168.4.20:8089/

----------------------------------------

Checking that your selected Channels DVR server's data files (/mnt/192.168.4.20-8089) are accessible:
Folders with the names Database, Images, Imports, Logs, Movies, Streaming and TV should be visible...

total 0
drwxrwxrwx 1 1026 root    100 Jun 20 12:44 .
drwxr-xr-x 1 root root     78 Jun 20 23:09 ..
drwxrwxrwx 1 1026 root   1320 Jun 20 13:44 Database
drwxrwxrwx 1 1026 root  67204 Jun 20 09:00 Images
drwxrwxrwx 1 1026 root     28 Mar 17  2022 Imports
drwxrwxrwx 1 1026 root     32 Jun 28  2020 Logs
drwxrwxrwx 1 1026 root   1706 Dec 17  2023 Movies
drwxrwxrwx 1 1026 root  12636 Jun 20 15:00 Streaming
drwxrwxrwx 1 1026 root    734 Jun 17 23:37 TV
drwxrwxrwx 1 1026 users  4176 Jun 20 22:58 olivetin

----------------------------------------

Checking that your selected Channels DVR server's log files (/mnt/192.168.4.20-8089_logs) are accessible:
Folders with the names data and latest should be visible...

total 4
drwxr-xr-x 1 242120 242120  80 Jun 20 12:42 .
drwxr-xr-x 1 root   root    78 Jun 20 23:09 ..
drwxr-xr-x 1 242120 242120 120 Jun 20 12:41 2024.05.07.1442
drwxr-xr-x 1 242120 242120 154 Jun 20 12:42 2024.06.17.1525
drwxr-xr-x 1 242120 242120 694 Jun 20 20:27 data
lrwxrwxrwx 1 242120 242120  15 Jun 20 12:42 latest -> 2024.06.17.1525

----------------------------------------

Here's a list of your current OliveTin-related settings:

HOSTNAME=olivetin
CHANNELS_DVR=192.168.4.20:8089
CHANNELS_DVR_ALTERNATES=
CHANNELS_CLIENTS=
ALERT_SMTP_SERVER=smtp.gmail.com:587
ALERT_EMAIL_FROM=[Redacted]@gmail.com
ALERT_EMAIL_PASS=[Redacted]
ALERT_EMAIL_TO=[Redacted]@gmail.com
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
PORTAINER_TOKEN=[Redacted]
PORTAINER_HOST=192.168.4.20

----------------------------------------

Here's the contents of /etc/resolv.conf from inside the container:

search local
nameserver 127.0.0.11
options ndots:0

----------------------------------------

Here's the contents of /etc/hosts from inside the container:

127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
192.168.64.2	olivetin

Making progress, but we need to figure out why curl isn't working. Please try executing the following from a Command Prompt on your Windows machine:

curl 192.168.4.20:8089

And, you should see something like this:

curl 192.168.4.20:8089
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
    <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
    <link rel="stylesheet" href="/bundle.css">
    <link rel="manifest" href="/manifest.json">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <title>Channels</title>
  </head>
  <body>
    <div id="content"></div>
    <div id="modal-wrapper"></div>
    <div id="modal"></div>
    <script async type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script>
    <script type="text/javascript" src="/bundle.js"></script>
    <script>
      if ('serviceWorker' in navigator) {
        navigator.serviceWorker.register('/service-worker.js').then(function(registration) {
          console.log('Service worker registration succeeded:', registration)
        }, function(error) {
          console.log('Service worker registration failed:', error)
        })
      }
    </script>
  </body>
</html>

OK, so let's see if we get any additional information this way:

In Portainer, use the Quick Action buttons for the OliveTin container to "exec" into it. Then execute the same curl command you used in Windows:

It just appears to hang. Nothing shows up on the terminal at all.

I eventually got a "Failed to connect to 192.168.4.20 port 8089: Connection timed out"

Must have been a couple of minutes before it timed out though.

Can you ping the IP like so:

root@olivetin:/# ping 192.168.110.57
PING 192.168.110.57 (192.168.110.57) 56(84) bytes of data.
64 bytes from 192.168.110.57: icmp_seq=1 ttl=64 time=0.023 ms
64 bytes from 192.168.110.57: icmp_seq=2 ttl=64 time=0.031 ms
64 bytes from 192.168.110.57: icmp_seq=3 ttl=64 time=0.031 ms
64 bytes from 192.168.110.57: icmp_seq=4 ttl=64 time=0.036 ms
^C
--- 192.168.110.57 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.023/0.030/0.036/0.004 ms
root@olivetin:/#

Ctrl-C to break

@dea321

Also could you post your Portainer-Networks page that looks like this:

@dea321

An couple more things I'd like you to try, in addition to the above items, while exec'ing into the OliveTin console:

curl 172.17.0.1:8089

and

curl 172.17.0.1:9000

I still can't ping my server IP from the olivetin bash. It just hangs again.

Here's the other info:

Hopefully, at some point, we can figure out what's going on with your setup as far as docker containers being able to access IPs on your LAN. This is something unique to the way your Synology NAS, or your router, are configured.

In the meantime, we can use Docker's internal gateway, since Channels DVR and Docker are on the same machine. So configure these OliveTin environment variables like so:

CHANNELS_DVR_HOST=172.17.0.1
PORTAINER_HOST=172.17.0.1

Everything else can stay as you have it now. If you could confirm back that the OliveTin Post-Install Healthcheck looks good, and also post the final environment variables you're using -- in case someone else finds themselves in this unusual scenario in the future.

Awesome! That seems to have worked. Thank you so much for being so helpful and patient with me. I was even able to run Project One-Click and create the Pluto stack and channels. So what is the drawback to leaving the IP addresses as those internal docker ones instead of the actual IP of the NAS?

My next goal is going to be to get the EPlus channels to work, which is why I started on this whole process in the first place.

I don't think there's much as far as OliveTin is concerned. You probably won't be able to send onscreen message to your Channels clients -- but that's about the only one that comes to mind. You're the only one doing it this way, as far as I know, so it's possible we'll run into something.

Any docker extension that asks you for the ip or ip:port of your Channels DVR would likely need to use that Docker gateway.