the web server i run on my wii
pagecontents.sh | ||
README.md | ||
setup.sh | ||
update-readme.sh | ||
update-webpage.sh |
Linux Server Setup for Nintendo Wii
Requirements:
- A Nintendo Wii (RVL-001 or RVL-101)
- A computer running Linux natively
- An SD card greater than 8GB in size
- Probably other stuff i can't think of right now
Suggestionments:
- A USB NIC that is compatible with linux kernel 4.19
- The kind of autism that makes you inclined to run a web server on a Nintendo Wii using Linux
Instructions (VERY WIP):
Setting up arch linux on your wii
- Follow the instructions at https://wii.hacks.guide to mod your Wii. You only need to get the to the point that you have priiloader installed
- Follow the instructions at https://wiki.wii-linux.org/wiki/Installation_Guide to install Arch Linux btw.
- Plug a keyboard into the Wii's USB port. If you have one, you should also plug in a compatible USB NIC.
- Not all USB NICs will work, however more seem to work than do on the Wii normally.
- Enable automatically booting to linux (this can be skipped if you installed BootMii as boot2 when modding the Wii)
- Power on the Wii while holding the reset button to display the priiloader menu
- Use the up/down arrow keys on your USB keyboard to select "options", then press enter
- User the left/right arrow keys on your USB keyboard to change the autoboot setting to "BootMii IOS"
- Use the up/down arrow keys to select "save settings", press enter. Then select "Exit menu" and press enter again.
- Use the up/down arrow keys on your USB keyboard to select "BootMii IOS", then press enter
- The first time Arch Linux boots, it may automatically reboot itself
- Once Arch Linux has finished booting, login using the credentials printed at the top of the screen
- you should absolutely change this password with
passwd
after logging in.
- you should absolutely change this password with
- If you do not have a compatible USB NIC, connect to a 2.4GHz wireless network using
nmtui
- Once a network connection is established, perform a full system upgrade using
pacman -Syu
.- In my experience, this is much more stable on a wireless connection. Couldn't tell you why.
- this will take a long time. Go play Wii Sports while you wait.
Setting up the web server on your wii
- Install nginx, sudo, and git using
pacman -S nginx sudo git
- Create a new non-root user with
useradd --create-home {your username}
- Set a password for your user with
passwd {your username}
- Run the command
echo '%wheel ALL=(ALL:ALL) ALL' > /etc/sudoers.d/wheel
to enable give sudo access to all users in the wheel group - Run the command
usermod -aG wheel {your username}
to add your user to the wheel group - Enable the ssh server systemd service with the command
systemctl enable --now sshd
. It should now start automatically upon boot. - From your primary linux machine, run
ssh-copy-id -i {your ssh key} {your linux wii's username}@{your linux wii's IP address}
and enter the password you set in step 11{your ssh key}
is your ssh identity file, likely found in~/.ssh/
, ending in.pub
{your linux wii's username}
is the username you set in step 10{your linux wii's IP address}
is the network address of your wii. You can find this by entering the commandip address show | grep "inet "
- The address will probably look something like
192.168.1.130
. It will not be the one starting with127
nor will it be the one ending with255
- The address will probably look something like
- Attempt to log in over ssh from your primary linux machine using the command
ssh {your linux wii's username}@{your linux wii's IP address}
- Once connected to a shell over ssh, run
sudo whoami
and enter your user password when prompted- If the output after entering your passwrd is
root
then your user has successfully been given sudo priveleges - you may now log the wii's
root
user out of any active shells
- If the output after entering your passwrd is
- Enable the nginx server systemd service with the command
systemctl enable --now nginx
. It should now start automatically upon boot. - Navigate to
http://{your linux wii's IP address}
in a web browser on a device connected to the same network as the Wii. You should be greeted with the nginx splash page. - Open the nginx config with
sudo nano /etc/nginx/nginx.conf
. In thehttp
block, locate the firstserver
block, and change/usr/share/nginx/html
to/usr/local/share/nginx/html
- Press ctrl+x to close the file, press y to confirm saving changes, then press enter to confirm the filename
- Run the command
sudo mkdir -p /usr/local/share/nginx/html
to create the local nginx resource directory - Run the command
sudo systemctl restart nginx
to reload the modified config - run the command
echo 'hi' | sudo tee /usr/local/share/nginx/html/index.html
to create a text file at the root of your server. - Reload the webpage you navigated to in step 19 and you should see the word 'hi' appear in the browser window.
- Update the files at
/usr/local/share/nginx/html/
with static web content and it will become available at your wii's IP address
Periodically updating the web server's contents (using the config you see here)
- clone this repository to your user's home directory
cd;git clone 'https://git.pogmom.me/pogmommy/wii-server-setup.git'
- cd into the newly-cloned repository and run the setup script
cd wii-server-setup;./setup.sh
. Provide your password when prompted.
Finishing touches
XX. Make any remaining configuration changes as desired (change system hostname, etc.)
Todo
- update the setup.sh script to automate much more of the setup process
- right now it mostly just sets up the webpage updater
- periodically update system packages?
- idk it's generally fine on debian (especially stable) but it might not be recommended on Arch
Current issues:
- Probably a lot but what do you really have to complain about
Special thanks to:
- Techflash and the cool folk listed at https://wii-linux.org/ for making this project possible in the first place. These people are wizards.
- Bringus Studios for reminding me that you don't need to know how to use linux to have a good time with it.
- Nintendo for threatening to kill emulator developers.
- Nic for selling me this specific Wii.