OliveTin EZ-Start: The Next Generation. Deploy OliveTin-for-Channels from the Command Line without the Need for Portainer to be Installed in Advance!

My bad I was lazy and did not read through all the options in the Generator/Tester.

@bnhf ... Want to say thanks for your contribution of OliveTin ... I recreated everything using EZ-Start and everything was so easy.... both Windows Docker and ubuntu docker.

1 Like

Containers that did not use Portainer had a ! so I simply recreated them.

Getting the following error on the last step.

JSON response from http://192.168.1.117:9000/api/stacks/create/standalone/string?endpointId=1:
{"message":"failed to deploy a stack: compose up operation failed: Error response from daemon: driver failed programming external connectivity on endpoint static-file-server (3c6202df1a2742ab33d368f45b1e44dbe9fadf0cbecf82fac7fd62390bc468ce): listen tcp4 0.0.0.0:8080: bind: address already in use","details":"Failed to deploy a stack: compose up operation failed: Error response from daemon: driver failed programming external connectivity on endpoint static-file-server (3c6202df1a2742ab33d368f45b1e44dbe9fadf0cbecf82fac7fd62390bc468ce): listen tcp4 0.0.0.0:8080: bind: address already in use"}
false

Change HOST_SFS_PORT to something other than 8080, I use 8088.
Something on your server is already using port 8080.

OliveTin EZ-Start: The Next Generation - Advanced Setup Instructions

Though OliveTin EZ-Start: The Next Generation is targeted mostly at users running CDVR server and Docker on the same system, it is in fact, not limited to that. It can easily be used with scenarios where you're running CDVR on one system, and Docker on another.

Here's an example of a Docker run command, that supports that:

docker run -d --name olivetin-ezstart \
--pull always \
-p 1338:1337 \
-e EZ_START=-ezstart \
-e CHANNELS_DVR=192.168.110.66:8089 \
-e PORTAINER_HOST=192.168.110.111 \
-e TZ=$(readlink /etc/localtime) \
-v /config \
-v /var/run/docker.sock:/var/run/docker.sock \
bnhf/olivetin:latest

All we're adding in the above is an IP address for PORTAINER_HOST, which would be the LAN IP for the system you're running Docker on.

Expanding a bit further, let's say you're running multiple DVRs, some local and some remote. In this case you're no doubt using Tailscale with MagicDNS. Here's an example where we're adding our Tailnet using --dns-search, and now we can use hostnames to refer to any systems on our far-flung Tailnet:

docker run -d --name olivetin-ezstart \
--pull always \
--dns-search tailxxxxx.ts.net \
-p 1338:1337 \
-e EZ_START=-ezstart \
-e CHANNELS_DVR=media-server8:8089 \
-e PORTAINER_HOST=convertible-pc3 \
-e TZ=$(readlink /etc/localtime) \
-v /config \
-v /var/run/docker.sock:/var/run/docker.sock \
bnhf/olivetin:latest

As soon as we start talking about multiple systems, we also have to plan for using some sort of network file sharing. You can use both NFS and SMB (aka Samba or CIFS), and in the case of Samba, I've added an OliveTin Action to allow you to create Docker/Portainer Volumes attached to those Samba shares.

For the purposes of OliveTin-for-Channels, I've established some "standard" volume names to use, with up to 3 DVRs supported out-of-the-box. The names are:

  • channels-dvr (where your CDVR recordings are stored)
  • channels-dvr-logs (where your CDVR program files aka "executables" are located)
  • tubearchivist (often in with your CDVR recordings, in which case you don't need a new volume)
  • channels-dvr2
  • channel-dvr2-logs
  • tubearchivist2
  • channels-dvr3
  • channels-dvr3-logs
  • tubearchivist3

When setting up your Docker/Portainer Volumes during the EZ-Start:TNG process, you'll want to do this after you've added Portainer, but before any other steps. That way you can use the volume names above when creating your list of env vars, and when spinning up the full version of OliveTin:

Special thanks to @TerryD for testing EZ-Start with multiple DVRs!

Even though they are already specified correctly the Generator/Tester still comes up with incorrect path for remote DVR1, just an FYI.

TAG=latest
DOMAIN=local
HOST_PORT=1337
CHANNELS_DVR_HOST=192.168.50.219
CHANNELS_DVR_PORT=8089
CHANNELS_DVR2_HOST=192.168.50.32
CHANNELS_DVR2_PORT=8089
CHANNELS_DVR3_HOST=192.168.50.149
CHANNELS_DVR3_PORT=8089
CHANNELS_CLIENTS=
ALERT_EMAIL_SERVER=
ALERT_EMAIL_FROM=
ALERT_EMAIL_PASS=
ALERT_EMAIL_TO=
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=America/Los_Angeles
HOST_DIR=/data
DVR_SHARE=/var/lib/docker/volumes/channels-dvr/_data
LOGS_SHARE=/var/lib/docker/volumes/channels-dvr-logs/_data
TUBEARCHIVIST_SHARE=/var/lib/docker/volumes/channels-dvr/_data
DVR2_SHARE=channels-dvr2
LOGS2_SHARE=channels-dvr2-logs
TUBEARCHIVIST2_SHARE=channels-dvr2
DVR3_SHARE=/mnt/f/dvr-storage/dvr
LOGS3_SHARE=/mnt/c/programdata/channelsdvr
TUBEARCHIVIST3_SHARE=/mnt/f/dvr-storage/dvr
HOST_SFS_PORT=8080
FOLDER=/web
PORTAINER_TOKEN=ptr_LcqVox4Qdta9BFVunvHSfsTwsHw/fdiVLr4eGRI111I=
PORTAINER_HOST=192.168.50.149
PORTAINER_PORT=9443
PORTAINER_ENV=1
PERSISTENT_LOGS=false

I was able to duplicate that, thanks for reporting it. Fix pushed as :latest (2025.03.31).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

This is great. thank you!

1 Like

This is my last hope. I have been working at this for days. To say I have a rudimentary amount of knowledge of coding would be generous but I am really good at following directions and copy/paste.

Below is what I get when I try to Install Portainer. However, it appears to be running in docker. Any thoughts?

Standard Output

b428af00343c181dcb02b7a1122b1c7f5e3ecae88ed77eaa659c3c1e27d7676c
Portainer container created successfully

Portainer token creation and environment initialization failed...

Standard Error

+ [[ -z '' ]]
+ portainerHost=127.0.0.1
+ portainerAdminPassword=xxxxxxxxxx
+ [[ 13 -lt 12 ]]
++ htpasswd -nbB admin xxxxxxxxxxxx
++ cut -d : -f 2
+ hashedPassword='$2y$05$04PwhWQFaVJ43VHuTaxMZOAVmhgk5HGOa5u2fh/D4lBtSJcUJQl5u'
+ portainerHttpPort=9000
+ portainerHttpsPort=9443
+ docker run -d -p 9000:9000 -p 9443:9443 --name portainer --restart always --pull always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest --admin-password '$2y$05$04PwhWQFaVJ43VHuTaxMZOAVmhgk5HGOa5u2fh/D4lBtSJcUJQl5u'
latest: Pulling from portainer/portainer-ce
4f4fb700ef54: Pulling fs layer
63c930229559: Pulling fs layer
d3b1c06ebf8c: Pulling fs layer
354e5ce52559: Pulling fs layer
8d59d73e40c6: Pulling fs layer
e811f1a0940a: Pulling fs layer
605b6f3b7115: Pulling fs layer
24f6f070c2a7: Pulling fs layer
60aae008ce70: Pulling fs layer
71eec8d28aa8: Pulling fs layer
4f4fb700ef54: Download complete
d3b1c06ebf8c: Download complete
63c930229559: Download complete
605b6f3b7115: Download complete
71eec8d28aa8: Download complete
d3b1c06ebf8c: Pull complete
63c930229559: Pull complete
60aae008ce70: Download complete
24f6f070c2a7: Download complete
354e5ce52559: Download complete
8d59d73e40c6: Download complete
354e5ce52559: Pull complete
e811f1a0940a: Download complete
8d59d73e40c6: Pull complete
605b6f3b7115: Pull complete
e811f1a0940a: Pull complete
24f6f070c2a7: Pull complete
4f4fb700ef54: Pull complete
71eec8d28aa8: Pull complete
60aae008ce70: Pull complete
Digest: sha256:224a378fbc5ae579dc9d570c5ca2e5e981a4a003c8d7c2c5b5e482af97c2f87c
Status: Downloaded newer image for portainer/portainer-ce:latest
+ echo 'Portainer container created successfully'
+ sleep 2
++ curl -s -X POST http://127.0.0.1:9000/api/auth -H 'Content-Type: application/json' -d '{"Username":"admin", "Password":"xxxxxxxx"}'
++ jq -r .jwt
+ jsonWebToken=
++ curl -s -X POST http://127.0.0.1:9000/api/users/1/tokens -H 'Authorization: Bearer ' -H 'Content-Type: application/json' -d '{"password": "xxxxxxxxx", "description": "olivetin"}'
++ jq -r .rawAPIKey
+ portainerToken=
++ curl -s -X POST http://127.0.0.1:9000/api/endpoints -H 'Authorization: Bearer ' -F Name=local -F EndpointCreationType=1
++ jq -r .Id
+ portainerEnv=
+ [[ -n '' ]]
+ echo -e '\nPortainer token creation and environment initialization failed...'

@bnhf
User is following up from his topic I cannot figure out Mac mini (M4), m3u playlist, and Docker

1 Like

Thanks and apologies for my lack of etiquette.

No issues, just letting him know you already created a topic, so he doesn't have to ask you questions you already answered there :smile:

It looks like Portainer is already installed. Have you tried continuing on with the next step of running the OliveTin Environment Variables Generator/Tester Action?

Any chance you copied and stored your Portainer token from the first time you installed Portainer?

Anything is possible. I have installed and uninstalled (or tried anyway) so many times.

When I do the next step, I get this:

Standard Output

TAG=latest
DOMAIN=
HOST_PORT=1337
CHANNELS_DVR_HOST=127.0.0.1
CHANNELS_DVR_PORT=8089
CHANNELS_CLIENTS=
ALERT_SMTP_SERVER=
ALERT_EMAIL_FROM=
ALERT_EMAIL_PASS=
ALERT_EMAIL_TO=
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=America/New_York
HOST_DIR=/data
DVR_SHARE=
LOGS_SHARE=
TUBEARCHIVIST_SHARE=
DVR2_SHARE=
LOGS2_SHARE=
TUBEARCHIVIST2_SHARE=
DVR3_SHARE=
LOGS3_SHARE=
TUBEARCHIVIST3_SHARE=
HOST_SFS_PORT=8080
FOLDER=/web
PORTAINER_TOKEN=
PORTAINER_HOST=127.0.0.1
PORTAINER_PORT=9443
PORTAINER_ENV=13370
PERSISTENT_LOGS=false

Standard Error

Error: No such object: olivetin
cat: /config/olivetin.token: No such file or directory

Edit: I don't know if I have Portainer token from the first install but at some point, I did a new one and I have that info.

The group of values is not correct. The most important one to fix now is the HOST_DIR value. When you're running on a Mac, Docker only allows you to access certain shares. Generally a value of /Users/<your username> is correct on a Mac, but make sure that directory exists first.

The other we can get when you run your first healthcheck from the full version of OliveTin.

Your PORTAINER_TOKEN value should be the first one you "stored in a safe place", but if you don't have it we can deal with that from the full OliveTin too. Your PORTAINER_ENV value is definitely wrong. It's probably 1, but we'll verify that in the healthcheck too.

So, correct what you can correct, generate a new list like the above and then run the Create an OliveTin Stack in Portainer Action (unless you've already done that too). Then you should be able to access OliveTin at port 1337 and run the Post-Install Healthcheck.

The group of values is not correct. The most important one to fix now is the HOST_DIR value. When you're running on a Mac, Docker only allows you to access certain shares. Generally a value of /Users/<your username> is correct on a Mac, but make sure that directory exists first.

I'm not sure how to fix the host_dir value other than just adding it to the box before I click start.

I see the olive-tin folder in /users/(my username). I changed the value when I ran it again and got this:

TAG=latest
DOMAIN=
HOST_PORT=1337
CHANNELS_DVR_HOST=127.0.0.1
CHANNELS_DVR_PORT=8089
CHANNELS_CLIENTS=
ALERT_SMTP_SERVER=
ALERT_EMAIL_FROM=
ALERT_EMAIL_PASS=
ALERT_EMAIL_TO=
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=America/New_York
HOST_DIR=/users/Layla
DVR_SHARE=
LOGS_SHARE=
TUBEARCHIVIST_SHARE=
DVR2_SHARE=
LOGS2_SHARE=
TUBEARCHIVIST2_SHARE=
DVR3_SHARE=
LOGS3_SHARE=
TUBEARCHIVIST3_SHARE=
HOST_SFS_PORT=8080
FOLDER=/web
PORTAINER_TOKEN=
PORTAINER_HOST=127.0.0.1
PORTAINER_PORT=9443
PORTAINER_ENV=13370
PERSISTENT_LOGS=false

Standard Error

Error: No such object: olivetin
cat: /config/olivetin.token: No such file or directory

edit:
This is when I ran creat an olive-tin stack

Standard Output

Run the OliveTin Environment Variables Generator/Tester Action first, and then come back here...

Standard Error

++ basename /config/olivetin-for-channels.sh

  • extension=olivetin-for-channels.sh
  • extension=olivetin-for-channels
  • [[ -f /config/olivetin-for-channels.env ]]
  • cp /config/olivetin-for-channels.env /tmp
  • envFile=/tmp/olivetin-for-channels.env
  • dirsFile=/tmp/olivetin-for-channels.dirs
  • [[ -f /config/olivetin-for-channels.yaml ]]
  • cp /config/olivetin-for-channels.yaml /tmp
  • yamlCopied=true
  • yamlFile=/tmp/olivetin-for-channels.yaml
    ++ grep PORTAINER_HOST= /tmp/olivetin-for-channels.env
    ++ awk -F= '{print $2}'
  • portainerHost=127.0.0.1
    ++ grep PORTAINER_TOKEN= /tmp/olivetin-for-channels.env
    ++ awk -FTOKEN= '{print $2}'
  • portainerToken=
    ++ grep PORTAINER_PORT= /tmp/olivetin-for-channels.env
    ++ awk -F= '{print $2}'
  • portainerPort=9443
  • envVarsUpdated=true
  • [[ ! -f /config/olivetin-for-channels.env ]]
  • [[ true != \t\r\u\e ]]
  • [[ -z '' ]]
  • echo 'Run the OliveTin Environment Variables Generator/Tester Action first, and then come back here...'
  • exit 0

On my Mac-Mini-M2, the virtual file share is /Users with a capital U. I'm not an everyday Mac user, but I believe capitalization matters on a Mac -- like it does on Linux. And yes, to fix the variables, replace what's showing in that field in the Action. Then click start, and you should see a corrected list.

I believe you're going to need to fix your token before you can spin-up the full OliveTin. Go into Portainer on port 9000, and where you see your username click on the dropdown to get to where you can see your existing tokens and create a new one. Delete the current OliveTin token, and copy-and-paste it into the above Action, just like for HOST_DIR. Change the PORTAINER_ENV value to 1 also.

Make sure all your values are looking good before your try to create your full OliveTin container.