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:
/home/wann/docker/homarr/appdata:/appdata
/home/wann/docker/homarr/appdata:/appdata
Solution:
OK. We made it! I've added :Z to volume in my docker-compose.yml like this:
- /home/wann/docker/homarr/appdata:/appdata:Z
- /home/wann/docker/homarr/appdata:/appdata:Z
and I've added SELinux rule with:
chcon -Rt svirt_sandbox_file_t /home/wann/docker/homarr/appdata
chcon -Rt svirt_sandbox_file_t /home/wann/docker/homarr/appdata
...
Jump to solution
26 Replies
Cakey Bot
Cakey Bot4w 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?
Manicraft1001
Manicraft10014w ago
!qa required_data
Cakey Bot
Cakey Bot4w ago
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.
Wannoyeah
WannoyeahOP4w ago
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.
Manicraft1001
Manicraft10014w ago
Who is the owner of /home/wann/docker/homarr/appdata? What are the permissions of that directory?
Wannoyeah
WannoyeahOP4w ago
I chown-ed it to 777
Manicraft1001
Manicraft10014w ago
Never chown anything to 777!
Manicraft1001
Manicraft10014w ago
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.
Manicraft1001
Manicraft10014w ago
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?
Wannoyeah
WannoyeahOP4w ago
yes, with -R flag I also did chmod 777...
Manicraft1001
Manicraft10014w ago
Also recursively?
Wannoyeah
WannoyeahOP4w ago
yeah
Manicraft1001
Manicraft10014w ago
Can you do a ls -lha in /home/wann/docker/homarr/appdata and post the result here?
Wannoyeah
WannoyeahOP4w ago
Permissions Size User Date Modified Name
drwxrwxrwx@ - 777 5 феб 09:17 appdata
.rw-r--r--@ 692 wann 5 феб 10:24 docker-compose.yml
Permissions Size User Date Modified Name
drwxrwxrwx@ - 777 5 феб 09:17 appdata
.rw-r--r--@ 692 wann 5 феб 10:24 docker-compose.yml
Manicraft1001
Manicraft10014w ago
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.
Wannoyeah
WannoyeahOP4w ago
yeah... I see let me correct that
Manicraft1001
Manicraft10014w ago
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
Wannoyeah
WannoyeahOP4w ago
/app # mkdir /appdata/test
mkdir: can't create directory '/appdata/test': Permission denied
/app #
/app # mkdir /appdata/test
mkdir: can't create directory '/appdata/test': Permission denied
/app #
Manicraft1001
Manicraft10014w ago
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?
Wannoyeah
WannoyeahOP4w ago
I think it has to do something with the selinux I have other containers running without issues
Manicraft1001
Manicraft10014w ago
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?
Wannoyeah
WannoyeahOP4w ago
I think that some policy is blocking it
Manicraft1001
Manicraft10014w ago
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
Wannoyeah
Wannoyeah4w ago
OK. We made it! I've added :Z to volume in my docker-compose.yml like this:
- /home/wann/docker/homarr/appdata:/appdata:Z
- /home/wann/docker/homarr/appdata:/appdata:Z
and I've added SELinux rule with:
chcon -Rt svirt_sandbox_file_t /home/wann/docker/homarr/appdata
chcon -Rt svirt_sandbox_file_t /home/wann/docker/homarr/appdata
After that I've restarted the container, and now it works. 🎊 Thanks for the help and quick response!
Manicraft1001
Manicraft10014w ago
Glad you got it working. Can I mark this as resolved?
Wannoyeah
WannoyeahOP4w ago
yes. It is resolved.

Did you find this page helpful?