When you have setup a NextCloud instance on your Pi - next step is sharing it with your family and friends. This topic is not on installing Pi or NextCloud or the internal configuration but the steps to take to share it using a public domain name.
This topic stems from the Self hosted cloud service topic and I thought - maybe a little write-up on the steps to share an instance using a domain-name.
Sure - you can do this using the public IP address of your internet connection - but several questions rise
This is where you need a registrar.
A registrar is an entity supplying usage rights for internet domain names - e.g. pacbang-linux.org or nix.dk.
One thing to remember - you don't buy a domain name - you buy the right to use it for period - usually a year - and the fee is paid up-front. If - subsequently - you don't pay - you loose that usage right. Many registrars allow for for multiple years upfront - some times at a discounted rate.
There is three contact levels for a given domain - ensure you are the owner contact - because this is where some shady resellers cheat - especially when you request who-is privacy.
There is a lot of registrars and not all are equally easy to work with - sometimes you only realize it when you want to transfer your domain to another registrar and the pain begins.
I know - there is a lot of registrars - so you may know some I don't or you may prefer one over mine - so this is to discuss why one registrar should be chosen over another, good vs. bad etc. - the registrar I have chosen is a well-known registrar with decades of spotless operation.
Joker is a swiss based registrar with the privacy and security Switzerland is known for.
As I am former self-employed IT consultant working with nearly every aspect of IT operation, hosting, DNS, maintenance and domain reseller - joker.com has by been among the best registrars to work with (I still have reseller account - albeit not using it anymore).
Joker's service portfolio has grown over the years - including both a free who-is privacy and an extended privacy at a nominal cost - and besides the yearly domain fee - everything else is free as in free coffee. The also offer free mail-forward using spam- and malware filters and a dynamic DNS service if you ISP is rotating your public IP.
You may have an idea - but is it available? You can search Joker's database to get an idea of what is available. The registration is straight forward and easy to complete.
While there is several possibilities for setting up the DNS - with joker you leave it at the A record.
But as many users - if you tell them the web address - will be prepending the domain with www - it is best practice to have a CNAME record pointing to your root domain
When logged into your joker account
If you do not have a dedicated public IP - even the DHCP assigned addresses rarely change - you may need to use their Dynamic DNS service (which I have no experience with).
When you are done - Click Save changes at the page bottom.
DNS records created have a TTL (time to live) at 86400s - so waiting for a change to propagate can be a pain. Clicking options for the A-record - then the Edit icon - you can set TTL to e.g. 600s which is 10m. Remember to Save changes - otherwise the changes will not be saved.
The last step is configuring your router. As there is a lot of different interfaces I cannot possibly know them all.
But the requirements is identical
Depending on your router - you may not be able to connect directly to your routers WAN address - in which case you can test the access using e.g. your phone to connect to it (disable wireless on your phone - forcing it to use broadband).
Another option is connecting to the internet using a VPN - then access your domain - but bear in mind that you will need to disconnect from VPN to be able to access your router’s configuration interface - if you need to troubleshoot the rules.
If you can connect :partying_face:
That is about it - welcome to the world of server admins.