V Rising

V Rising

Not enough ratings
Linux Dedicated Server using WINE
By KriegTiger
This guide is intended to guide someone on installing the V Rising dedicated server - currently a Windows only application - under Linux and launching it so that it is usable for online play.
   
Award
Favorite
Favorited
Unfavorite
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.

HEY DEVS: GIVE ME A PROPER LINUX DEDICATED SERVER, I DON'T WANT TO EMULATE THIS FOREVER.

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 http://deb.debian.org/debian/ buster main contrib non-free deb-src http://deb.debian.org/debian/ buster main contrib non-free deb http://security.debian.org/debian-security buster/updates main contrib non-free deb-src http://security.debian.org/debian-security buster/updates main contrib non-free deb http://deb.debian.org/debian/ buster-updates main contrib non-free deb-src http://deb.debian.org/debian/ 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 /home/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 WINE variables in your user profile - this step will change depending on what shell you use (IE bash, csh, ksh, etc). The example below works with bash.

vrising@linux:~$ cat .bash_profile export WINEARCH=win64 export WINEPREFIX=/home/vrising/.wine64 export TERM=linux

Once you add them, save/quit, logout/login and run the following command to make sure they are present:

vrising@linux:~$ env|grep WIN WINEARCH=win64 WINEPREFIX=/home/vrising/.wine64

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
vrising@linux:~$ mkdir /home/vrising/vrising_files vrising@linux:~$ steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /home/vrising/vrising_files +login anonymous +app_update 1829350 +exit (Wait for the command to return to the shell prompt) vrising@linux:~$



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 /home/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
/home/vrising/vrising_files/VRisingServer_Data/StreamingAssets/Settings/ServerGameSettings.json

Server settings
/home/vrising/vrising_files/VRisingServer_Data/StreamingAssets/Settings/ServerHostSettings.json

Admin list
/home/vrising/vrising_files/VRisingServer_Data/StreamingAssets/Settings/adminlist.txt

  • 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 4: 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:
vrising@linux:~$ 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.

vrising@linux:~$ screen -t Linux (returns you immediately to prompt, this is normal) vrising@linux:~$ xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /home/vrising/vrising_files/VRisingServer.exe -log (game is now running, ctrl-C to exit server)

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
[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 (CTRL-A, D) [detached from 8229.pts-0.arknet] vrising@arknet:~$
Step 5: 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.

vrising@linux:~$ steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /home/vrising/vrising_files +login anonymous +app_update 1829350 +exit (watch output, wait for return to prompt) vrising@linux:~$

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 6: 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. 10.89.0.200 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 10.89.0.200/32 -i eth0 -p udp -m udp --dport 9876 -j ACCEPT -A FORWARD -d 10.89.0.200/32 -i eth0 -p udp -m udp --dport 9877 -j ACCEPT -A FORWARD -d 10.89.0.200/32 -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!
23 Comments
stk 19 hours ago 
Thanks for this amazing guide!

One additional question tho: How do you manage stopping/rebooting this automatically?
I've tried to do it using Signals, however I can't get it to work properly, as the program will exit without saving the game... I also tried it using rcon, but there appears to be no way to instantly shut down the server, the minimum waiting time is a minute, which is absolutely not what I want.

In my current systemd service file (which does not save before stopping) I use this:
ExecStop=kill -INT $(ps aux | grep 'Z:\\home\\vrising\\vrising_files\\VRisingServer.exe -log' | grep -v grep | awk '{print $2}') && sleep 8
terror 21 Jun @ 7:45am 
And how you can enable EOS, i'm getting a lot of messages spam when i enable that feature for server list..., also mods are not working too and loading
БРОдяга 7 Jan, 2023 @ 12:26am 
static ip — extra waste (imho). my ISP give me white dynamic address and i with few scripts change A record of my registrated domain name to this address. my dynamic ip changes every few days.

this solution works great with many dedicated servers (for example, AzerothCore WoW, Minecraft bedrock and java editions, Valheim) because game clients allow use domain name as address of server. V Rising forbid this and allow use only ip address.
KriegTiger  [author] 6 Jan, 2023 @ 7:57am 
@БРОдяга - To get a functional DNS name you'll need to get some sort of domain name - either through buying a whole domain and registering DNS for it properly, or you can go through some service like www.noip.com to register there - but this is just the name -> IP resolution part.

From there you'll need to figure out whether you need to ask your ISP for a static IP (usually a small fee per month on your bill if they do provide such services), or if your dynamic IP changes very rarely you can just register that IP in the hostname services above and keep an eye out to change it if needed. This is what I did for a very long time, my 'dynamic' IP address from my cable ISP provider changed maybe twice in multiple years.
БРОдяга 5 Jan, 2023 @ 6:20am 
hello!

how i can use server's domain name in direct connection? i do not have static ip address, but have dinamyc DNS.
KriegTiger  [author] 6 Dec, 2022 @ 10:26am 
@Ch4rly - Ahh, bummer :(

I see it now in the requirements section on their website - x64 based NAS required. I got lucky that DS918 has an AMD chip which is x86_64, the RealTek one in the 418 doesn't meet that requirement.
Ch4rly 5 Dec, 2022 @ 4:52pm 
@KriegTiger, yeah I did read about the Active Backup For Business but unfortunatly I think my Synology isn't compatible with it. You need to have an Intel Based (I think? it's Intel?) CPU in your Synology for it to be available.... I have the DS418 and you need the DS418plus or something for have the Celeron CPU.. Next Synology I'll make sure to get an Intel Based Version...
KriegTiger  [author] 4 Dec, 2022 @ 2:05pm 
system/file level cron scheduled backups of my ARK stuff, that is.
KriegTiger  [author] 4 Dec, 2022 @ 2:04pm 
@Ch4rly - Awesome, glad to hear it!

Regarding backups, you mention having a synology - check out the 'Active Backup for Business' package - it's free. It does whole VM backups on a schedule you want, retention you want, etc. Great stuff :) I haven't had need of any restores yet but I just went to look at my settings and noticed that it has 208 versions of my ARK server from the past two years and it only takes up 136gb of disk space on the storage unit.

I keep regular interval saves of my ARK stuff any time it's running because if a particular friend who will not be named pulls an absolute disaster down on our heads I don't have to worry about restoring a whole VM, but it's a nice additional safety net to have - both for gaming and utility VM's in the ESX environment.
Ch4rly 4 Dec, 2022 @ 1:29pm 
Finally created mine and copy over the save files! Works great I also made it as a Service so it start and stop automatically with the VM when it boots up. I had some memory available so end up allocating 8GB and 40 GB of ram with 4 vCPU. Made the save files sync with my Synology so I'm covered in case something goes wrong! Works great! Your guide was very helpful, very happy about it and so is my girlfriend, she can now play while I'm away!