Homarr Quadlet
Hello.
I wrote this quadlet for homarr:
[Unit]
Description=Homarr
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
[Container]
Image=ghcr.io/ajnart/homarr:latest
ContainerName=homarr
HostName=192.168.60.139
Network=host
AutoUpdate=registry
Volume=/home/xxx/homarr-app/assets/:/www/assets
PublishPort=192.168.60.139:7575:7575/tcp
Timezone=Europe/Prague
[Service]
Restart=always
[Install]
Start by default on boot
WantedBy=multi-user.target default.target
Then I ran systemctl daemon-reload and systemctl start homarr.
It works well, but whenever I restart homarr, all my changes are dropped. I was searching for some permission issues or something and found none.
/home/xxx/homarr-app/assets is still empty though. Can you please advise?
7 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?
Well... maybe if you read the documentation at https://homarr.dev/docs/getting-started/installation you'd know why?
🚀 Installation | Homarr documentation
We provide multiple installation methods. Are you a newbie to Docker? We recommend Docker Compose for beginners.
Please also note that we only provide support for the official installation methods, listed on the documentation.
Making your own installation method requires you to read documentation and understand the product.
Well, I hoped that this might become official installation method in the future.
I did read the documentation, but using:
Volume=/home/xxx/homarr/configs:/app/data/configs
Volume=/home/xxx/homarr/data:/data
Volume=/home/xxx/homarr/icons:/app/public/icons
instead of
Volume=/home/xxx/homarr-app/assets/:/www/assets
Lead to the Homarr not starting at all.
Even when the folders do exist.
I tried to give them all the permissions (777)
I found
cp: cannot create regular file '/app/data/configs/default.json': Permission denied
Seems that the container can't write. So give it permissions then?
Also /www/assets does not exist in the Homarr image. It will never be accessed (read nor write) by Homarr
Got it. As the /www/assets doesn't exist, it wouldn't trigger the error with access rights.
I realized I have SElinux enabled, so changing to:
Volume=/home/vpelcak/homarr/configs:/app/data/configs/:Z
Volume=/home/vpelcak/homarr/data:/data/:Z
Volume=/home/vpelcak/homarr/icons:/app/public/icons/:Z
allowed me to start the service.
It still doesn't work, but I'm at least making the progress.
Solution
OK.
It works now.
Using:
[Unit]
Description=Homarr
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
[Container]
Image=ghcr.io/ajnart/homarr:latest
ContainerName=homarr
HostName=192.168.60.139
Network=host
AutoUpdate=registry
Volume=/home/xxx/homarr/configs:/app/data/configs/:Z
Volume=/home/xxx/homarr/data:/data/:Z
Volume=/home/xxx/homarr/icons:/app/public/icons/:Z
PublishPort=192.168.60.139:7575:7575/tcp
Timezone=Europe/Prague
[Service]
Restart=always
[Install]
WantedBy=multi-user.target default.target
Makes it work and save the states and everything.