Sign inSign up

diyagi/vrising-server-docker

By diyagi

•Updated over 2 years ago

Docker Container to run V-Rising Dedicated Server on Ubuntu 24.04 using Wine 9

Image
0

50K+

diyagi/vrising-server-docker repository overview

⁠VRising Server Docker

Release Docker Pulls Image Size Docker Hub

A Docker container for hosting your own dedicated server using Ubuntu 24.04 and WineHQ 9.
This image features gracefully server shutdown, meaning you should not experience rollbacks after an shutdown/restart.

⁠Acknowledgements

⁠Getting Started

Follow this docker-compose-yml⁠ example and check environment variables⁠ below for more information.

services:
  vrising:
    image: diyagi/vrising-server-docker:latest
    restart: unless-stopped # Required for the restarts to work
    stop_grace_period: 15s # Might need to increase with longer saves
    ports:
      - 9876:9876/udp
      - 9877:9877/udp
    environment:
      TZ: "America/Los_Angeles"
      PUID: 1001
      PGID: 1001
      VR_NAME: "V Rising Docker Server"
      VR_DESCRIPTION: "V Rising server hosted on Docker"
      VR_GAME_PORT: 9876
      VR_QUERY_PORT: 9877
      VR_LIST_ON_EOS: true
      VR_LIST_ON_STEAM: true
      VR_SAVE_NAME: "dockerWorld"
    volumes:
    - ./awesome-vrising-server/server:/vrising/server
    - ./awesome-vrising-server/data:/vrising/data

To manually change the ServerGameSettings.json and/or ServerHostSettings.json you need to set COMPILE_GAME_SETTINGS and/or COMPILE_HOST_SETTINGS to false.
When setting COMPILE_GAME_SETTINGS or COMPILE_HOST_SETTINGS to true you are expected to use env vars to configure the server without touching ServerGameSettings.json and/or ServerHostSettings.json

⁠Container Environment variables

VariableType/DefaultDescription
PUID1000UID used by the container to run the server as
PGID1000GID used by the container to run the server as
TZEurope/Brusselstimezone for ntpdate
UPDATE_ON_BOOTtrueChecks for updates on start and updates it if needed
COMPILE_HOST_SETTINGSfalseDisable the generation of ServerHostSettings.json using the env vars below. It does not affect the env vars starting with VR_, these env vars are used by the gameserver itself
COMPILE_GAME_SETTINGSfalseDisable the generation of ServerGameSettings.json using the env vars.
AUTO_UPDATE_ENABLEDfalseEnable/Disables Auto Update.
If docker restart is not set to policy always or unless-stopped then the server will shutdown and will need to be manually restarted.
AUTO_UPDATE_CRON_EXPRESSION0 * * * *Cron expression to when to run the update check.
AUTO_UPDATE_WARN_MINUTES30,15,10,5,3,2,1How many minutes until restart and announce intervals.
Example: 30,15,10,5,3,2,1 will shutdown the server in 30 minutes and announce the shut down at 30,15,10,5,3,2 and 1 minute mark.
AUTO_UPDATE_WARN_MESSAGEServer will restart in ~{t} min. Reason: Scheduled UpdateMessage used to announce the restart.
~{t} will be replaced in the message by the remaining time until shutdown.
AUTO_REBOOT_ENABLEDfalseEnable/Disable Auto Reboot.
If docker restart is not set to policy always or unless-stopped then the server will shutdown and will need to be manually restarted.
AUTO_REBOOT_CRON_EXPRESSION0 0 * * *Cron expression to when to run the reboot.
AUTO_REBOOT_WARN_MINUTES15,10,5,3,2,1How many minutes until restart and announce intervals.
Example: 30,15,10,5,3,2,1 will shutdown the server in 30 minutes and announce the shut down at 30,15,10,5,3,2 and 1 minute mark.
AUTO_REBOOT_WARN_MESSAGEServer will restart in ~{t} min. Reason: Scheduled RestartMessage used to announce the restart.
~{t} will be replaced in the message by the remaining time until shutdown

⁠Host Settings Environment Variables (Game Server)

VR_ prefixed environment variables are used by the game server itself, not added by the container.
Because these env vars are read by the game server itself, setting COMPILE_HOST_SETTINGS to false wont affect how these env vars work. (Official Doc⁠)
These env vars will override their respective values in ServerHostSettings.json.

VariableType/DefaultDescription
VR_NAMEtextName of the server. The name that shows up in server list.
VR_DESCRIPTIONtextShort server description. Shows up in details panel of server list when entry is selected. Also printed in chat when connecting to server.
VR_GAME_PORT9876UDP port for game traffic.
VR_QUERY_PORT9877UDP port for Steam server list features.
VR_ADDRESStextBind to a specific IP address.
VR_HIDEIPADDRESSfalseWhen listing server on EOS server list, the IP address will not be shown/advertised. Players will connect via relay servers.
VR_MAX_USERS40Max number of concurrent players on server. The maximum number technically supported is 128.
VR_MAX_ADMINS4Max number of admins to allow connect even when server is full.
VR_FPS30Target FPS for server.
VR_LOWER_FPS_WHEN_EMPTYfalseRun the server at a lower framerate target when no players are logged in.
VR_LOWER_FPS_WHEN_EMPTY_VALUE1Set the framerate target for when LowerFPSWhenEmpty is active.
VR_PASSWORDtextSet a password or leave empty.
VR_SECUREtrueEnable VAC protection on server. VAC banned clients will not be able to connect.
VR_LIST_ON_EOSfalseRegister on EOS list server or not. The client looks for servers here by default, due to additional features available.
VR_LIST_ON_STEAMfalseRegister on Steam list server or not.
VR_PRESETtextLoad a ServerGameSettings preset.
VR_DIFFICULTY_PRESETtextLoad a GameDifficulty preset.
VR_SAVE_NAMEworld1Name of save file/directory. Must be a valid directory name.
VR_SAVE_COUNT20Number of autosaves to keep.
VR_SAVE_INTERVAL120Interval in seconds between each auto save.
VR_AUTOSAVESMARTKEEP10:1:1 30:0:1
60:0:1 120:0:1
180:0:1 240:0:1
360:0:1 720:0:1
1440:0:1 2880:0:1
43200:99:0
.
VR_LAN_MODEfalseEnable LAN mode.
VR_RESET_DAYS_INTERVAL0Days between scheduled resets/wipes. When the server starts, and is about to load a save file, it checks if it is time to reset and start a new save file. The previous save file is backed up. Defaults to 0, which means the feature is disabled.
VR_DAY_OF_RESETenumIf you want the server to reset on Saturdays, every two weeks, but it is not Saturday when you initially set up you server then you can set ResetDaysInterval to 14 and then set this to Saturday. It will check that at least ResetDaysInterval days has passed and that it is the day of DayOfReset. If you do not want to restrict reset to a specific day, but just rely on the value of ResetDaysInterval, then set this to Any, which is also the default.
Possible values: Any, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
VR_RCON_ENABLEDfalseEnable or disable Rcon functionality.
VR_RCON_PORT25575Rcon TCP port.
VR_RCON_PASSWORDtextPassword to access RCON.
VR_RCON_BIND_ADDRESStextBinds RCON socket to specified address. Will override the "global" Address setting, if you want to bind to a separate internal interface for instance.

⁠Host Settings Environment Variables

The env vars below are added by the container, when using any of these they will overwrite whats in the ServerHostSettings.json file.
When using these env vars any configuration manually made to ServerHostSettings.json will be overwritten, meaning you should only use env vars to configure ServerHostSettings.json.
If you want to manually change the ServerHostSettings.json file set the env var COMPILE_HOST_SETTINGS to false, this will disable all env vars below.

VariableType/DefaultDescription
FALLBACK_PORT9878Unknown
MIN_FREE_SLOTS_FOR_NEW_USERS0Unknown
AI_UPDATES_PER_FRAME200Unknown
SERVER_BRANCHtextUnknown
COMPRESS_SAVE_FILEStrueUnknown
RUN_PERSISTENCE_TESTS_ON_SAVEfalseUnknown
DUMP_PERSISTENCE_SUMMARY_ON_SAVEfalseUnknown
STORE_PERSISTENCE_DEBUG_DATAfalseUnknown
GIVE_STARTER_ITEMSfalseUnknown
LOG_ALL_NETWORK_EVENTSfalseUnknown
LOG_ADMIN_EVENTStrueUnknown
LOG_DEBUG_EVENTStrueUnknown
ADMIN_ONLY_DEBUG_EVENTStrueUnknown
EVERYONE_IS_ADMINfalseUnknown
DISABLE_DEBUG_EVENTSfalseUnknown
ENABLE_DANGEROUS_DEBUG_EVENTSfalseUnknown
TRACK_ARCHETYPE_CREATIONS_ON_STARTUPfalseUnknown
SERVER_START_TIME_OFFSET0.0Unknown
PERSISTENCE_VERSION_OVERRIDE-1Unknown
USE_TELEPORT_PLAYERS_OUT_OF_COLLISION_FIXtrueUnknown
REMOTE_BANS_URLtextUnknown
REMOTE_ADMINS_URLtextUnknown
AFK_KICK_TYPE0Unknown
AFK_KICK_DURATION1 Unknown
AFK_KICK_WARNING_DURATION14Unknown
AFK_KICK_PLAYER_RATIO0.5Unknown
ENABLE_BACKTRACE_ANRfalseUnknown
ANALYTICS_ENABLEDtrueUnknown
ANALYTICS_ENVIRONMENT"prod"Unknown
ANALYTICS_DEBUGfalseUnknown
USE_DOUBLE_TRANSPORT_LAYERtrueUnknown
PRIVATE_GAMEfalseUnknown
API_ENABLEDfalseUnknown
API_ADDRESS"*"Unknown
API_PORT9090Unknown
API_BASE_PATH"/"Unknown
API_ACCESS_LISTtextUnknown
API_PROMETHEUS_DELAY30Unknown
RCON_TIMEOUT_SECONDS300Unknown
RCON_MAX_PASSWORD_TRIES99Unknown
RCON_BAN_MINUTES0Unknown
RCON_SEND_AUTH_IMMEDIATELYtrueUnknown
RCON_MAX_CONNECTIONS_PER_IP20Unknown
RCON_MAX_CONNECTIONS20Unknown
RCON_EXPERIMENTAL_COMMANDS_ENABLEDtrueUnknown

⁠Game Settings Environment Variables

The env vars below are added by the container, when using any of these they will overwrite whats in the ServerGameSettings.json file.
When using these env vars any configuration manually made to ServerGameSettings.json will be overwritten, meaning you should only use env vars to configure ServerGameSettings.json.
If you want to manually change the ServerGameSettings.json file set the env var COMPILE_GAME_SETTINGS to false, this will disable all env vars below.
Not everything in ServerGameSettings.json can be configured using env vars, if you need anything thats not covered feel free to open an Issue or PR

VariableType/DefaultDescription
GAME_DIFFICULTYNormalChanges the game difficulty.
GAMEMODE_TYPEPvPChanges between PvP and PvE.
CLAN_SIZE4Max amount players that can join the same Clan.

⁠RCON Commands

RCON will only work if its properly configured, either by setting its env vars (VR_RCON_ENABLED, VR_RCON_PORT and VR_RCON_PASSWORD) or by manually configuring it in the ServerHostSettings.json file.

To use RCON you can use docker exec:

docker exec -it container-name rcon-cli "<command> <value>"

If you need external RCON access, remember to expose its port in the container.

CommandParametersDescription
help[command]List all commands, or additional information about a specific command.
announce<message>Sends a message to all players connected to the server.
announcerestart<number>Sends a pre-configured message that announces server restart in x minutes to all players connected to the server. Less flexible than announce but has the benefit of being localized to each users language.
shutdown<message times> <message>Schedule shutdown of the server.
cancelshutdown[message]Cancel an active shutdown, with optional message.
name<name>Set/change the server name during runtime.
description<description>Set/change the server description during runtime.
password[password] | --clearSet/change/clear the server password during runtime.
version-Show server version.
time-Show server time.

Tag summary

Content type

Image

Digest

sha256:c741bd62b…

Size

977.2 MB

Last updated

over 2 years ago

docker pull diyagi/vrising-server-docker