Nextcloud (marketplace) and external domain
I'm trying to set up Nextcloud (marketplace) with a subdomain (The main domain is using another providers name servers).
Lets say the subdomain is xxx.yyy.com. I was hoping that I could point xxx.yyy.com to the IP addresses of my Linode.
When I install Nextcloud it asks for:
- Your Linode API token. This is required for creating DNS records.
- The subdomain for the Linode's DNS record (Requires API token)
- The domain for the Linode's DNS record (Requires API token)
Should I fill in these fields when I'm not using Linodes name servers?
And can I use the SSL certificate from Lets Encrypt
Would you like to use a free Let's Encrypt SSL certificate? (Requires domain)?
There are a couple routes you could take here…
Setting up DNS records through the Nextcloud One-Click App
If you opt to set up your domains through the Nextcloud One-Click App, it will automatically create DNS records for both your domain and subdomain in Linode's DNS Manager, pointing them to your Linode's IP address. This would conflict with the DNS records that you already have set up with your primary domain, yyy.xxx. Additionally, opting for the SSL requires that you also have your domains listed.
As a workaround you could input your subdomain xxx.yyy.zzz as the primary domain, and then leave the subdomain field blank - this would create a DNS record that lists your subdomain in the SOA record, essentially treating it as a primary domain in our DNS manager.
If you go this route, though, you’d have to create NS records for Linode’s name servers with the provider hosting your primary domain (yyy.zzz). This is where your primary name servers are located, so if you don't create any NS records for Linode then queries won’t know where to look when searching for your subdomain.
Manually configuring your DNS
If you already have your primary domain's DNS records set up elsewhere, you could just manually add an A record for your subdomain and point it to your Nextcloud server's IP address. My advice would be to host your subdomain DNS records in the same location as your primary's to keep everything in one place, but that's just my two cents.
Should you need to manually configure your Nextcloud server for your subdomain there are a few required steps:
- Add the subdomain your Nextcloud’s Trusted Domains
- Edit your virtual hosting file for Apache. Instructions for how to do so are here: Configure Virtual Hosting
- Edit your /etc/hosts file
In terms of the SSL certificate, you can follow the instructions here to enable a simple self-signed cert in Apache: Enable SSL
Alternatively you can configure this yourself in Apache with the certificate you've already obtained: Configure Apache to use an SSL Certificate.
Essentially the job of the name server is to translate a domain name into an IP address. You identify the name servers you want to use with your domain registrar - right now you have specified name servers of $ProviderX with your registrar.
If you were to create a DNS record on Linode for your subdomain, then you would be using our name servers to get that information out to the world; however you would need to essentially tie our name servers back to those of $ProviderX by including our NS entries in your primary domain’s zone file.
We explain this a bit more in our guide, DNS Records: NS Records <-- this goes into detail about how to add NS records in Linode's DNS manager, but the process/concept will be roughly the same for your other provider.