Join GitHub today
Setting up Custom Domains for your DWC Server
Custom domains are useful if you want to be able to domain patch a Wii game's domains so they connect to your server without requiring users to set a DNS. This post will cover
- How to register a domain name
- How to set up the DNS records
- How to set up the Apache virtual hosts (yes you'll need Apache for this to work)
Registering a domain name
First go to: http://www.freenom.com/en/index.html?lang=en
Then register a domain name. For this guide, I'm going to assume your domain name will be
Depending on the domain name you search for, you might have more free TLD options. There is also the option of going paid, but free will do just what we need fine.
The renewal/expiration should be set as high as you can go (12 months) so remember to re-new your domain name every 12 months.
When you are asked about what you want to do with your domain, simply tell it to use your own DNS server and put in the following
When asked to enter an IP address, simply leave it blank for both.
Hurray! You've passed the first part!
Now that you've registered your domain name, and set your name servers to cloudns.net, it's time to actually go over to the website and make an account. The great thing about ClouDNS is, IT'S FREE!
A new method
Over the last 2 years, a script was developed that will help automate this.
You can get the script from my GitHub by running the following command:
wget https://raw.githubusercontent.com/kyle95wm/dwc_network_installer/master/custom-dom-gen.sh && chmod +x custom-dom-gen.sh
Then run the script with:
From here, you'll be asked to enter your domain. After this, accept all prompts, and the domain creattion process should begin. You may stop reading here
Manual setup below
Below are the manual setup instructions for those who don't want to use the script, or maybe they just want to know "how the saussage was made".
Setting up the DNS
I assume you've already made a free account over at http://www.cloudns.net so I won't bore you with the sign-up procedure.
What I will do is tell you how to add what's called "CNAME" records to your domain. As a free user, you are limited to up to 3 domain zones (but each zone can have an unlimited number of records)
When creating the zone, make sure it's a master zone, and that it points to your newly created domain name (in our case "altwfc.tk")
Make sure that all the name server are checked above and click create
Setting up the records
Once you've created the DNS zone it's time to set up the records. The record type we'll be working with is a CNAME record.
Add the following CNAME records to your zone. In each of them enter your domain name/IP address (you should probably set up DDNS name for your server if you're doing this from home like I am)
*.gs conntest dls1 nas naswii www
Once you've set your DNS records it's time to move onto the next step
In this next section we'll be looking at Apache virtual hosts, specifically reverse proxying.
Setting it all up
This next part is really easy and simple to do, just copy the apache virtual host files from this repository into
/etc/apache2/sites-available/, and then make a copy of those files within that folder and replace "nintendowifi.net" with your domain. In this example our domain name is "altwfc.tk"
What you need to do is go into each of the nintendowifi.net files you've copied and search and replace "nintendowifi.net" with "altwfc.tk" to make it quicker instead of manually typing it in each time. Then, enter
sudo a2ensite * to enable your newly created virtual hosts. Then, enter
sudo apachectl graceful to ensure the config is valid, then finally
sudo service apache2 restart.
Congratulations, you've now successfully set up your custom domain name for your DNS server. Some things to note/remind yourself about is that your domain name (not DNS) must be re-newed every year (12 months)
You should also give your DNS 3-5 minutes to propogate on every server around the world before doing any real tests.
I hope this guide helped you out. If you have any questions, you know where to find us on IRC!