I've asked question on the forums about it a while ago, and since I've figured out how to do it, I've decided to make a guide to help anybody who might be interested in hosting a dedicated server on a command line Linux. Thanks for Nalgas, whose tips in
this topic pointed me in the right direction.
English isn't my native language, but I hope it will be good enough for You to understand my guide
REQUIREMENTSOn your remote server:
libgl1-mesa-dev and mesa-utils - Mesa OpenGL libraries and utilities
WINE 1.3 or higher - it might work on older versions, but I personally failed to launch it on Wine 1.1.*. and older
Xvfb - framebuffer emulator. This utility will allow You to run GUI applications on your headless server.
x11vnc - VNC server. Thanks to this utility, You will be able to interact with GUI applications on your remote server through a VNC client. Skip this, if You only want to use default AVWW server settings.
On your local machine:
Any VNC client. I used gvncviewer for linux, but I'm pretty sure anything will work.
Setting up server1. Generate new world and upload your entire game directory to the server.
2. Set up a display for your server. To do this execute:
Xvfb :1 -screen 0 800x600x16 &
The process will keep running in the background. To kill it simply execute "killall Xvfb".
3. Set up a new password for your VNC server. You need to do this only if it's the first time You are starting the server:
x11vnc -storepasswd
When You're done type:
x11vnc -display :1 -bg -forever -rfbauth ~/.vnc/passwd
Your VNC server will be running in the background now. You can connect to it now with your VNC client.
To kill it execute "killall x11vnc".
Also, before you start installation You need to tell your OS which display You're gonna be using:
export DISPLAY=:1
4. Now You can start your game server. Go to your game folder and execute:
wine AVWW.exe -server -world "Your_World_Name"
5. Connect to your remote server with a VNC client and change any settings you want. If you are using gvncviewer as well, just type in the console:
gvncviewer server_ip_address
Screenshot from the final result:
UpdatingUnfortunately, WINE seems to have problems with updating the game. Whenever update comes out, you will need to download it on your local machine through the updater, go to \RuntimeData\updates\ in your AVWW directory, extract the *zip file containing the update and then upload all files to your server (and overwrite the expising ones). There might be a workaround for this problem, if anyone finds it, please let me know!