Skip to content

Latest commit

Β 

History

History
74 lines (48 loc) Β· 2.13 KB

File metadata and controls

74 lines (48 loc) Β· 2.13 KB

quadlets

A cozy home for my Podman Quadlets.

I originally managed my containers like everyone else with docker. But I have decided to migrate my container stack to podman. The docker version of this isn't getting any more updates but if you are interested you can check it out here.

Overview πŸ—‚οΈ

This repository contains a collection of Quadlet files I use to define containers as systemd services on my homelab.
Quadlets are a neat way to manage Podman containers β€” they let you configure everything declaratively using .container unit files.

Getting Started πŸš€

Wanna use these Quadlets? Here's how:

1. Clone the Repo πŸ“₯

git clone https://github.com/philipp-mlr/quadlets
cd quadlets

2. Set Up Environment Variables

There are two types of .env files:

πŸ”Ή Global .env file

Located in the root directory (.env.example), this file defines environment variables used across multiple containers.

I use this mostly to work around the fact that systemd labels don't support env vars β€” adjust it to your needs (e.g., domains and paths).

Copy and edit the example:

mv .env.example .env
nano .env

πŸ”Ή Container-specific .env files

Each container can have its own environment file in its directory.
These files define container-specific variables.

Example for Portainer:

cd ./rootless/portainer
mv portainer.env.example portainer.env
nano portainer.env

3. Update Systemd & Start Everything πŸ”

Use the update.sh script in the root folder β€” it handles everything for you:

  • Copies rootless files β†’ ~/.config/containers/systemd/rootless
  • Copies rootful files β†’ /etc/containers/systemd/rootful (πŸ”’ root required)
  • Substitutes all env vars in .container files using your global .env
  • Reloads systemd
  • Starts all services πŸ’¨

Run it like this:

chmod +x ./update.sh
./update.sh

Contact πŸ’¬

Found a bug? Got a cool idea?
Open an issue or reach out β€” happy to connect!