Installation on a mini PC

Hello,

a quick feedback on migrating Gladys from a Raspberry PI to a Mini PC:

I installed Kubuntu on it and then Gladys via Docker.
After the curl, I had to run:

dockerd-rootless-setuptool.sh install

It should be specified that there are dependencies:

curl et uidmap

I needed root rights for the docker run command because more permissions are required to write to /var

It suggested I log in to Gladys Plus, which I did.
But there was no information when it finished; I left it running for several hours out of uncertainty…

I closed everything and reconnected locally; everything was properly loaded.
But it didn’t recreate the MQTT broker; it would be nice if that could be done :slight_smile:

I started the jobwatcher but no updates are happening…
docker ps

CONTAINER ID   IMAGE                   COMMAND                  CREATED      STATUS                          PORTS     NAMES
68fe7c53f52e   containrrr/watchtower   "/watchtower --clean…"   7 days ago   Restarting (1) 39 seconds ago             watchtower

Any idea?

For the watchtower, it depends on the frequency you’ve set it to.. By default I think it’s 24h, right?

How is this going to be resolved?
It’s been more than 24 hours in any case…

And isn’t watchtower having an issue? It restarted about thirty seconds ago in your screenshot? Isn’t it restarting in a loop?

That’s normal and it’s stated in the docs that you need to add the user to the « docker » group so that your user can execute Docker commands

Il faut maintenant ajouter votre utilisateur au groupe \"docker\" pour que votre utilisateur puisse exécuter les commandes Docker.

Si vous êtes sur un Raspberry Pi, il faut exécuter la commande pour l'utilisateur \"pi\" :

sudo usermod -aG docker pi

Ensuite, fermez votre session SSH, puis reconnectez-vous. L'ajout d'un utilisateur a un groupe ne prend effet qu'après une reconnexion.

And does the docker ps command show only watchtower, or do you have other containers?

That’s normal and it’s stated in the docs that you need to add the user to the docker group to be able to run docker commands

That’s not enough, I did that but the /var folder belongs to root not to docker, so root privileges are therefore required.

And does the docker ps command return only watchtower or do you have other containers?

Only the watcher, which surprised me since Gladys is running…

I assure you that’s enough, no need to do anything else.
I just moved my Raspberry Pi 4 to a mini PC on Monday with Ubuntu Server and I didn’t run the commands you explained.

In my opinion you missed something in the installation because the command docker ps returns the list of your active containers.
Try docker ps -a

That’s better :slight_smile:

docker ps -a
CONTAINER ID   IMAGE                       COMMAND                  CREATED      STATUS                          PORTS     NAMES
68fe7c53f52e   containrrr/watchtower       "/watchtower --clean…"   7 days ago   Restarting (1) 26 seconds ago             watchtower
e4d8276f276b   gladysassistant/gladys:v4   "docker-entrypoint.s…"   7 days ago   Created                                   gladys

Well, I followed the tutorial, it immediately refused saying I didn’t have write permission on the folder
here is my command history:

curl -sSL https://get.docker.com | sh

# I add my user to the docker group
sudo usermod -aG docker hizo

# When I want to test docker, it gives me a command that I must execute for the installation
docker ps
dockerd-rootless-setuptool.sh install

# Then it tells me that a dependency is missing: uidmap
sudo apt-get install -y uidmap

# I try again
dockerd-rootless-setuptool.sh install
docker ps

# I install Gladys
docker run -d --log-driver json-file --log-opt max-size=10m --cgroupns=host --restart=always --privileged --network=host --name gladys -e NODE_ENV=production -e SERVER_PORT=80 -e TZ=Europe/Paris -e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/gladysassistant:/var/lib/gladysassistant -v /dev:/dev -v /run/udev:/run/udev:ro gladysassistant/gladys:v4

# Here it told me no no, you don't have permission to write in /var, I try again with sudo
sudo docker run -d --log-driver json-file --log-opt max-size=10m --cgroupns=host --restart=always --privileged --network=host --name gladys -e NODE_ENV=production -e SERVER_PORT=80 -e TZ=Europe/Paris -e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/gladysassistant:/var/lib/gladysassistant -v /dev:/dev -v /run/udev:/run/udev:ro gladysassistant/gladys:v4

# I install the job watcher as a normal user because it works
docker run -d   --name watchtower   --restart=always   -v /var/run/docker.sock:/var/run/docker.sock   containrrr/watchtower   --cleanup --include-restarting

I can’t tell you more right now, but what we can see from your screenshots is that Watchtower isn’t working because it’s restarting in a loop and Gladys isn’t started. The container is just created but not started.

And yet I do have access to gladys :stuck_out_tongue:

However I see this:

Then close your SSH session, then reconnect. Adding a user to a group only takes effect after reconnecting.

and that might be the cause…
I’m going to uninstall everything.

It’s strange that you have access to Gladys even though the container isn’t started
Don’t you have another instance of Gladys running somewhere else?

It’s because it’s running under sudo…
I just deleted them as well.

Did you log out properly after typing this: ‹ sudo usermod -aG docker hizo › ?

Edit: I only see you mention it a few messages above. That’s certainly the reason!

Indeed, I managed to install it there without root privileges.
that was probably it.
and now I no longer have access to Gladys XD

And what does the docker ps - a command return now?

docker ps -a
CONTAINER ID   IMAGE                       COMMAND                  CREATED       STATUS                          PORTS     NAMES
91c144e9c84a   containrrr/watchtower       "/watchtower --clean…"   7 hours ago   Restarting (1) 39 seconds ago             watchtower
a1c10ce2c3a0   gladysassistant/gladys:v4   "docker-entrypoint.s…"   7 hours ago   Restarting (0) 23 seconds ago             gladys

It’s constantly rebooting…

And what do the logs say?

docker logs gladys

docker logs watchtower

I just reformatted everything:

docker run -d \
--log-driver json-file \
--log-opt max-size=10m \
--cgroupns=host \
--restart=always \
--privileged \
--network=host \
--name gladys \
-e NODE_ENV=production \
-e SERVER_PORT=80 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/gladysassistant:/var/lib/gladysassistant \
-v /dev:/dev \
-v /run/udev:/run/udev:ro \
gladysassistant/gladys:v4
Unable to find image 'gladysassistant/gladys:v4' locally
v4: Pulling from gladysassistant/gladys
31e352740f53: Pull complete 
c017600940c6: Pull complete 
c9f8586f07bd: Pull complete 
ee16df044bfc: Pull complete 
ef1db5d9aee8: Pull complete 
c60400dfb37c: Pull complete 
4f4fb700ef54: Pull complete 
916e7e9aa0c9: Pull complete 
5ee4bdec414b: Pull complete 
52f135e00191: Pull complete 
Digest: sha256:f2ec4d91eafc243f95afbd96751166c9eb8e7761b2994c17e65a2c2466d3a7f3
Status: Downloaded newer image for gladysassistant/gladys:v4
ba6989911676792468ee1e1904c5c099d2db3584d853575ff96982fffbcbb8b7
docker: Error response from daemon: error while creating mount source path '/var/lib/gladysassistant': mkdir /var/lib/gladysassistant: permission denied.

For the record, I did make sure to disconnect from the SSH session beforehand…

Some pointers in this article