Setup Your Own Local MKW Server
Tutorial to Setup Your Own Local MKW Server

In this guide, I will teach you how to setup and run a mkw server for private network use. Anyone on your LAN network can access the server. There may be other added guides in the future to teach you how to make your server reachable to anyone from the outside world. But for now, this will be for local setup.

Experience with Wii Hacking and ISO Usage (have HBC installed, know how to run codes, etc)
Computer with Linux***
Experience with Linux in general (this isn't for Linux first-timers)
Working Local LAN Network

***This guide is specifically for Debian 9! I will include a small modification which should allow this to work on Ubuntu 14.04 LTS & 16.04 LTS, but I cannot guarantee that it will work. Once again, this has only been tested and verified on Debian 9. Any other Linux OS based on Debian 9 (that uses the same repositories) SHOULD also work for this guide.

It is best to start with a fresh installation of Debian 9. I have no idea what packages you already have installed on your Linux computer. They could conflict with the packages being installed on this guide.

Chapter  1. Update, Upgrade, Get Packages

Open a terminal. We need to get Debian fully updated and upgraded before we do anything.

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get clean

If upgrades were done, reboot your computer.

Now run the following command to install the necessary pacakges.

sudo apt-get update && sudo apt-get install ufw apache2 python python-twisted dnsmasq zip unzip

Small modification for Ubuntu: replace 'python' with 'python-2.7'

Chapter 2. Configuring Firewall, Port Forwarding

The package ufw that was downloaded is a simplified front-end for manipulating Linux's IP-Tables. If you have any current IP-Table firewall settings, clear/flush them now. Be sure to back them up if desired. Run the following commands to get ufw setup with the proper port forwarding

sudo ufw default deny incoming
sudo ufw default allow outgoing

At this point we setup the basic default policies. Do this command now...

sudo ufw allow 80/tcp

There are more ports to open, but we need to test apache first. To make firewall changes take effect, run the following commands....

sudo ufw enable
sudo ufw status verbose

Your terminal should show on output that the TCP port 80 for both IPv4 and Ipv6 is enabled. Let's boot apache now.

sudo service apache2 start

Open up a web browser. Type in localhost for the web address. You should be greeted by the default Apache Welcome Index Page.

Ok so Apache works, and our firewall is working too. Now we need to punch open more ports. Just use the command that you did earlier for port 80/tcp, and do it for the following ports.


Alrighty, we're done with TCP ports. But most online gaming servers require the opening of UDP ports. We need all UDP ports opened. So run this command...

sudo ufw allow 2:65535/udp

All UDP ports are now opened. Let's reload the firewall for changes to take effect.

sudo ufw reload

Chapter 3: MKW Server package Download and configuring Apache

Go to this link -

Click on the green button that says 'Clone or download'. Click on Download Zip. The MKW server package is now downloaded.

Assuming your downloads go to the folder "/home/yourusername/Downloads", run the following command...

cd /home/yourusername/downloads

Or just use any GUI extractor/file-archiver to unzip it.

A folder with the same name as the .zip package will appear. Move that folder to a desired place. I personally move it to my main user directory (/home/yourusername). For demo purposes let's assume you move it to that directory.

Run this terminal command....

sudo cp /home/yourusername/dwc_network_server_emulator-master/tools/apache-hosts/* /etc/apache2/sites-available

The apache host files have now been copied over to their proper location. We need to make some changes to Apache's config file

Go to /etc/apache2/apache2.conf, and open up that file (with proper sudo permissions) with your preferred text editor.

Scroll all the way to the very bottom and add these two lines...

ServerName localhost

HttpProtocolOptions Unsafe

Save and exit.

Run the following terminal command...

sudo a2ensite

A menu will appear allowing you to select which options you want to enable. Simply enter "*" (without the quotations) and press enter. Apache host files are now enabled.

Now run this command....

sudo a2enmod proxy proxy_http

Apache's Proxy Modules are now enabled. Restart apache for all your new changes to take effect.

sudo service apache2 restart

Chapter 4. DNSMasq

We need to make some small changes on DNSMasq's config file...

Open up the file /etc/dnsmasq.conf usnig proper sudo permissions with your preferred text editor.

Scroll down thru the file and look for the following line....


First, you need to remove the '#'. Next change the '' to your machine's local IP. This is the IP that your internet modem/router assigns to your machine for the lcoal LAN network. This is NOT your public IP. If you don't know the machine's local IP, run this...

hostname -I

If both IPv4 and IPv6 appear, you need the IPv4 (the number that doesn't use colons). For demo purposes, let's say our machine's local IP is

So now the line in the config file would look like this....


We're not done yet. Replace '' with So now the line looks like this..


Save and exit. Restart DNSMasq for changes to take effect...

sudo service dnsmasq restart

Chapter 5 Admin Page Setup (optional)

This is totally optional. If you don't care to see what your Wiis' Local IP's and MAc Addresses are (w/ abiltiy to ban profiles), then skip to the next chapter.

Make a blank file in the /home/yourusername/dwc_network_server_emulator-master folder called adminpageconf.json

Enter in the following info for adminpageconf.json


yourusernamehere = the username to log in as admin
yourpasswordhere = the password, duh

Do NOT remove the quotations!

Make changes, save and exit.

Chapter 6. First Time Server Boot

Run the following commands.....

sudo service apache2 restart
sudo service dnsmasq restart

This is done to make sure all changes to all configurations are enabled.. Now run this..

cd /home/yourusername/dwc_network_server_emulator-master

Once you pressed enter, the python script will start. Wait about 30 full seconds. This is a first time boot and the storage server can take roughly that time to fully start up.

Alright, the SERVER IS BOOTED!!!

Let's do a quick test now. Open up a web browser and type localhost:9001

This is the Stats page. You can use this page to see how many profiles are online. If you are able to load and see the Stats page then the server is running and it's time for an actual connection test on the Wii.

Chapter 7. Wii Connection Test

Ok we got the computer side-of-things done. Now we need to do some things to the Wii.

Go to Wii Settings, then Internet Settings. Make a brand new connection. Once you have done the connection test and it is complete, go back into the that Connection. Select Change Settings. Scroll left/right until you see 'Auto-Obtain DNS'. Change Yes to No. Click on Advance Settings.

For both Primary and Secondary DNS, enter in your Machine's Local IP address. (The same one you had to enter in for the dnsmasq.conf file from chapter 4)

Save changes, then preform the required Connection Test.

Watch your Linux terminal screen as you do the connection Test. The terminal will spit out some information about receiving a request. Then the Wii should finalize the test and say it is successful. Once successful, exit out of Wii Settings.

Chapter 8.  Getting online with MKW on your server

There are a variety of different methods to test the MKW Wifi on your serer. For this guide, we will assume you have a clean unmodified ISO/WBFS. Do NOT use any ISOs that have been patched in the past for other servers!!!

Add your clean ISO/WBFS to your USB stick, however you usually do it. Plug USB into Wii. Launch HBC.

If you don't have USB Loader GX (revision 1256 or later), then you can use this cheat code HERE. This code disables the game's SSL connection which is required.

Once you are in USB Loader GX, go to Loader Settings, There is an option for Private Server. Change that to "NoSSL".

Boot your game! You will need to use a fresh license or a license that does NOT have an FC. Make required license.

Go online!!! Watch your Linux terminal screen as you connect online on MKW. A boatload of info will be displayed. After a short time, the info will stop and you will then be online. Congratz! The terminal screen will now do some occasional messages about "keep alive requests". This is normal.


Chapter 9. Some notes and Troubleshooting

To stop the MKW Server... just exit out of the Terminal Screen. If you are online while you do this, you will receive EC's 84010 or 91010.

To login into the Admin page.. visit localhost:9009 on your web browser.

General Troubleshooting:
Problem: The python script won't run!!!
Answer1: Be sure you have both python and python-twisted installed. Be sure you have configured the proxy for Apache correctly. Reboot Apache try again. Apache must be running BEFORE you start the script.

Problem: Script has started, but I can't even access the Stats Page!
Answer1: Be sure you have entered in your actual Machine's Local IP correctly on the dnsmasq.conf. Don't just copy what you see posted in this guide. 

Answer2: Instead of typing in localhost:9001 in the web browser, try replacing 'localhost' with your machine's local Ip

Problem: I can't access the Admin Page!
Answer1: Be sure there are no typos in the adminpageconf.json filename. Be sure you didn't accidentally remove any quotations within the file. 

Answer2: Instead of typing in localhost:9009 in the web browser, try replacing 'localhost' with your machine's local Ip

Problem: I keep getting error codes when making a Wii Connection test to the server!
Answer1: Don't forget to edit the Primary/Secondary Addresses. Be sure you didn't typo your Local IP when entering it in too.

Answer2: Did you remember to start the script?

Answer3: Be sure you have opened up all the necessary ports on UFW firewall. Be sure the firewall is running. Reload it to be sure. 

Troubleshooting MKW Specific EC's when connecting online:
Game was already patched (not clean)
You forgot to set the No SSL options on within USB Loader GX
(If not using USB Loader GX) You forgot to use the NoSSL cheat code
You forgot to enter in the Primary/Secondary DNS IP Addresses (or you made a typo entering them in)
A very very very crappy Internet connection can cause this EC too (you live in Somalia? lol)

You forgot to add those small edits needed on the apache2.conf file
You were not on a clean installation of Linux and your apache configuration already had some files and/or SSL certs installed, so its blocking the connection

Apache is running but the script is not

Crappy Internet connection, or you forgot to make an Internet connection in Wii Settings

You used a License with an FC already made on it. Use a brand new License.

84010 & 91010:
The script died or you accidentally closed it

Credits to Polaris!!!! (original python code writer/author for the dwc-network-emulator)
Will you include a small extra section for (BeanJr's) CoWFC (fork)?
No, I have no idea about the technical details of CoWFC.
Thanks for this guide, still works in 2020 on a fresh debian 9 installation. This is just awesome at LAN if you have set up a few Wiis and screens or multviewer.

But however, I had struggles setting up the server... I just couldn't connect the wiis. Solution: I had to install gui for ufw and allow all kinds of traffic. Then it was working just like in the description.

For the next step I wanted to have stats, I went through readmes and scripts, but couldn't find something. is the DWC server emu actually logging pts of the cups/races? this would be so awesome.
To see the Stats page (it only shows how many profiles are online), go to localhost:9001.
(05-24-2020, 10:08 PM)Vega Wrote: To see the Stats page (it only shows how many profiles are online), go to localhost:9001.
thanks, yes that is working. for the points I will keep on making screenshots ;-)
update: this tutorial is working with latest raspbian too. running a Wii-LAN-Rack with dwc on raspberry pi 2

Forum Jump:

Users browsing this thread: 1 Guest(s)