Vrising Dedicated Debian 11 Server WINE: Difference between revisions

From MalinWiKi
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 35: Line 35:
sudo apt install winehq-stable winetricks steamcmd:i386</pre>
sudo apt install winehq-stable winetricks steamcmd:i386</pre>


create user steam
create user steam sith home directory. -s /bin/bash is optional if you prefer bash over sh shell


<pre>useradd steam -m -s /bin/bash</pre>
<pre>useradd steam -m -s /bin/bash</pre>
Line 84: Line 84:
==Install VRising dedicated server==
==Install VRising dedicated server==


Run steamcmd to install the server software
Run steamcmd as user steam to install the server software


<pre>steamcmd</pre>
<pre>steamcmd</pre>
Line 111: Line 111:
==Run the server with systemd==
==Run the server with systemd==


Make a systemd script to run the server from.
Make a systemd script to run the server with.


Add this snippet to /etc/systemd/system/vrising.service
Add this snippet to /etc/systemd/system/vrising.service
Line 144: Line 144:


==configure the server==
==configure the server==
 
see https://vrising.fandom.com/wiki/V_Rising_Dedicated_Server#Server_Configuration for now
I'll add more later

Latest revision as of 09:49, 18 June 2022

Setup VRising Dedicated Server

Prerequisites

Add non-free and contrib to /etc/apt/sources.list after main

so this line:

deb http://deb.debian.org/debian bullseye main

looks like this one

deb http://deb.debian.org/debian bullseye main non-free contrib

Add winehq repo for Debian

sudo echo "deb https://dl.winehq.org/wine-builds/debian/ bullseye main" >> /etc/apt/sources.list.d/winehq.list

Download apt key

wget -nc https://dl.winehq.org/wine-builds/winehq.key

Add key

sudo apt-key add winehq.key

Add 32-bit architecture support

sudo dpkg --add-architecture i386

Update apt and install packages

sudo apt update

sudo apt install winehq-stable winetricks steamcmd:i386

create user steam sith home directory. -s /bin/bash is optional if you prefer bash over sh shell

useradd steam -m -s /bin/bash

Make WINE headless

For this server to run, we need to make wine headless

source: https://superuser.com/questions/902175/run-wine-totally-headless

source: https://serverdiary.com/linux/how-to-install-xvfb-and-create-systemd-xvfb-service-on-centos-7-8-or-rhel-7-8/

Install Xvfb a fake X11 server

sudo apt install xvfb

Create a systemd script to run it with in /etc/systemd/system/xvfb.service:

[Unit]                                            
Description=Xvfb headless fake X server           
After=network.target                              
                                                  
[Service]                                         
User=root                                         
ExecStart=/usr/bin/Xvfb :0 -screen 0 1024x768x16  
                                                  
[Install]                                         
WantedBy=multi=user.target                        
Alias=Xvfb.service                                                               

To enable and start the script:

sudo systemctl enable xvfb.service
sudo systemctl start xvfb.service


Install the allfonts winepackage as user steam with winetricks

login as user steam

su - steam
winetricks allfonts

Install VRising dedicated server

Run steamcmd as user steam to install the server software

steamcmd

you will now get a Steam> prompt In the Steam> prompt login as anonymous

login anonymous

First, tell SteamCMD to use windows as the platform, as there's currently a Windows version of VRising Server currently:

@sSteamCmdForcePlatformType windows

Optional: If you want to install the server to a specific directory in the /home/steam folder:

force_install_dir ./<name of folder>

Proceed with the installation app_update and steamID

app_update 1829350

When the server software is finished with the installation, exit steamcmd with pressing ctrl + c

To logout from steam user, press ctrl + d

Run the server with systemd

Make a systemd script to run the server with.

Add this snippet to /etc/systemd/system/vrising.service

[Unit]                                                                                                                   
Description=VRising server service                                                                                       
Wants=network-online.target                                                                                              
Requires=xvfb.service                                                                                                    
                                                                                                                         
[Service]                                                                                                                
Environment=DISPLAY=:0.0                                                                                                 
ExecStart=wine VRisingServer.exe -persistentDataPath .\save-data -serverName "Malinux V Rising Server" -saveName "MyWorld
-1" -logFile ".\logs\VRisingServer.log"                                                                                  
WorkingDirectory=/home/steam/Steam/steamapps/common/VRisingDedicatedServer/                                              
user=steam                                                                                                               
group=steam                                                                                                              
                                                                                                                         
[Install]                                                                                                                
WantedBy=multi-user.target                                                                                               

Set the WorkingDirectory to where your VRisingServer.exe is located if you put it in a custom location

Forward ports

enable and open ports in ufw

ufw allow 9876 comment 'Comment that describes this ufw rule game-traffic and rcon'
ufw allow 9877 comment 'Comment that describe this ufw rule query-port' 

configure the server

see https://vrising.fandom.com/wiki/V_Rising_Dedicated_Server#Server_Configuration for now