The most exclusive part of web hosting tends to be the domain name. It can cost a significant amount to rent a good name from places like GoDaddy. For some, the expense might be worth it. I am not one of those people.
In this guide, we will obtain a domain name from FreeDNS. Not only is this service free (as the name implies), but it also provides dynamic DNS, which is vital when hosting from home.
- Create an account at FreeDNS.
- Browse the Registry for a domain that appeals to you, and come up with a subdomain. Determining the domain and the subdomain is the hardest part of setting up a home linux server. It took me several days of intense thought and consideration. But, it’s worth it! When this task is completed, you will have assembled a Fully Qualified Domain Name (FQDN) for your server. We’ll refer to it as
subdomain.domain.comeverywhere else on this website.
- Navigate to the Subdomains section and register
subdomain.domain.comas an A record. You may wish to customize the domain list in Preferences for ease of using FreeDNS.
- While you’re at it, also nab
www.subdomain.domain.comas an A record. Ideally, this should have been a CNAME record pointing to your main record, but FreeDNS doesn’t support CNAMEs pointing to dynamic domains. Alternatively, if you spring the $60/yr to get a Premium account, then you can make
subdomain.domain.coma wildcard domain that matches
*.subdomain.domain.com. The tutorials in this site do not assume that you did this, but should work regardless.
- Optionally, grab AAAA (IPv6) records corresponding to your two A records.
- Set up Dynamic DNS using the updated interface. Enable dynamic DNS for your domains, generate the cron scripts, and add them to your crontab.
- On your server machine, edit
subdomain.domain.comas your hostname. When you’re done, executing
hostname -sshould return the hostname that you set up for your machine on installation, and
hostname -fshould return