Author Topic: HOWTO - Linux Dedicated Server  (Read 1670 times)

Offline MaTi

  • Newbie
  • *
  • Posts: 4
HOWTO - Linux Dedicated Server
« on: May 18, 2012, 05:05:53 pm »
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 ;)


REQUIREMENTS

On 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 server

1. Generate new world and upload your entire game directory to the server.

2. Set up a display for your server. To do this execute:

Code: [Select]
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:

Code: [Select]
x11vnc -storepasswd
When You're done type:

Code: [Select]
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:

Code: [Select]
export DISPLAY=:1
4. Now You can start your game server. Go to your game folder and execute:

Code: [Select]
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:

Code: [Select]
gvncviewer server_ip_address

Screenshot from the final result:




Updating

Unfortunately, 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!
« Last Edit: May 19, 2012, 04:10:56 am by MaTi »

Offline zerikin

  • Newbie
  • *
  • Posts: 3
Re: HOWTO - Linux Dedicated Server
« Reply #1 on: July 17, 2012, 04:48:25 pm »
(Yes I know this post is old).  I was able to get a dedicated server up in Linux using this guide, thanks for writing it up.