If the version of podman installed in your system supports podlet (a.k.a >= 4.4.0), you should consider using podlet generators to help you generate SystemD unit files.
You should create a file named homebridge.container under $HOME/.config/containers/systemd:
[Unit]
Description=Homebridge Service
[Service]
Restart=always
[Install]
WantedBy=default.target
[Container]
Image=docker.io/homebridge/homebridge:latest
AutoUpdate=registry
ContainerName=homebridge
Network=host
Environment=TZ=America/Los_Angeles # Update with your timezone
Volume=%h/.containers/volumes/homebridge:/homebridge # Update with path to your volume
Start the service by running:
$ systemctl --user start homebridge.service
quadlet is a SystemD unit generator, located at /usr/lib/systemd/user-generators/podman-user-generator, it's a soft link to /usr/libexec/podman/quadlet
$ /usr/libexec/podman/quadlet -user -dryrun
quadlet-generator[29553]: Loading source unit file /home/xliang/.config/containers/systemd/homebridge.container
---homebridge.service---
[Unit]
Wants=podman-user-wait-network-online.service
After=podman-user-wait-network-online.service
Description=Homebridge Service
SourcePath=/home/xliang/.config/containers/systemd/homebridge.container
RequiresMountsFor=%t/containers
[Service]
Restart=always
Environment=PODMAN_SYSTEMD_UNIT=%n
KillMode=mixed
ExecStop=/usr/bin/podman rm -v -f -i --cidfile=%t/%N.cid
ExecStopPost=-/usr/bin/podman rm -v -f -i --cidfile=%t/%N.cid
Delegate=yes
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
ExecStart=/usr/bin/podman run --name homebridge --cidfile=%t/%N.cid --replace --rm --cgroups=split --network host --sdnotify=conmon -d -v %h/.containers/volumes/homebridge:/homebridge --label io.containers.autoupdate=registry --env TZ=America/Los_Angeles docker.io/homebridge/homebridge:latest
[Install]
WantedBy=default.target
[X-Container]
Image=docker.io/homebridge/homebridge:latest
AutoUpdate=registry
ContainerName=homebridge
Network=host
Environment=TZ=America/Los_Angeles
Volume=%h/.containers/volumes/homebridge:/homebridge
It basically reads the .container definition located under $HOME/.config/containers and generates an unit file for SystemD