I switched to Fedora Silverblue a couple of monthes ago and while AppImage worked, I sometimes had issues with SELinux and it was not very convinient for me, so I managed to run PhotoStructure with built-in Podman, which is rootless and daemonless Docker alternative, but I did it ‘wrong’ way. Recently I decided to read some docs about quadlet containers and managed to do it ‘correct’ way, with systemd services, so my containers could auto-update themselfes and start with boot.
- Run podman container with this template (edit mounts and volumes pathes):
podman run \
--detach \
--label "io.containers.autoupdate=registry" \
--name myphotostructure \
--publish 1787:1787/tcp \
-e PUID="1000" \
-e PGID="1000" \
--user $(id -u):$(id -g) \
--volume /run/media/xx7/EXT4/PhotoStructure:/ps/library:z \
--volume /run/media/xx7/EXT4/PhotoStructure/tmp:/ps/tmp:z \
--volume /run/media/xx7/EXT4/PhotoStructure/logs:/ps/logs:z \
--volume /run/media/xx7/EXT4/PhotoStructure/config:/ps/config:z \
--mount type=bind,source=/run/media/xx7/EXT4/YandexDisk,destination=/YandexDisk,ro=true,relabel=shared \
--mount type=bind,source=/run/media/xx7/EXT4/Dropbox/Videos,destination=/Dropbox,ro=true,relabel=shared \
--mount type=bind,source=/run/media/xx7/EXT4/Takeout,destination=/Takeout,ro=true,relabel=shared \
docker.io/photostructure/server:alpha
- Generate systemd service and make some usefull preparations:
cd ~/.config/systemd/user
podman generate systemd -f --new --name myphotostructure
systemctl --user daemon-reload
loginctl enable-linger
systemctl --user enable --now podman-auto-update.service
systemctl --user enable podman-restart.service
Now we have container-myphotostructure.service
file, which could be edited in text editor if needed to change mounts or settings (like autostart from on-failure
to always
), than systemctl --user daemon-reload
again to reload it.
- Now we just enable the service and PhotoStructure is running now, it should start after booting the system, if not stopped before.
systemctl --user enable container-myphotostructure.service
We can replace enable
with disable
to disable it completly, or start
or stop
to start or shutdown it and is-active
to check the status.
I use Guillotine extension to make services switches to start/stop them:
Summary
The configuration is like this:
{
"type": "switch",
"title": "PhotoStructure",
"start": "systemctl --user start container-myphotostructure.service",
"stop": "systemctl --user stop container-myphotostructure.service",
"check": "systemctl --user is-active container-myphotostructure.service",
"icon": "emblem-photos-symbolic",
"interval_s": 30
}
I hope it could help Fedora or SELinux users.