Podman Quadlets are declarative unit files that describe how to run a container (or pod, volume, or network) as a systemd service. Instead of writing a rawDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Pratyay360/podman-ts/llms.txt
Use this file to discover all available pages before exploring further.
[Service] unit by hand, you write a Quadlet file (e.g. myapp.container) and Podman’s systemd generator translates it into a fully managed service. QuadletsManager gives you a TypeScript interface to install, inspect, read, and remove those unit files programmatically. Access it via client.quadlets on any PodmanClient instance.
QuadletsManager methods
list
Server-side key/value filters to narrow the result set (e.g.
{ name: "myapp" }).get
NotFound if no unit with that name exists.
exists
true if a Quadlet with the given name is installed, false otherwise. Does not throw.
install
QuadletFileItem can be:
- A
[filename, content]tuple — the filename should include the extension (e.g."myapp.container"); content may be astringorUint8Array. - A file path string to a local
.quadletfile, or a path to a.tar/.tar.gzarchive containing multiple unit files.
Unit file(s) to install. See the description above for the accepted shapes.
Overwrite an existing unit file with the same name.
Run
systemctl daemon-reload after installation so systemd picks up the new unit.When you pass a single
.tar or .tar.gz path, the archive is uploaded directly. All other cases use a multipart form upload. Mixed arrays of paths and tuples are supported.getContents
delete
Name or
Quadlet instance to delete. Required unless options.all is true.Stop the associated service before deleting the unit file.
Do not error if the named unit is not found.
Run
systemctl daemon-reload after deletion.Delete all installed Quadlet units. When set,
name is ignored.Quadlet instance methods
AQuadlet object is returned by install(), get(), and list(). It exposes:
| Method | Signature | Description |
|---|---|---|
getContents | (): Promise<string> | Return the raw text of this unit file. |
delete | (options?: { force?: boolean; ignore?: boolean; reloadSystemd?: boolean }): Promise<string[]> | Delete this unit file. Returns the list of removed names. |
Quadlet instance properties
| Property | Type | Description |
|---|---|---|
name | string | Unit file name (e.g. "myapp.container"). |
unitName | string | Systemd unit name generated by the Quadlet generator. |
path | string | Filesystem path where the unit file is installed. |
status | string | Current systemd service status. |
application | string | Application name from the unit’s App field. |