How to: Linux Dedicated server (WINE)



  • {UPDATE}
    There’s now a native Linux server available, see: http://forums.tornbanner.com/showthread.php/22795-Native-Linux-server-available

    • Crustacean Soup

    Hi,

    Guide revision 2

    This guide is for Debian based distributions, like Ubuntu for example. This guide has been created using Ubuntu Server 64-bit 12.04 LTS version.

    1. install wine and screen

    sudo apt-get install wine
    sudo apt-get install screen
    

    NOTE: Steps 2 and 3 might be invalid, because of linux steamcmd update, what prevents windows files to be downloaded on Linux. Workaround: http://tornbanner.com/forums/viewtopic.php?f=72&t=4515&start=80#p167426

    2. download LINUX steamcmd from https://developer.valvesoftware.com/wiki/SteamCMD

    wget [url]http://blog.counter-strike.net/wp-content/uploads//2012/04/steamcmd.tar.gz[/url]
    tar xvfz steamcmd.tar.gz
    
    

    3. run steamcmd:

    chmod ug+x steam.sh
    STEAMEXE=steamcmd ./steam.sh
    

    IF YOU GET DOWNLOAD ERROR

    sudo apt-get install libnss-mdns
    sudo apt-get install ia32-libs
    sudo apt-get remove lib32nss-mdns
    
    

    4. You are in steamcmd prompt NOTE: you should have own steam account for steamcmd tool so you don’t risk losing your main steam account login information

    login steamuser steampassword 
    force_install_dir ./chivalryserver/
    app_update 220070
    quit
    
    

    5. Create start up script

    nano start.sh
    
    cd chivalryserver/Binaries/Win32
    wine UDK.exe AOCFFA-Arena3_P?steamsockets -dedicated=true -seekfreeloadingserver -Port=7777 -QueryPort=7778 -maxplayers=32
    
    CTRL + O to save the file, CTRL + X to exit
    
    

    6. Create script to start up the server on background screen

    nano startWithScreen.sh
    
    screen -S chivalry -d -m ./start.sh
    
    CTRL + O to save the file, CTRL + X to exit
    
    

    For unknown reason the server needs pretty new DirectX audio file: X3DAudio1_7.dll

    7. Copy it from your windows/system32 folder or download http://kaahane.viuhka.fi/data/X3DAudio1_7.dll
    put it in chivalryserver/Binaries/Win32/ folder

    wget [url]http://kaahane.viuhka.fi/data/X3DAudio1_7.dll[/url]
    mv X3DAudio1_7.dll chivalryserver/Binaries/Win32/
    
    

    8. Set execute / read write permissions to files for user and group

    sudo chmod ug+x start*
    sudo chmod ug+x chivalryserver/Binaries/Win32/UDK.exe
    sudo chmod ug+rw * -R
    
    

    9. Start up server

    ./startWithScreen.sh
    

    10. View all your screens

    screen -ls
    

    11. Connect to screen to shut down server

    screen -r chivalry
    CTRL + C
    
    screen should get destroyed when chivalry server shuts down
    
    

    12. Optional: You can observe your processor and memory usages by using htop command

    sudo apt-get install htop
    htop
    
    ```Example: [attachment=0:2gjt222g]UDKexe.png[/attachment:2gjt222g]
    
    When it launches and you observe the screen.. you get mysterous messages… but it WORKS
    
    IF YOU GET ERROR: cant-find-gnome-keyring-pkcs11-so then follow instuctions from the link
    [http://askubuntu.com/questions/127848/wine-cant-find-gnome-keyring-pkcs11-so](http://askubuntu.com/questions/127848/wine-cant-find-gnome-keyring-pkcs11-so)
    
    **HOW TO UPDATE?**
    
    > - Stop your server by doing steps **10\. and 11.**
    > - Do the steps **3\. and 4.** to update server files
    > - Do the step **9.** to start up your server again
    
    Please report success / fail stories here so we can work up this guide.
    *edit* thanks for the feedback!


  • Awesome! Thanks!
    Stickied :)



  • EDIT

    I was telling that cpu usage is too damn high on wine version… but I was mistaken…look for my second post about this from second page.



  • Hi,

    Could I ask your machine specs so that I can put the CPU usage in perspective? I plan on doing some testing on this later today to see how it runs and knowing your machines specs would help me put it in perspective.

    Thank you for your hard work.



  • Hi,

    I am using Arch Linux and my crusade died here: http://pastie.org/private/urkpawxyyav2e67q2z1xq
    UDK showed in top and it was around 10% (C2D E8500). No server was found, or maybe was and I even went there but it was a mess and my game crashed quite fast.

    EDIT: Hmm, looks like its working somehow, but needs configuration… 10% CPU @ no players is too much afaik.

    EDIT2: http://pastie.org/private/sqxrx8kygtfhyre7nantw When I join my server, CPU goes up around 5% :(



  • Your guide worked great for me, thanks a lot! I set it to run in screen and haven’t encountered any problems. For the record, I am using CentOS 6.3 (the latest version).

    I have a few questions:

    • How do I give the server a name?
    • How do I make it show up on the server list? Right now I have to connect using the open console command.


  • @Temeez:

    Hi,

    I am using Arch Linux and my crusade died here: http://pastie.org/private/urkpawxyyav2e67q2z1xq
    UDK showed in top and it was around 10% (C2D E8500). No server was found, or maybe was and I even went there but it was a mess and my game crashed quite fast.

    EDIT: Hmm, looks like its working somehow, but needs configuration… 10% CPU @ no players is too much afaik.

    EDIT2: http://pastie.org/private/sqxrx8kygtfhyre7nantw When I join my server, CPU goes up around 5% :(

    The game server is pretty heavy on the CPU. C2D’s are kind of old.
    On a E3-1270 running the game on a single core, we usually see 6%-10% idle usage and as you increase the number of players the CPU usage % increases geometrically



  • @b3h47pte:

    The game server is pretty heavy on the CPU. C2D’s are kind of old.
    On a E3-1270 running the game on a single core, we usually see 6%-10% idle usage and as you increase the number of players the CPU usage % increases geometrically

    That is what I am seeing on an AMD FX-8120 (factory clock, 3.1 GHz). Is there any way to enable multi-threading?



  • @SHOT(by)GUN:

    Make startserver.bat to chivalryserver folder with:
    Binaries/Win32/UDK.exe AOCTD-Moor_p?steamsockets -dedicated=true -seekfreeloadingserver -Port=7777 -QueryPort=7778 -maxplayers=24

    wine cmd
    find your batfile and start it

    Can you explain this part? New to Ubuntu and have no idea what to do at this point.



  • Having a strange problem after using this guide: the server is seemingly running, but I can never connect to it.

    Here are the outputs of freshly starting the server: http://pastebin.com/raw.php?i=i843tURx Nothing there really indicates …well, much of anything. But, the OP did say there would be some gibberish.

    At this point, I can see the server in the server list! So I try to connect, and never can. Here’s what the server has to say about that: http://pastebin.com/raw.php?i=ZZvCrMpZ As long as I allow Chivalry to continue attempting to connect, the server will continue to sporadically barf those messages.

    I don’t really understand those messages, and unfortunately I’ve yet to find anything specifically helpful on Google either. Any help is greatly appreciated! :)



  • Ah man I hoped for a native Linux dedicated server.

    Game servers should run on bare metal Linux boxes not on a virtual machine and most certainly not with Wine which is even worse than Windows.



  • Alright I’ve managed to get the bat to run with WINE and am up to this point
    "
    Z:\root\chivalryserver>Binaries/Win32/UDK.exe AOCTD-Moor_p?steamsockets -dedicated=true -seekfreeloadingserver -Port=7777 -QueryPort=7778 -maxplayers=24
    fixme:heap:HeapSetInformation (nil) 1 (nil) 0
    fixme:advapi:RegisterEventSourceW ((null),L"UDK-PID59"): stub
    fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
    fixme:toolhelp:Heap32ListFirst : stub
    Setting breakpad minidump AppID = 219640
    fixme:gameux:GameExplorerImpl_VerifyAccess (0x163be0, L"Z:\root\chivalryserver\Binaries\Win32\UDK.exe", 0x18d73e0)
    "
    Can’t tell what’s happening at this point. Any ideas?



  • @caramelsauce:

    Alright I’ve managed to get the bat to run with WINE and am up to this point
    "
    Z:\root\chivalryserver>Binaries/Win32/UDK.exe AOCTD-Moor_p?steamsockets -dedicated=true -seekfreeloadingserver -Port=7777 -QueryPort=7778 -maxplayers=24
    fixme:heap:HeapSetInformation (nil) 1 (nil) 0
    fixme:advapi:RegisterEventSourceW ((null),L"UDK-PID59"): stub
    fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
    fixme:toolhelp:Heap32ListFirst : stub
    Setting breakpad minidump AppID = 219640
    fixme:gameux:GameExplorerImpl_VerifyAccess (0x163be0, L"Z:\root\chivalryserver\Binaries\Win32\UDK.exe", 0x18d73e0)
    "
    Can’t tell what’s happening at this point. Any ideas?

    Same issue here. CentOS 6.3 64 Bit.



  • (Sorry for double post)

    I’ve discovered that the above “Gibberish” means that the server is going. This method of hosting does not seem to give the server a spot on the main server list (or so it appears).

    To join your server:

    press ~
    open 
    

    BTW, CentOS 6.3 64-bit. Working great. My install steps:

    wget [url]http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm[/url]
    wget [url]http://rpms.famillecollet.com/enterprise/remi-release-6.rpm[/url]
    rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
    yum install wine.x86_64
    yum install libgcc_s.so.1 libgcc.i686 glibc.i686 ncompress libstdc++.so.6 ia32-libs libnss-mdns -y
    wget [url]http://blog.counter-strike.net/wp-content/uploads//2012/04/steamcmd.tar.gz[/url]
    tar xvfz steamcmd.tar.gz
    STEAMEXE=steamcmd ./steam.sh
    # At Steam>
    force_install_dir /root/server/
    login <your steam="" cmd="" login=""> <your steam="" cmd="" password="">
    app_update 220070 validate
    exit
    # back in terminal
    echo "IBinaries/Win32/UDK.exe AOCTD-Moor_p?steamsockets -dedicated=true -seekfreeloadingserver -Port=7777 -QueryPort=7778 -maxplayers=24" > /root/server/startserver.bat
    cd /root/server/Binaries/Win32
    wget [url]http://kaahane.viuhka.fi/data/X3DAudio1_7.dll[/url]
    cd /root/server/
    wine cmd
    startserver.bat</your></your>
    


  • @Mautobu:

    BTW, CentOS 6.3 64-bit. Working great. My install steps:

    Computer specs and CPU %usage when 0 players and 1 player? :)



  • E8400 8 GB RAM on Microsoft Hyper-V 2012 (stand alone free version).
    VM has 512MB RAM, full usage of proc.

    0 Player -> 17% CPU | 31% RAM
    1 Player -> 25% CPU | 33%

    CPU/RAM %'s for FULL system. Includes wine, UDK.exe, etc.

    On another note…

    Has anyone figured out how to get this onto the main server list? And what files should I look at to configure the name, password, etc, etc?

    Edit:
    I’m a derp and I found the config files: [SERVER DIRECTORY]/UDKGame/Config/PCServer-*.ini



  • I updated the guide!

    And I have to note here that I have reported CPU usages wrongly….

    Windows systems report the CPU usage per ALL CORES. But linux usually reports the CPU usage percentage by ONE CORE. So the CPU usage seems to be much higher than in Windows systems initially if you compare it straight windows task manager to htop

    So the CPU usage is about same than in windows but the wineserver makes static 5% overhead for cpu usage.

    I can run 6 5-slot Chivalry servers on E8500 processor @ 2.8GHz (underclocked) with approx 80% CPU usage on both cores.



  • @Mautobu:

    @caramelsauce:

    Alright I’ve managed to get the bat to run with WINE and am up to this point
    "
    Z:\root\chivalryserver>Binaries/Win32/UDK.exe AOCTD-Moor_p?steamsockets -dedicated=true -seekfreeloadingserver -Port=7777 -QueryPort=7778 -maxplayers=24
    fixme:heap:HeapSetInformation (nil) 1 (nil) 0
    fixme:advapi:RegisterEventSourceW ((null),L"UDK-PID59"): stub
    fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
    fixme:toolhelp:Heap32ListFirst : stub
    Setting breakpad minidump AppID = 219640
    fixme:gameux:GameExplorerImpl_VerifyAccess (0x163be0, L"Z:\root\chivalryserver\Binaries\Win32\UDK.exe", 0x18d73e0)
    "
    Can’t tell what’s happening at this point. Any ideas?

    Same issue here. CentOS 6.3 64 Bit.

    That seems to be normal operation… Congratulations your server should be RUNNING!

    Below you see my normal start up text:

    fixme:heap:HeapSetInformation (nil) 1 (nil) 0
    fixme:advapi:RegisterEventSourceW ((null),L"UDK-PID79"): stub
    fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
    fixme:toolhelp:Heap32ListFirst : stub
    Setting breakpad minidump AppID = 219640
    fixme:gameux:GameExplorerImpl_VerifyAccess (0x15f660, L"Z:\media\wd2500\servut\chivalry\srv1\chivalryserver\Binaries\Win32\UDK.exe", 0x18d73e0)

    After the start up… the server will output some messages when there are players what are normal WINE messages.

    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
    err:ole:CoCreateInstance apartment not initialised
    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
    err:ole:CoCreateInstance apartment not initialised
    fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!



  • Any luck on getting a server on the main list yet? I also attempted to change my server’s name, but it failed. Its name is an IP that is not anywhere in my network :/



  • @Mautobu:

    Any luck on getting a server on the main list yet? I also attempted to change my server’s name, but it failed. Its name is an IP that is not anywhere in my network :/

    Yeah you can see my linux servers on server list by names MedievalTV.com 1v1 Arena #1 etc…

    Maybe your port is already in use? Try changing the port from the start up bat file or the script…

    Or check if your port is already in use…

    netstat -l
    

Log in to reply