Unable to start Homarr on Fedora Server 41 using docker compose
Hi, I'm currently facing an issue with homarr when trying to start it with docker compose. It probably has something to do with SELinux, but I'm not sure how to fix it. Other containers are running fine. I'm using recomended docker compose and my appdata is set to a folder in my home dir:
Solution:Jump to solution
OK. We made it! I've added :Z to volume in my
docker-compose.yml
like this:
and I've added SELinux rule with:
...26 Replies
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?
!qa required_data
Thank you for your question. Our support team has noted that your request does not meet the minimum required data so we are unable to answer your question.
Please provide:
- your Homarr logs
- your setup configuration (eg. docker compose, docker run, helm chart, screenshot, ...)
- A detailed description of your problem or question with additional images where necessary
- Your operating system
- Version of Homarr (do not say latest! say 0.15.2, ...)
Failure to comply with this will result in a permanent closure of your support request.
LOG
https://pastebin.com/MtAYhiYM
DOCKER COMPOSE
https://pastebin.com/5vM64yPE
Homarr cannot create subdirectories in appdata directory.
OS
Fedora Server 41
Kernel 6.12.11
HOMARR VERSION
1.4.0
Pastebin
Starting with UID='0', GID='0'mkdir: can't create directory '/appda...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
#------------------------------------------------------------------...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Who is the owner of
/home/wann/docker/homarr/appdata
?
What are the permissions of that directory?I chown-ed it to 777
Never chown anything to 777!
What Does chmod 777 Mean
Setting 777 permissions (chmod 777) to a file or directory means that it will be readable, writable and executable by all users and may pose a huge security risk.
And Homarr still gives the same error when the directory is 777? DId you chmod 777 recursively?
Just to make sure; chown and chmod are different. What did you set 777 with?
yes, with -R flag
I also did
chmod 777...
Also recursively?
yeah
Can you do a
ls -lha
in /home/wann/docker/homarr/appdata
and post the result here?You set the owner of
appdata
to 777, which is likely incorrect. Nevertheless, since you set the permissions to 777 (please revert this again!) it should work.yeah... I see
let me correct that
Please run
docker exec -it <homarr-container-id> sh
(replace the placeholder with your container name) and then run mkdir /appdata/test
. Does it work or produce the same error? You can exit from the container shell using CTRL + C or exit
So this means that this likely isn't a Homarr bug but something misconfigured.
You mentioned that it could be your distro? How would that be? Is it known to have such bugs?
I think it has to do something with the selinux
I have other containers running without issues
Yes, I get that. But how is Selinux relevant here? You keep mentioning that it could have something to do with it?
Do you run any weird architectures, platforms or experimental hardware? Arm?
I think that some policy is blocking it
I see. Just from some searching myself, that could be the issue. See https://web.archive.org/web/20190728100417/https://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/ and https://stackoverflow.com/questions/24288616/permission-denied-on-accessing-host-directory-in-docker . See https://stackoverflow.com/a/39508591 .
This is out of scope for the Homarr support and I can't help you with this.
Please look into this and let us know whether this fixed it. You can also post the solution here, so other users can re-use your solution.
Solution
OK. We made it! I've added :Z to volume in my
docker-compose.yml
like this:
and I've added SELinux rule with:
After that I've restarted the container, and now it works. 🎊
Thanks for the help and quick response!Glad you got it working. Can I mark this as resolved?
yes. It is resolved.