Password protection #2274
Replies: 13 comments 6 replies
-
@Shadow27374 AFAIK, Option 2: |
Beta Was this translation helpful? Give feedback.
-
Thanks already for that, I probably got it. I have now taken the example configuration and only the line for the default password: docker-compose looks like this:
Have I missed anything? |
Beta Was this translation helpful? Give feedback.
-
I have now played around a bit and found that the config is loaded very well. If I disable any feature and restart Glances it is disabled. However, the password protection can not be activated. No matter what I enter as password in the config, the page loads without asking for a password. |
Beta Was this translation helpful? Give feedback.
-
I had your questions aswell. Im running on docker via Unraid so everything wasnt fitting my setup and im kinda novice. Maybe not how one should do it but atleast i got it to work. -Changed to own conf file as you did and stored it on custom location "/mnt/user/appdata/glances", that i confirmed was working as u did. -Created the pwd file and copied to other location as documentation said and i think u did as well. I opted for moving it to custom location (in my case same as conf: /mnt/user/appdata/glances). with file name "yourusername".pwd.
-Then edited GLANCES_OPT to: First i didnt seem to work as it let me in without auth but i think it was cached in the browser i was using during testing. But it worked as i needed to use user/pass when setting up integration to Home Assistant and when i tested in other browser. |
Beta Was this translation helpful? Give feedback.
-
What you describe would be option 1 without changing the config. Anyway, I tried it again now and it works. Since option 1 now works, I let that stay with option 2. |
Beta Was this translation helpful? Give feedback.
-
@Shadow27374 Did I get that right? |
Beta Was this translation helpful? Give feedback.
-
Yes, exactly.
Option 2 actually looked easier but somehow I am too stupid. |
Beta Was this translation helpful? Give feedback.
-
This was confusing me too, thanks for investigating it. Edit: It's actually not working for me, Portainer is giving this error when I try to update the stack (docker-compose.yml): Here is my stack:
Did either of you encounter something like this? |
Beta Was this translation helpful? Give feedback.
-
@RazCrimson
For such configuration, I'm getting information that ``--password` flag is not accessible. Maybe I need to start docker container as nonroot user somehow? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Just tried to set this up, config password has no effect. |
Beta Was this translation helpful? Give feedback.
-
I also cannot get the passwords block in the config file to work which is really unfortunate because it's objectively the more easily reproducible deployment strategy with just being a config file. Hopefully it gets fixed soon but glad to get confirmation here I'm not crazy. |
Beta Was this translation helpful? Give feedback.
-
It sounds like I'm not the only one facing this problem. |
Beta Was this translation helpful? Give feedback.
-
I have a problem with password protection for Docker.
I do not fully understand the instructions: https://glances.readthedocs.io/en/latest/docker.html#how-to-protect-your-dockerized-server-or-web-server-with-a-login-password
In option 1 you have to create a password file, so far so good, but what is the format of this file? I can't find anything about this.
Option 2 I do not understand at all. It talks about a localhost password. What is that supposed to be? I would like to add a user myself, e.g. admin:pass.
In the Config are only the following:
#localhost=abc
#default=defaultpassword
No matter what I enter it has no effect.
That the # must be gone is already clear...
Beta Was this translation helpful? Give feedback.
All reactions