SSL certificate location in NEXTCLOUD-AIO docker for other images

Hello community

if anyone (like me) needs to find SSL certificates generated by nextcloud-aio installation for other usage, there it is.

My need was to reuse nextcloud certificates for other docker images, like homeassistant (but not limited to it).
This as a temporary solution while implementing a reverse proxy architecture with Traefik that manages better the web entrypoints and redirections.

Nextcloud-aio stores the SSL certificates in apache docker, available in path
/var/snap/docker/common/var-lib-docker/volumes/nextcloud_aio_apache/_data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/yourdomain.org

in this path you will have three files

  1. yourdomain.org.crt ← this is the public certificate file
  2. yourdomain.org.key ← this is the private certificate file
  3. yourdomain.org.json - ignore this

so copy
yourdomain.org.crt file to homeassistant/config/certs/fullchain.pem
yourdomain.org.key file to homeassistant/config/certs/privkey.pem

NOTE: there is no need to manipulate source certificates, just renaming the extention will work for homeassistant, for other usage refer to specific configuration needs.

Hi, this is a bad solution. If you need to reuse the certificates, I would rather recommend to actually install a reverse proxy and configure AIO to run behind that. See all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub

Additionally, based on the path /var/snap/docker/common/var-lib-docker you apparently installed docker via snap which is disrecommended by the docker maintainers afaik.

Thanks to point it out more, indeed I declared this as workaround (read it also as quick-and-dirty) while implementing a robust solution

about use of docker installed via snap, I just discovered the controversial reception of snap packages and will use the apt installation of docker :slight_smile:

1 Like