Vaultwarden env file and podman

Hi! I’m setting up vaultwarden on my machine running Rocky Linux 8.5 and Podman latest version: i would like create the pod with the flag --env-file=/path/to/env/file to customize my setup but i read that this flag is only for older versions of podman. Is there another way to configure it or i have to insert in the unit file an entry “EnvironmentFile=/path/to/env” ?

Thank you

Here is what I found

ExecStart=/usr/bin/podman run --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid --env-file=/home/spytec/Vaultwarden/vaultwarden.conf -d -p 8080:8080 -v /home/spytec/Vaultwarden/vw-data:/data/:Z vaultwarden/server:latest

Where vaultwarden.conf environment file can contain all the container environment values you need

Thanks @cksapp, but this configuration is for older version of Podman, or it works also with newer?

I’ve tried the same unit file specified in wiki (obv with my paths for env-file and vw-data folder) but when i try to start vw i have this error:

– The unit vaultwarden.service has entered the ‘failed’ state with result ‘exit-code’.
Feb 04 11:27:10 asstgbw1vm[1]: Failed to start Podman container-vaultwarden.service.

I have SElinux in enforcing mode, maybe this could create problems?

Where did you read that? I did not find anything in the release notes and the current version (podman 3.4.4) still supports that flag.

Hi @stefan0xC , i read in this page in the section " New container every restart"