To start off hosting a server for CubeWorld you'll need to forward the following port: 12345. TCP and UDP are both required for the server to work. To find the server go into your CubeWorld directory and open "server" if you've forwarded all the ports you'll be able to simply give your friends your IP adress and you'll be ready to go!
At the moment you're only able to have 4 people on the server but Wollay has mentioned he will be experimenting with massively multiplayer servers in the future. Although people have found a way to edit the server file to break the 4 player limit be warned, it's not recommended.
Starting the Server
Go to your /program files (x86)/Cube World/ folder and double click on the Server.exe file
Stopping the Server
press q in the window and hit Enter.
Note the Instructions on screen say: Q <- Pressing Q will not work.
Presently there's no Linux Version of the Server.
It is possible to start the Server using Wine. But as soon as a Player connects it will throw out errors looking similar to this:
err:ntdll:RtlpWaitForCriticalSection section 0xf960e0 "?" wait timed out in thread 0030, blocked by 0009, retrying (60 sec)
A player will be able to join, but for some reason no NPCs will spawn, not even pets.
As a tunnel through to windows
Sometimes port forwarding isn't possible for a variety of reasons - if you have a Unix server you can tunnel your Cubeworld server.exe through to the outside world. These instructions are specifically in reference to the Ubuntu server edition. Some commands or configuration files may exist in slightly different places on other distributions.
Server Side Setup
Edit /etc/ssh/sshd_config with an editor of your choice and add the following lines at the end of the file.
Match User your_username GatewayPorts yes
sudo reload ssh
On your local Windows Machine
Download Putty and then launch from the command line
putty.exe -ssh -R 12345:localhost:12345 [email protected]_domain
Run the windows server as normal and hand out your public facing server ip/domain name.