Run a toolbox app at startup?

Hey all, I’m new to Fedora & the atomic way of doing things but I’m loving the desktop experience however how to do things when it comes to background apps and terminal programs is a little more confusing to me. I want to run syncthing at startup to keep my pictures & documents synced with my home server so I thought I’d install it in a toolbox but I’m not sure how to go about having the app run at startup. Could anyone point me in the right direction or if there is a better way to do this?

export the app from inside toolbox. And add it to startup.

Export the app? I haven’t heard of that as an option, could you explain?

If you installed syncthing from the Fedora repository you can just enable it

systemctl --user enable syncthing

Yes that’s the rpm-ostree way of installing it, I was more interested in doing things through toolbox since everything I’ve read says only do layering as a last resort.

You can execute toolbox run syncthing in a shell script.

toolbox run [options] <arg …​>
Runs a command in a toolbox without entering it. Used without options, toolbox run runs the command in the default toolbox.
To run a command in a toolbox with specific name, use the --container <name> | -c <name> option.

That’s right, but you can access your user systemd units from within toolbox and distrobox. Have you tried activating the unit from within your box?

Honestly, this is something that I would just layer with rpm-ostree. In a toolbox, it won’t auto-update, and this seems pretty security-sensitive. Any attempt to make it auto-update would be non-atomic (although it appears pretty self-contained, so that might not matter). There’s also the convenience of having the systemd units already set up.

A flatpak could probably cover your usecase, but that doesn’t exist.

There’s also an official docker image that could be used with podman.

Inside a toolbox, systemctl is talking to systemd on the host, so it won’t see unit files installed in the container.

The only thing you could do is copy /usr/lib/systemd/user/syncthing.service into ~/.config/systemd/user/ and edit it to invoke toolbox.

This might be the way to go I think, guess I need to look up how to work with podman quadlet?

or use distrobox and systemd in the box (-I), and start the box at login.