Linux Dedicated Server using WINE

Step 1: Requirements (OS, Supporting Apps)

Linux Dedicated Server System Requirements

First thing's first - this guide requires that you bring your own Linux knowledge to the table, IE how to install, configure networking, etc - the basic stuff. With that as a baseline (and with a command of your own flavor of OS in mind if it differs from the one I'm writing about here), please continue.

This guide recreates how I got the server running for myself and friends. It's a mashup of info I found for Conan Exiles (another apparently windows based dedicated server) and configuration info for V Rising itself.

Since the game is going to run via windows emulation on Linux, you probably won't want to run this on a raspberry pi or something painfully old; but almost any relatively modern system with let's say 4 cores and 8gb memory should be ok. One caveat is that even though it's a dedicated server you will probably want to close and restart it at least daily if possible because it seems as though the emulation memory adds up. I'm running this on a machine with 32gb and the Linux emulation engine (not the wine managed windows process) starts creeping up in memory consumption over time.


Moving on. You will need a Linux system, almost any of them will do but the popular contenders of course get top marks; CentOS, Ubuntu, OpenSuSE - whatever. I'm using Debian 10 (buster).

Note: YOU WILL NEED ROOT to do the following steps, whether you sudo all of them or just run a whole shell as root, either will work.

First you'll want to make sure you have the proper packages, which means you'll need to have the proper repository options. To get all of these you need more than just 'main' channel. Here's my sources data from the file /etc/apt/sources.list

deb buster main contrib non-free deb-src buster main contrib non-free deb buster/updates main contrib non-free deb-src buster/updates main contrib non-free deb buster-updates main contrib non-free deb-src buster-updates main contrib non-free

Make sure to run 'apt update' or 'apt-get update' after you modify your sources list. From there, run the following commands:

dpkg --add-architecture i386 apt-get install wine wine32 wine64 xvfb mingw-w64 mingw-w32 screen steamcmd

You will be shown a LOT longer list of packages that go with the list above, just make sure you have adequate disk space and accept the required/recommended packages. Technically not all of the list I have in the command is necessary, but when wine starts and complains about missing things like gecko (mingw) I hate messages like that, so this list should cover all of that. My view on it is that the only errors you want to have to think about are the ones the server software tosses at you.

Next, create a non root account that you will run the software under and set a password for it.

useradd -m -d /game/vrising vrising passwd vrising

Now that you have a user, the rest of this happens under that account. Login to it now.

Step 2: Downloading V Rising Using Steamcmd

With your shiny new account, make sure that you have the following variables in your profile, whether that's .bashrc, .bash_profile, .profile, whatever. Add them, save/quit, logout/login and run the following command to make sure they are present:

env|grep WIN

Next, make a directory for the steam client to save the game files to. IE /game/vrising/vrising_files and run the following command to download the game.

NOTE: Everything from 'steamcmd' to '+exit' is a single line command

steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /home/vrising/vrising_files +login anonymous +app_update 1829350 +exit

That's it.. congrats ;)

Step 3: Start The Server The First Time

Now that you've got the game downloaded, you can actually run it for the first time. You will NOT be playing on it yet, this is just to let the files unpack, config files get generated, etc. Run the following command and let it sit for a good few minutes, pretty much until you see repeating messages indicating the server is doing basic maintenance stuff, usually something like what's below.

NOTE: Everything from 'xvfb-run' to the end of '-log' is a single line command.

xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /game/vrising/vrising_files/VRisingServer.exe -log -- repeating messages below-- [FileUserList] Loaded FileUserList from: Z:\home\vrising\vrising_files\VRisingServer_Data\StreamingAssets\Settings\adminlist.txt, Added: 0 [FileUserList] Loaded FileUserList from: C:\users\vrising\AppData\LocalLow\Stunlock Studios\VRisingServer\Settings\adminlist.txt, Added: 1 [FileUserList] Loaded FileUserList from: Z:\home\vrising\vrising_files\VRisingServer_Data\StreamingAssets\Settings\banlist.txt, Added: 0 [FileUserList] Loaded FileUserList from: C:\users\vrising\AppData\LocalLow\Stunlock Studios\VRisingServer\Settings\banlist.txt, Added: 0

Once you see a few of these messages stack up, it's safe to hit CTRL-C to quit the app. Now it's time for configuration!

The main files you're going to care about are going to be these:

Game settings


Server settings


Admin list


Game settings is everything going on IN the game. Day night cycles, harvest rates, etc.

Server settings are things like join password, server name/description, etc.

Admin list is just that - I have added myself on my server but honestly haven't used it yet so no clue what you can do with it.

Edit the first two as you see fit to have your game enjoyable. To get yourself in the adminlist.txt, just go to steamid-dot-io, plug in your username and grab the 'steamID64' numbers. Put that on a line by itself (one record per line if you have multiple people doing admin stuff) and save/quit.

Now you can run the game and actually play on it.

Step 5: How To Use 'screen' To Run The Server

Now that you've got the game ready to run, as the seasoned linux person you are you'll know there's one catch. As soon as your terminal/putty/whatever session closes the game would get cut off, and you clearly don't want to leave a terminal window open all the time. This is where one of the other apps we installed comes in.

Run this command:

screen -t Linux

Looks like it did nothing, right? Not quite. The shell is now running in a detachable session - meaning once you start the server you can detatch it, close the terminal window and come back it later. To see what I mean, do something harmless like 'top'. Now that you've got that on the screen, press 'CTRL-A', then let go and press 'D'. Notice the 'detached from' message. Now run 'ps -ef|grep top' and see that it's still running. Nice, right? To reconnect you'll run 'screen -x' and re-attach to it that same session. Now you can quit out of top and then if you logout from that session you'll see 'screen is terminating'.

So lets put that all together to start the game. Note that the '-t Linux' is just telling screen to use a given TERM setting for stuff like colors and special character formatting, nothing more.

screen -t Linux xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /game/vrising/vrising_files/VRisingServer.exe -log

This will start the game and you can leave this running, test it out by attempting to connect from a client system.

Assuming you're in the same LAN as the server and there is no firewall configured on the Linux box, launch V Rising game and do the following:

Play -> Online Play -> Find Servers -> Display all Servers & Settings -> Direct Connect

You will be prompted to put in IP/port info. Just the IP is fine. If you set a password in the config files, enter it here to continue. If the game starts loading, congrats you're in!

You should be able to see the connection message pop up on the server terminal and scroll by. You can now CTRL-A, D the session. Your game is running

Step 6: How To Update The Server When Needed

When you need to do any maintenance on the system; game update, OS update, whatever. Just login to your dedicated server account, run 'screen -x' to connect to the session and then CTRL-C to close the game. The command we ran earlier to download the game will be run again here, it will validate against the Steam servers and grab any updates. Then run the xvfb-run command again to start the game. Piece of cake.

Feel free to put these commands into script files so that you don't have to dig through shell history or a saved txt file or something to copy/paste from. The world is your oyster, enjoy.

Step 7: Firewall Rules & Port Forwarding

Life wouldn't be complete without the headache of security, right?

Thankfully I can help here too, also thankfully the game doesn't use a metric ton of ports like some others I've played. In any case - the ServerHostSettings.json file gives you the major hint here with the 'port' and 'queryport' fields, but it's not everything you need to know.

You'll need to accept/forward/etc the following:

UDP: 9876

UDP & TCP: 9877

With these two ports open and forwarding to/from your game server, friends from across the world can join you and will even be able to find your server in the main multiplayer server list search area - using some unique identifier in the server name will help them a great deal there ;)

For a GUI driven home router, it should be pretty easy to plug in the numbers and you'll need to look at your documentation for that. If you have a Linux based gateway like I do and need direct iptables commands, these should help you out, modify as needed for your home network. These are formatted from a 'rules' file for a debian firewall service, but you can just put 'iptables' in front of each line and the rest of everything ('-A' onwards) will work fine. is the game server on my LAN.

-A INPUT -i eth0 -p udp -m udp --dport 9876 -j ACCEPT -A INPUT -i eth0 -p udp -m udp --dport 9877 -j ACCEPT -A INPUT -i eth0 -p tcp -m tcp --dport 9877 -j ACCEPT -A FORWARD -d -i eth0 -p udp -m udp --dport 9876 -j ACCEPT -A FORWARD -d -i eth0 -p udp -m udp --dport 9877 -j ACCEPT -A FORWARD -d -i eth0 -p tcp -m tcp --dport 9877 -j ACCEPT

NOTE: I'm going to assume that if you're using iptables rules, you have IP MASQ properly configured as well. UPNP would be a bonus but not required.

Happy Vamping!


More V Rising guilds