Nextcloud with docker/portainer

Hello community

I hope you can help me. I have an raspberry pi4 with 8GB and raspian OS 64 but Lite (bullseye) installed. Also I have docker/docker composer And portainer.

I was trying to install nextcloud with mariadb and letsencrypt. The portainer stackfile could be deployed and all container were running only the letsencrypt have problems with cert, see also here my post: Nexcloud Setup Letsyencrypt stack file problem - Administrator.de

Does anyone can instruct me or send me a good howto? I want to use nextcloud in a docker container.

Thanks!

I am not sure if it’s actualy that clever to point to a post that is written in german, as it will drasticly reduce the number of people that are able to help…

Observations on your compose file:

  • version: "2" will not result in using the latest 2.x schema version, instead 2.0 will be used. Please use 2.4 instead.
  • linuxserver/letsencrypt is deprecated (and not updated since a year!). It is suggested to use linuxserver/swag instead.
  • I don’t see any configuration that would allow your letsencrypt/swag container to actualy forward traffic to your wordpress container.
  • The letsencrypt part seems incomplete.

Please make sure to read the desription of the linuxserver/swag image regarding the setup you are aiming for. Especialy how to setup the reverse proxy rules to make the wordpress container reachable thru swag, which provides a build-in nginx server for this. As both require manual reverse proxy rules, you should consider to use traefik or more likely nginx proxy manager, as the later provides a ui to configure everything.

Oh my fault sorry for that post:-(

I was now able to create a csr in my noip account and have now a certificate for my domain
myname.ddns.net
It’s a pem file.

Thx for the hint of swag. How can I now use my pem certificate und my docker compose file? What needs to be changed?

docker run -d \
  --name=swag \
  --cap-add=NET_ADMIN \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/London \
  -e URL=yourdomain.url \
  -e VALIDATION=http \
  -e SUBDOMAINS=www, `#optional` \
  -e CERTPROVIDER= `#optional` \
  -e DNSPLUGIN=cloudflare `#optional` \
  -e PROPAGATION= `#optional` \
  -e DUCKDNSTOKEN= `#optional` \
  -e EMAIL= `#optional` \
  -e ONLY_SUBDOMAINS=false `#optional` \
  -e EXTRA_DOMAINS= `#optional` \
  -e STAGING=false `#optional` \
  -p 443:443 \
  -p 80:80 `#optional` \
  -v /path/to/appdata/config:/config \
  --restart unless-stopped \
  linuxserver/swag

There is nothing to be sorry about. I just wanted to highlight that you will high likey get more responses if the content on the link target would have been english.

I am not sure why you created a csr… wasn’t the objective to let letsencrypt create the certificates for you?

If you don’t know how to setup swag to create letsencrypt certificates or how to create reverse proxy rules that actualy use the letsencrypt certificates, I would highly recommend to use the nginx proxy manager instead, as it will have a UI to configure letsencrypt and the reverse proxy rules.