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.
Paso 1: Requisitos (SO, supporting apps)
Linux Dedicated Server System Requirements
Primero lo primero – 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 my 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.
Continuando. You will need a Linux system, and almost any of them will do but the popular contenders of course get top marks; CentOS, Ubuntu, OpenSuSE – lo que. I’m using Debian 10 (buster).
Nota: 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.
Primero, 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 the ‘main’ canal. 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. De eso, Ejecute los siguientes comandos:
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.
Próximo, 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.
Paso 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, .perfil, lo que. Add them, save/quit, logout/login and run the following command to make sure they are present:
env|grep WIN
Próximo, 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.
NOTA: 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 +salida
Eso es todo!
Paso 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.
NOTA: Everything from ‘xvfb-run’ to the end of ‘-log’ is a single-line command.
xvfb-run --auto-servernum --server-args='-pantalla 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, Agregado: 0 [FileUserList] Loaded FileUserList from: C:\users\vrising\AppData\LocalLow\Stunlock Studios\VRisingServer\Settings\adminlist.txt, Agregado: 1 [FileUserList] Loaded FileUserList from: Z:\home\vrising\vrising_files\VRisingServer_Data\StreamingAssets\Settings\banlist.txt, Agregado: 0 [FileUserList] Loaded FileUserList from: C:\users\vrising\AppData\LocalLow\Stunlock Studios\VRisingServer\Settings\banlist.txt, Agregado: 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
/game/vrising/vrising_files/VRisingServer_Data/StreamingAssets/Settings/ServerGameSettings.json
Server settings
/game/vrising/vrising_files/VRisingServer_Data/StreamingAssets/Settings/ServerHostSettings.json
Admin list
/game/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’ números. 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.
Paso 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, bien? 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’ mensaje. Now run ‘ps -ef|grep top’ and see that it’s still running. Lindo, bien? 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, nada mas.
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 & Ajustes -> 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
Paso 6: How to update the Server when needed
When you need to do any maintenance on the system; actualización del juego, OS update, lo que. 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. Pedazo de pastel.
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, disfrutar.
Paso 7: Firewall rules & Reenvío de puertos
Life wouldn’t be complete without the headache of security, bien?
Thankfully I can help here too, also thankfully the game doesn’t use a metric ton of ports like some others I’ve played. En todo caso – the ServerHostSettings.json file gives you the major hint here with the ‘port’ and ‘queryport’ campos, 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’ adelante) 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
NOTA: 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.
Eso es todo lo que estamos compartiendo hoy para este V ascendente guía. Esta guía fue originalmente creada y escrita por KriegTiger. En caso de que no actualicemos esta guía, puede encontrar la última actualización siguiendo este enlace.