HomarrH
Homarr13mo ago
Rodelero

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?
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.
Was this page helpful?