Gladys on PI4 with Docker

Hello
I would like to test Gladys

To do this, I have a Raspberry PI4 on which I have Docker running with Portainer

Question 1:
Following the basic installation, I got a Docker error message:

Error response from daemon: unknown log opt ‹ max-size › for journald log driver

This is related to the parameter –log-opt max-size=10m \

So I did the installation without this parameter, but has anyone else had this bug??

Question 2:
Is it mandatory to put the following line:
–privileged \

I read in an ANSSI prescription that it was necessary to avoid giving too many rights to the container with this option…

Question 3:
I have a container (AdguardHome) that uses port 80 and therefore the Gladys container refuses to start… reason (in the logs…) port in use…
I stopped AdguardHome for a while and Gladys is accessible but can we change Gladys’s port 80???

Finally, I conclude with:
a big bravo for this application
a big thank you to everyone for your insights

Hello,

Question 1:
If you go through Portainer, it’s possible that this option is managed by Portainer. Others can surely answer this question better than me, so I don’t have the answer :slight_smile:

Question 2:
ANSSI sets conditions for special cases. For example, a web server with a classic website should not be allowed to access everything, so no privileged access. However, for home automation, it is necessary. Your Docker needs to access other Docker containers, access the machine, read the USB, etc. It’s necessary.
However, it’s true that it’s good practice not to do this if you don’t need it :slight_smile:

Question 3:
Yes, you can :slight_smile:
Gladys exposes its port 80, but the machine can very well bind a port, for example:
-p 8080:80. Here you associate port 8080 of your Raspberry Pi with port 80 of the Docker :slight_smile:

Be careful here, as we are running Gladys in « network=host » mode, so you just need to change the port in the container by changing the variable:

 -e SERVER_PORT=80 \

You can put any port in its place :slight_smile:

@damalgos
@pierre-gilles

Hello to both of you

I indeed tested this afternoon with:
-p 8080:80 and I have the same error

I will make the change tonight as recommended by Pierre-Gilles
I will for example
-e SERVER_PORT=90 \

I will get back to you very soon

Be careful with the ports :slight_smile:

There are two types of ports on Linux: « reserved » ports and free ports.
Reserved ports (80 http, 443 https, 22 ssh, …).

The best option is to use a port that is not reserved by the system.
In short, from 1023 to 65535.

Good evening
I have taken port 1030 and I have access to Gladys Assistant

Thank you for your first feedback on this point.

Now I need to find the « log opt max size » option

Hi @Titou43, and if you can at the end make a mini-tutorial on how you did to install gladys via portainer! :wink:

@cce66

Hello, Portainer is just a container management interface for me, I set up my containers via SSH or terminal as indicated here:

You have everything in the paragraph:

## Start a Gladys Assistant container

To start Gladys, run the following command:

I just modified:

  • The port: -e SERVER_PORT=80 \ (1030 instead of 80)

  • I removed for the time being:
    *–log-opt max-size=10m * as it gives me an error message on the Raspberry Pi 4
    *–privileged * for my first tests

And of course I changed the destination folder

That’s it

However, I would like to find this d… error of --log-opt max-size=10m \

Can you check the default log-driver by running the command docker info --format '{{.LoggingDriver}}'?

Depending on the driver, the log-opt max-size option may not be available.

You can force the driver by adding the option --log-driver json-file when you launch your container.

Good evening

At the command: docker info --format '{{.LoggingDriver}}'

I get the answer: journald

Maybe it would be worth adding that to the command on the site, right?

Good evening
So you need to add these two lines to the installation file??? :
–log-driver json-file \
–log-opt max-size=10m \

Yes! Like this:

–log-driver json-file \
–log-opt max-size=10m \

You can change « 10m » if you think it’s not enough (this sets a maximum of 10MB of logs)

Good evening
I just tested …
It worked on Raspberry Pi 4