H
Homarr2mo ago
suming

Unable to login (Database is readonly)

No description
Solution:
Use sudo chown -R 1026:100 ./appdata instead. It also applies to all sub directories / files
Jump to solution
25 Replies
Cakey Bot
Cakey Bot2mo ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
❓ Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
suming
sumingOP2mo ago
No description
Meierschlumpf
Meierschlumpf2mo ago
Hey @suming, can you please provide the docker logs and what auth provider you are using?
suming
sumingOP2mo ago
The certification provider is automatically given after docker runs How do I provide logs?
Meierschlumpf
Meierschlumpf2mo ago
You mean credentials, right? This was a secret that you should not share at all
suming
sumingOP2mo ago
Randomly generated
Meierschlumpf
Meierschlumpf2mo ago
Yes it was randomly generated and visible to you in the logs so you can set it as env variable and then is ued for encryption of integration secrets Depending on your installation method, when you used docker run like mentioned above it is with 1. docker ps to list all your containers and then 2. docker attach <container-id> Once you are attached you can press the login button again and it should show an error
suming
sumingOP2mo ago
No description
Meierschlumpf
Meierschlumpf2mo ago
Okay seems like your database is readonly. Can you share how you specified the volumes in your docker run command (without sensitive things like the ENCRYPTION_KEY
suming
sumingOP2mo ago
No description
Meierschlumpf
Meierschlumpf2mo ago
Okay can you quickly go to your local /appdata folder and do a ls -al?
suming
sumingOP2mo ago
No description
suming
sumingOP2mo ago
No description
Meierschlumpf
Meierschlumpf2mo ago
Okay it seems like this directory is not owned by the required user and group. So we can change this with sudo chown 1026:100 ./appdata Then the user and group should be changed and after restarting the container it should work
Meierschlumpf
Meierschlumpf2mo ago
Thats also what is documented here when running homarr as a different user
Running as a different user | Homarr documentation
By default the container is running with user root and group root.
suming
sumingOP2mo ago
No description
Meierschlumpf
Meierschlumpf2mo ago
Can you attach to the docker logs again to see what is the problem?
suming
sumingOP2mo ago
No description
Meierschlumpf
Meierschlumpf2mo ago
Oh I see db and redis have to be changed as well, my bad.
Solution
Meierschlumpf
Meierschlumpf2mo ago
Use sudo chown -R 1026:100 ./appdata instead. It also applies to all sub directories / files
suming
sumingOP2mo ago
yes,ok. Thanks
Meierschlumpf
Meierschlumpf2mo ago
Did it work? Then I'll mark it as answered
suming
sumingOP2mo ago
I should actually remove the GID and PID because of permissions 👍 Yes, it's already normal
Meierschlumpf
Meierschlumpf2mo ago
You don't need to remove them, but it is easier to manage it without as it runs as root in the container and so is allowed to read / write any mounted volume. If you want to run it as somebody else because of security concerns the permissions of all mounted volumes have to be changed manually.
suming
sumingOP2mo ago
Ok, thank you, because synology 7.2.2 changed the permissions of the docker directory. I forgot the question I still use the old habits.

Did you find this page helpful?