Rootless Podman Quadlet #3487
Replies: 46 comments 107 replies
-
Known issuesI've encountered some problems, however it is unknown whether these are actual bugs related to Podman or just usage errors.
For, now, you can manually update the mastercontainer by running systemctl --user stop nextcloud-aio-mastercontainer.service
podman pull docker.io/nextcloud/all-in-one:latest
systemctl --user start nextcloud-aio-mastercontainer.service |
Beta Was this translation helpful? Give feedback.
-
Will this solution also work with a Podman compose file? What is de advantage of using a systemd unit file? |
Beta Was this translation helpful? Give feedback.
-
Soft reset instructions systemctl --user stop nextcloud-aio-mastercontainer
containers=$(podman ps -a -f 'name=^nextcloud-aio' --format='{{.Names}}')
podman stop $containers
podman rm $containers
systemctl --user start nextcloud-aio-mastercontainer |
Beta Was this translation helpful? Give feedback.
-
Hey, I'm using podman (rootless) in favor of docker on FCOS. My first attempt to get this working like described above ended in an error at domain check. Maybe this is a networking issue as caddy is proxying to Next step was to skip domaincheck but that ended in an Bonus: |
Beta Was this translation helpful? Give feedback.
-
Hey there @loeffelpan,
are you running behind cloudflare? If so, this might be the reason for your domaincheck issues. When disabling the domaincheck, do the application errors look similar to the ones described in this comment? #3487 (reply in thread)
If so, this will be fixed in a newer version of podman. 4.7.0 doesn't contain this fix and I haven't tested 4.7.2 until yet, but I don't think it includes my fix already.
Until the fixed podman version is released, you can also patch the source code of your nextcloud AIO as described by @jennydaman here: #3487 (reply in thread)
|
Beta Was this translation helpful? Give feedback.
-
podman -v podman logs nextcloud-aio-mastercontainer |
Beta Was this translation helpful? Give feedback.
-
I'm confused that this question has not beeing asked. Maybe I missed something. |
Beta Was this translation helpful? Give feedback.
-
Anyone using collabora in this setup?
Without collabora nextcloud is working fine. |
Beta Was this translation helpful? Give feedback.
-
I followed the above steps on Fedora Silverblue 39 and was unable to start the
|
Beta Was this translation helpful? Give feedback.
-
Some notes from my last install. Hope it helps. cgroupsRunning containers as rootless requires cgroups version 2. Version 1 or hybrid mode v1/v2 doesnt work. Check the status SELinuxCheck the status with command NetavarkTodays versions of Podman comes with Netavark module, but existing installations are configured for CNI. If you have problems with intercontainer DNS resolution, switch it. Backup restoreBackup restore doesnt work during initial installation. Error is "Permission denied". Not sure if common bug or rootless install only. As a workaround, you can symlink backup directory to /tmp and use it for import |
Beta Was this translation helpful? Give feedback.
-
Thank you for these instructions. I was able to get this working through cloudflare tunnel by adding a "Bypass - include everyone" rule for the zero trust app. (Allow - include everyone did not work because it continued to ask for cloudflare OTP, which broke the mobile apps with "Malformed server configuration"). I will need to make modifications to config.php, namely |
Beta Was this translation helpful? Give feedback.
-
Fedora 39 here.
Any ideas? |
Beta Was this translation helpful? Give feedback.
-
On any mastercontainer update I got this error (in the logs of watchtower container): Same on starting newly created mastercontainer. |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
Hey!
It seems that for some reason podman needs catatonit in order to create other containers. I didn't know that it could have saved a couple of days of troubleshooting. I'm just documenting it here in case that someone has the same problem! |
Beta Was this translation helpful? Give feedback.
-
Anyone managed to make onlyoffice work? I cannot access the host from within the container. |
Beta Was this translation helpful? Give feedback.
-
Hi ! Could you PLEASE provide a "caddy.container" file for your setup ? EDIT: Guess i've got it: Did forget to set "network=host" in caddy.container 🤦 |
Beta Was this translation helpful? Give feedback.
-
About self/automatic updates
Not tried in practice, yet, but is not this a solved problem in the podman world? To use it you basically just need to add a label to the containers ( (IMHO; this is also better than how the Docker world does it, it's all handled by podman – it could apparently even handle rollbacks.) Maybe you can add this to the guide, @jennydaman? |
Beta Was this translation helpful? Give feedback.
-
Updated the master container and can't start the container with the following error:
Anyone else got issues or a fix? |
Beta Was this translation helpful? Give feedback.
-
Weird, I failed to make it work with |
Beta Was this translation helpful? Give feedback.
-
Updating the AIO master container from version 10.9.0 to a newer version that uses Suspected reason: The new version of This can be verified using the command:
Rolling back to the old master container version fixes the issue, so I suspect that changes in the master container Docker image have broken compatibility with Podman. If someone have same issue and have solution - please share it :) Client: Podman Engine |
Beta Was this translation helpful? Give feedback.
-
Thanks for this discussion. For me, no trouble with the network. Only one with "double" ports because a unifi quadlet already used them and nextcloud talk could not start. Disable talk and all works. However, I can't see how on the initial post step 5 ( My current container file:
I used traefik with this config (just the nextcloud parts)
|
Beta Was this translation helpful? Give feedback.
-
I am using CoreOS, podman quadlets and caddy as a reverse proxy. My domain verification fails currently.
in the AOI interface, I get this error when I want to confirm cloud.domain.be:
What's wrong here? |
Beta Was this translation helpful? Give feedback.
-
Not sure if helpfull I use this setup with traefik instead caddy and I'm realy suprised how well it works. |
Beta Was this translation helpful? Give feedback.
-
I feel a little bit suspicious by the use of
As you can read on podman documentation this practice is discouraged if the container is listening on TCP. I don't know if this is the case because usually it's hidden behind a reverse proxy, so is this causing a security issue? |
Beta Was this translation helpful? Give feedback.
-
I don't know if others have the problem, but for some reason the #6424 aio-clamav container can't create clamd.sock in the /run/clamav/ folder. This seem to be a podman issue, as docker was tested posetively. |
Beta Was this translation helpful? Give feedback.
-
I'm having some trouble and I think the issue is with NAT hairpinning. I got everything setup up to the point of launching the AIO interface but when I give it my DDNS domain name it errors with: The only logs I get from the AIO container say I'm really struggling here so thanks for any help! |
Beta Was this translation helpful? Give feedback.
-
Lately the master container is having problems starting Nextcloud Talk:
Any ideas? |
Beta Was this translation helpful? Give feedback.
-
For anyone who doesn't want to use the AIO docker, but like to have some more control and want to use Podman Quadlet with the community image at https://hub.docker.com/_/nextcloud, this is how it works for me: $ cd ~/.config/containers/systemd/nextcloud
$ tree
.
├── .env
├── nextcloud.container
├── nextcloud-cron.container
├── nextcloud-database.container
├── nextcloud.pod
└── nextcloud-redis.container $ cat .env
TZ=<choose-timezone-yourself>
PHP_UPLOAD_LIMIT=10G
MYSQL_HOST=127.0.0.1
MYSQL_ROOT_PASSWORD=<choose-password-yourself>
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
MYSQL_PASSWORD=<choose-password-yourself>
MARIADB_AUTO_UPGRADE=1
REDIS_HOST=127.0.0.1
REDIS_HOST_PASSWORD=<choose-password-yourself> The hosts must be $ cat nextcloud.container
[Unit]
Requires=nextcloud-database.service nextcloud-redis.service
After=nextcloud-database.service nextcloud-redis.service
[Container]
Image=docker.io/nextcloud:latest
ContainerName=nextcloud-nextcloud
EnvironmentFile=.env
Volume=<fill-in-volume-location-here>/nextcloud/:/var/www/html
Pod=nextcloud.pod
AutoUpdate=registry
[Install]
WantedBy=default.target $ cat nextcloud-cron.container
[Unit]
Requires=nextcloud.service
After=nextcloud.service
[Container]
Image=docker.io/nextcloud:latest
ContainerName=nextcloud-cron
Entrypoint=/cron.sh
EnvironmentFile=.env
Volume=<fill-in-volume-location-here>/nextcloud/:/var/www/html
Pod=nextcloud.pod
AutoUpdate=registry
[Install]
WantedBy=default.target The cron service allows to select "CRON (Recommended)" at the "Background jobs" section in the "Administration settings" > "Basic settings". It must use the same volume as $ cat nextcloud-database.container
[Container]
Image=docker.io/mariadb:latest
ContainerName=nextcloud-database
# https://github.com/nextcloud/docker/issues/1536
Exec=--transaction-isolation=READ-COMMITTED --binlog-format=ROW
EnvironmentFile=.env
Volume=<fill-in-volume-location-here>/database:/var/lib/mysql
Pod=nextcloud.pod
AutoUpdate=registry
[Install]
WantedBy=default.target $ cat nextcloud.pod
[Pod]
PodName=nextcloud
PublishPort=<fill-in-port-here>:80 $ cat nextcloud-redis.container
[Container]
Image=docker.io/redis:latest
ContainerName=nextcloud-redis
Exec=--requirepass <fill-in-redis-password-here>
Pod=nextcloud.pod
AutoUpdate=registry
[Install]
WantedBy=default.target
The container files have the The You can check all services using journalctl --user --unit nextcloud.service
journalctl --user --unit nextcloud-cron.service
journalctl --user --unit nextcloud-database.service
journalctl --user --unit nextcloud-pod.service
journalctl --user --unit nextcloud-redis.service You can use the
For example, to set the calendar refresh rate to once per hour:
|
Beta Was this translation helpful? Give feedback.
-
Here is my solution for rootless podman quadlet, which I finally made to work nicely. Quadlet for the nextcloud-aio-mastercontainer~/.config/containers/systemd/nextcloud-aio-master.container
it's taken in to use via following commands (enable not needed because quadlets relies to the [install] section
Systemd service for starting other containers nextcloud systemd service starts all other containers after nextcloud-aio-mastercontainer has started ~/.config/systemd/user/nextcloud.service[Unit]
Enabling nextcloud service
And voila after reboot nextcloud-aio-mastercontainer starts nicely with all it's containers |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This guide sets up Nextcloud-AIO using Podman in rootless mode and Quadlet behind a reverse proxy.
0. Install Podman
Podman version 4.8.0 or above is required. Older versions of Podman require workarounds, see edit history and discussion below.
1. Set up a reverse proxy
Consult the upstream documentation on how to do this: https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
An example
Caddyfile
might look like this:2. Create Systemd Unit File
Create the file
~/.config/containers/systemd/nextcloud-aio-mastercontainer.container
with the following content:Important notes:
/run/user/1001/podman/podman.sock
to the path of your Podman socket (podman info --format '{{ .Host.RemoteSocket.Path }}'
)nextcloud-aio
. The optionNetwork=bridge
enables this behavior, for details see podman network connect not implemented for slirp4netns containers/podman#19577 (comment)Also, create the file
~/.config/containers/systemd/nextcloud-aio-mastercontainer.volume
:3. Start the Services
4. (Optional) Configure Containers to Restart After Reboot
Podman is daemonless so unlike Docker, containers do not restart automatically after reboot.
To enable restart of Podman containers after reboot, see containers/podman#20418 (comment)
5. Business As Usual
Go to https://cloud.example.com:8443 to access the Nextcloud AIO interface and start the Nextcloud server.
Notes
Backups and mastercontainer self-updating might not work, these details have yet to been sorted out.
Beta Was this translation helpful? Give feedback.
All reactions