Step 1: Download the latest server files (0.4.0) from here "ultrapowa.com"
Step 2: Extract the RAR file to a folder on your desktop.
Step 3: Double click the .exe file to start the server.
Step 4: Browse to your router's IP address in your internet browser and login. In most cases this is 192.168.0.1 or 192.168.1.1, try these first.
Step 5: After logging in Port Forward "9339"
Step 6: Download host editor on your rooted android device.
Step 7: Add a new host by click on the plus sign at the top.
Step 8: In the IP Address field, type the number that you get when you CLICK HERE
Step 9: In the hostname field, type in "game.clashofclans.com"
Step 10: Uninstall Clash of Clans
Step 11: Download it again from the Google Store
Step 12: If you did everything right, you should be connected.
Credits: iTzDanniBoi from 7s.
If you're on iOS, you can do this just portforward and edit the hosts file but instead use "game.clashofclans.com" and then your ip address under.
I did this myself on iOS.
What's a public modded server?
Basically, you can change your gems, resources, etc and play with other people, It's still on beta so it doesn't have PVP just yet.