herzenschein / herz-quadlet

A repository where I store my podman quadlets.
GNU General Public License v3.0
7 stars 0 forks source link

herz-quadlet

A repository where I store my podman quadlets.

What are Quadlets?

Quadlets are a new way to manage containers. They consist of .container files.

They were originally a separate project which has now been merged into Podman.

By writing an INI file with the .container extension (as well as .network, .volume and .kube if needed) and storing it in a certain directory, systemd is able to automatically generate a systemd service using systemd-generate. Once the service is started, it will pull all required images and run a podman container.

It deprecates, but is not a direct alternative to, podman-generate-systemd. It is more of an alternative to docker-compose.yml or compose.yml files. So instead of writing compose files following the Compose Specification, and instead of using something like docker compose or podman compose, you write files in INI format, similarly to a systemd unit.

It is not a direct alternative to podman-generate-systemd because it does not generate the new format using your existing compose files. You need to manually create new files based on them. Thankfully, there is a tool called Podlet that is able to generate container files for you based on podman run, podman compose or a {docker-}compose.yml.

Where are Quadlets stored?

Podman unit search path:

Podman user unit search path:

If you have no idea how to get started or you are using rootless Podman, store your container files in ~/.config/containers/systemd/ and run them as a user.

Quickstart

  1. Create the folder ~/.config/containers/systemd/.
  2. Copy the owncast.container file to ~/.config/containers/systemd/.
  3. Run systemctl daemon-reload --user.
  4. Run systemctl start --user owncast.

Done, you now have your own selfhosted Owncast instance! You can visit it under localhost:8080 and configure it under localhost:8080/admin.

Additionally, the following commands might be useful to you:

What do you need to use Quadlets?

Learn more about Quadlets

The real source-of-truth documentation is podman-systemd.unit. You might also want to look at systemd.unit and systemd.service to learn more about how to manage systemd services.

Current caveats

Advantages of Quadlets