2025-04-14 13:16:00
podman-desktop.io
Containers are typically deployed in Kubernetes clusters.
However, for smaller-scale use cases such as on a single-node server or during development, Kubernetes can be overkill.
What’s a more lightweight solution for running autonomous applications with multiple interacting containers?
In this blog, we’ll dive into what Quadlets are, their benefits, and how to use them within Podman Desktop.
What Are Quadlets?
Podman Quadlets allow you to manage containers declaratively using systemd1.
Since version 4.4, Podman can create, start, and manage containers (including pulling images, creating volumes, and managing pods) through systemd.
Quadlets are simplified configuration files—recognized by their specific extensions,
such as *.container
, *.pod
, or *.image
that are processed during startup or when you reload the daemon using the systemctl daemon-reload
command.
Quadlets generate the equivalent systemd unit files, streamlining the container management process.
Why Use Quadlets?
- Declarative Configuration: Similar to Compose or Kubernetes manifests, Quadlets allow you to declare what you want to run, simplifying the workload setup.
- Tight System Integration: Quadlets align with Podman’s philosophy of integrating seamlessly with Linux, leveraging systemd’s process management capabilities.
- Ease of Automation: Quadlets make it simple to configure containers to start at boot, restart on failure, and more.
Example: A Quadlet File for Nginx
Below is an example of an nginx.container
Quadlet file, which starts an nginx container at boot:
~/.config/containers/systemd/nginx.container
# nginx.container
[Container]
ContainerName=nginx
Image=nginx
PublishPort=80:8080
[Service]
Restart=always
This configuration ensures the container restarts automatically if stopped, and exposes port 8080.
Using the Podman Quadlet Extension in Podman Desktop
Managing Quadlets directly on non-Linux platforms can be challenging due to virtualized environments (e.g., WSL or Hyper-V).
Fortunately, the Podman Desktop extension Podman Quadlet simplifies this process, enabling you to list, generate, and edit Quadlets visually.
Key Features of the Extension
- Integration with Podlet: Generates Quadlets from existing Podman objects2.
- Quadlet Management UI: Provides a dedicated interface to list, edit, delete, start, and stop Quadlets.
- Logs Viewer: Fetches and displays systemd logs using journalctl for troubleshooting.
Installation
If you already have the latest version of Podman Desktop, you can click here to install the Podman Quadlet extension.
Alternatively, navigate to the Extensions page within Podman Desktop to install it.
List Quadlets 📋
On the Podman Quadlet page, you can view all the Quadlets available across your Podman machines. To update the list, click Refresh.
In Podman Desktop, you can see that a dedicated icon is used for the containers managed by a Quadlet.
Generate Quadlets 🔨
To generate a Quadlet from an existing container, you’ll need to install Podlet. The extension simplifies installation.
Use one of the following ways to install Podlet:
- Go to Settings > CLI Tools and install Podlet using the Podman Quadlet extension.
- Download Podlet manually from its GitHub release page.
Example: Generate a Container Quadlet
- Start a container using Podman:
podman run --name nginx-demo -d -p 80:8080 nginx
- In Podman Desktop, find your container on the Containers page.
- Click the overflow menu icon and select Generate Quadlet.
- Click Generate to finalize the Quadlet.
- Optional: Edit the Quadlet configuration details.
- Click Load into machine.
Congrats 🎉 you created your first Quadlet!
Edit Quadlets 🖊
Click the Quadlet STATUS icon to view its details page, which has three tabs:
- Generated: View the systemd unit generated by Podman (read-only).
- Source: Edit the Quadlet file directly.
- Logs: Monitor logs for the service using journalctl.
You can make changes to the Quadlet’s source file and apply updates as needed.
View Quadlet Logs 📜
Since a Quadlet’s corresponding resource is managed by systemd we can access corresponding unit’s logs using journalctl.
Conclusion
Podman Quadlets provide a powerful way to manage containers declaratively with systemd, bridging the gap between lightweight container management and full orchestration tools like Kubernetes.
With the Podman Quadlet extension in Podman Desktop, users gain a convenient interface to manage Quadlets visually, reducing complexity and saving time.
Try it today and streamline your container workflows!
Keep your files stored safely and securely with the SanDisk 2TB Extreme Portable SSD. With over 69,505 ratings and an impressive 4.6 out of 5 stars, this product has been purchased over 8K+ times in the past month. At only $129.99, this Amazon’s Choice product is a must-have for secure file storage.
Help keep private content private with the included password protection featuring 256-bit AES hardware encryption. Order now for just $129.99 on Amazon!
Help Power Techcratic’s Future – Scan To Support
If Techcratic’s content and insights have helped you, consider giving back by supporting the platform with crypto. Every contribution makes a difference, whether it’s for high-quality content, server maintenance, or future updates. Techcratic is constantly evolving, and your support helps drive that progress.
As a solo operator who wears all the hats, creating content, managing the tech, and running the site, your support allows me to stay focused on delivering valuable resources. Your support keeps everything running smoothly and enables me to continue creating the content you love. I’m deeply grateful for your support, it truly means the world to me! Thank you!
BITCOIN bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge Scan the QR code with your crypto wallet app |
DOGECOIN D64GwvvYQxFXYyan3oQCrmWfidf6T3JpBA Scan the QR code with your crypto wallet app |
ETHEREUM 0xe9BC980DF3d985730dA827996B43E4A62CCBAA7a Scan the QR code with your crypto wallet app |
Please read the Privacy and Security Disclaimer on how Techcratic handles your support.
Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.