Add SSL cert and key to Nextcloud Apache Container
Good Day.
I have Nextcloud AIO loaded through the Marketplace, and setup to the point of the initial AIO login. When asked by NC AIO's 'New Instance' for a domain name, i cannot connect.
I am already accessing from my domain/subdomain, and DNS is routed through CloudFlare. I understand i can use :8443 fine currently, and the installer looks for access to :443, which currently gets a 526 from CloudFlare.
I have an Origin SSL certificate generated, installed in my linode's /etc/ssl directories, but i cannot figure out how to get the certs to the aio-apache container, which i assume is where i need it. I have also added the cert to /usr/local/share/ca-certificates, updated and received a 'updated 1, removed 0' return.
Any help is welcome.
Thank You
1 Reply
Since the Marketplace application is configured to work with seamlessly with the Linode DNS manager to create a subdomain hosted on our platform, reconfiguring the certificate files may be a bit more of a headache than it's worth. However, I suggest reaching out in the Discussion channel in the Nextcloud AIO GitHub repo if you'd still like to explore that option.
In my testing, I found that my NextCloud site was accessible through my Linode's rDNS domain. I tried to change the domain but the instructions there didn't offer any solution since the file didn't actually have my domain name in it anywhere. Next I found where the certs were held in the container mnt/docker-aio-config/caddy/certificates
but was unable to determine the best way to remove and replace them with my desired certs.
This Stack Exchange post explains how you can add certs from your host machine to the docker container. I haven't tested it but it should work.
To make this deployment simpler, I believe you have 2 options.
- You could move your domain to the Linode DNS Manager so deployment is simple with just a few minor pieces of info.
- You can delete your current NextCloud AIO instance and spin up a fresh Ubuntu 22.04LTS server, use the Linode guide for setup and securing (or the Marketplace App and follow the NextCloud instructions for deployment from the beginning.