Fcos container autostart?

I was read the following tutorial. And its works well.
How do i use that to get a container to autostart? Rootless podman.

When does podman make the service file in /run/user/1000/systemd/generator/
After having a unit file myApp.container dropped off in /var/home/core/.config/containers/systemd/

In that, can i just put a "storage: links: - path://target: " into my butane and call it a day
or would i need to have some service that runs at reboot/shutdown/powerON to symlink the files into place and reboot once post install?

First of all, to run systemd user units on boot you need to enable lingering (create a file /var/lib/systemd/linger/$USER).

For Quadlets, you’ll additionally need to make sure that the network-online.target is enabled and wanted by multi-user.target, because your Quadlet units will gain a dependency on podman-user-wait-network-online.service, which simply waits in a loop for network-online.target to become active.

According to man podman-systemd.unit, the generator will then read the Quadlet files “during boot (and when systemctl daemon-reload is run)”. You won’t have to create any extra links etc. after placing your Quadlets in ~/.config/containers/systemd/.

Here is a snippet that should work:

storage:
  files:
    - path: /var/lib/systemd/linger/core
systemd:
  units:
    - name: network-online.target
      enabled: true
      dropins:
        - name: 10-wanted-by-multi-user.conf
          contents: |
            [Install]
            WantedBy=multi-user.target

I published an extensive configuration example on GitHub for a server running rootless Quadlets. It uses the extended Pyromaniac syntax instead of pure Butane but should be relatively easy to understand anyways.

Im sorry, i posted the wrong link. should have been:
Launching a user-level systemd unit on boot :: Fedora Docs

Past that:
Yes, lingering. I seem to have that working.

Im slightly interested in that network-online.target. I read a few github discussions on that.
I ended up taking each Container Unit and setting:
[Unit]
Description=phpIPAM MariaDB
After=podman-user-wait-network-online.service
Wants=podman-user-wait-network-online.service

I did NOT set the last:
[Install]
WantedBy=multi-user.target

I assumed that was fine.
podman-user-wait-network-online.service seems to work. But network-online.target may have also worked. Podman will change that out anyway being a rootless container unit/quadlet.

where i get is everything is ready to go, just doent start unless i ‘systemctl --user start container’

This talks about the podman-user-wait-network-online.service:

I have lost where i located /run/user/1000/systemd/generator/dashy.service from. but thats the location that systemd appears to read for rootless units. setting a symlink to that location makes it work on reboot.

I think you misunderstood. The generator automatically adds the dependencies on podman-user-wait-network-online.service. What you need to do, is adding the drop-in to the system unit called network-online.target, as is done in my YAML example.

You also don’t need to worry about /run/user/1000/systemd/generator/. You specify the units by placing .container, .image, etc. files in /home/core/.config/containers/systemd/. If you want them to be started at boot, you need to have “WantedBy=default.target” in the unit’s “[Install]” section.

TL;DR

  1. Add file /var/lib/systemd/linger/core
  2. Add the WantedBy=multi-user.target drop-in to network-online.target
  3. Create units in ~/.config/containers/systemd/ with WantedBy=default.target