Update Podman documentation to use Quadlet for systemd deployment #4206
Replies: 5 comments
-
Therefore, I would replace it with I would recommend putting the files related to Vaultwarden in one directory. Quadlet supports reading files inside a directory in the search path. Therefore, I would put
I am not sure if a coupling to Caddy is a good idea. I for example use Traefik instead. Maybe we can keep it reverse-proxy-agnostic or explicitly mark Caddy as an example? For the second case, I could contribute a Traefik example. Disclaimer: I didn't test these Quadlet files. I don't even host Vaultwarden (I really appreciate it, but I use KeePass). I just wanted to give some feedback 😇 |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for your response and sorry for the delay!
Good point. Most examples I've seen include
That's a great idea. Thanks!
Noted. I was just taking the lead from a Red Hat Engineers blog and I don't think it hurts to leave them in.
Fair point. I suppose I was just trying to replicate the following example to a certain degree:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the config examples above! I'm now running with only the following container file in
This also doesn't require setting |
Beta Was this translation helpful? Give feedback.
-
I made one successfully. works for fedora 40.
|
Beta Was this translation helpful? Give feedback.
-
A side note regarding the use of Traefik and Caddy. I started writing some examples (Caddy has support for socket activation in https://github.com/caddyserver/caddy/releases/tag/v2.9.0-beta.3 |
Beta Was this translation helpful? Give feedback.
-
Quadlet was integrated into Podman 4.4 and allows for a simplified systemd deployment (similar to docker-compose).
https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html
I would have made this a PR instead of a discussion post, but since I haven't actually ran vaultwarden in production, I would like others to scrutinize the config and offer feedback first.
I've made both containers rootless by adding the following to /etc/sysctl.conf
net.ipv4.ip_unprivileged_port_start=80
Here are the files:
~/.config/containers/systemd/vaultwarden/vaultwarden.container
[Unit] Description=Vaultwarden Container [Container] Image=ghcr.io/dani-garcia/vaultwarden:latest ContainerName=vaultwarden HostName=vaultwarden AutoUpdate=registry Network=caddy-bridge.network Volume=vaultwarden.volume:/data #PublishPort=127.0.0.1:8080:80 [Install] WantedBy=multi-user.target default.target
~/.config/containers/systemd/vaultwarden/vaultwarden.volume
~/.config/containers/systemd/networks/caddy-bridge.network
~/.config/containers/systemd/caddy/caddy.container
~/.config/containers/systemd/caddy/caddy-data.volume
~/.config/containers/systemd/caddy/caddy-config.volume
The following is a separate idea of mine. Not applicable to the documentation update.
Since I don't administer any legitimate domains, I'm using Caddy to self-sign .lan hosts.The only issue is that you have to extract the cert and import it into all of your browsers.
EDIT: I've since registered a domain and won't be using the TLS internal setup. Too much hassle to manually import the certs into family devices. I'll leave the Caddyfile below as is, but it's not what I actually use.
/etc/caddy/Caddyfile
Also, the AutoUpdate feature does not currently work within a pod, otherwise I would have suggested creating a pod (containers/podman#20675)
Beta Was this translation helpful? Give feedback.
All reactions