I just set this up myself.
The second repo you linked is the repository you want. Personally, I set it up in VirtualBox running Ubuntu 16.04 LTS Desktop (tho Server would be more performant), and just followed the repo's readme. Once it was installed, everything auto booted on its own. The only extra things I needed to do were:
1) Run
sudo service dnsmasq restart
on boot (you get error 20100 when connecting otherwise, IDK why).
2) Change your Wii's DNS settings to use the IP running the CoWFC server as the primary DNS, and then probably 9.9.9.9 or your DNS of preference as a secondary (doesn't really matter anyways).
3) Set up a No SSL patch. You can do this either in USB Loader GX,
or with a GCT cheat. Homebrew channel needed either way.
4) Load up the game, and enjoy.
Just don't use a license that already has an friend code on it, 'cause that'll give you an error (60000). Personally, I'd use GCT for the No SSL patch so while you're at it, you can use
the Ultimate License Unlocker Cheat to unlock all characters, vehicles, and tracks on all 4 licenses, and the
High Data Rate cheat, which makes the game send a packet every frame (instead of every other frame) to all clients (instead of only one client at a time). Just note that the high data rate cheat makes your console crash when trying to join Worldwide or Regional races, so you'll have to spend the time needed to enter friend codes and make a friend room with that code. Feel free to use whatever other codes you feel like while you're at it.
Using Dolphin is no different than a Wii, but it takes your IP and network settings from your OS, so you'll want to change your network settings for your network connection to use your CoWFC's IP as DNS accordingly, and Dolphin will match. You can enter cheats into Dolphin by right clicking your game, and clicking Properties, then going to Gecko Codes. The cool thing about this, is that you can run multiple instances of Dolphin on the same computer and have them all connect properly, and use any mix of Wiis, Wii Us, and PCs running Dolphin instance(s) and have it all work out great.
If you wanted to play a custom track distribution, then all you should need to do is patch the custom tracks into your ISO. CTGP doesn't support this AFAIK, but most others should. I don't have much experience using CTs tho so I couldn't help you much
Hope this helps! Enjoy~