Giter Site home page Giter Site logo

cm2walki / valheim Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 15.0 94 KB

Dockerfile for automated build of a Valheim gameserver: https://hub.docker.com/r/cm2network/valheim/

Home Page: https://cm2.network

License: MIT License

Dockerfile 42.75% Shell 57.25%
valheim game-server dockerfile valheim-server game

valheim's Introduction

Docker Cloud Build Status Docker Stars Docker Pulls Discord

Supported tags and respective Dockerfile links

What is Valheim?

A brutal exploration and survival game for 1-10 players, set in a procedurally-generated purgatory inspired by viking culture. Battle, build, and conquer your way to a saga worthy of Odin’s patronage!

Valheim

logo

How to use this image

Hosting a simple game server

Running on the host interface (recommended):

$ docker run -d --net=host --name=valheim-dedicated cm2network/valheim

Running using a bind mount for data persistence on container recreation:

$ mkdir -p $(pwd)/valheim-data
$ chmod 777 $(pwd)/valheim-data # Makes sure the directory is writeable by the unprivileged container user
$ docker run -d --net=host -v $(pwd)/valheim-data:/home/steam/valheim-dedicated/ --name=valheim-dedicated cm2network/valheim
---
$ docker volume create valheim-plus-data # For valheim:plus - Create an additional world volume
$ docker run -d --net=host -v $(pwd)/valheim-data:/home/steam/valheim-dedicated/ -v valheim-plus-data:/home/steam/.config/unity3d/IronGate/Valheim/ --name=valheim-plus-dedicated cm2network/valheim:plus

Running multiple instances (increment SERVER_PORT by two, there is no way to overwrite the steam query port, it will always be SERVER_PORT + 1!):

$ docker run -d --net=host -e SERVER_PORT=2458 --name=valheim-dedicated2 cm2network/valheim

It's also recommended to use "--cpuset-cpus=" to limit the game server to a specific core & thread.
The container will automatically update the game on startup, so if there is a game update just restart the container.

Configuration

Environment Variables

Feel free to overwrite these environment variables, using -e (--env):

SERVER_PORT=2456 (Game Port (tcp & udp); Steam Query Port (udp) will be SERVER_PORT + 1)
SERVER_PUBLIC=1
SERVER_WORLD_NAME="BraveNewWorld"
SERVER_PW="changeme"
SERVER_NAME="New \"${STEAMAPP}\" Server"
SERVER_LOG_PATH="logs_output/outputlog_server.txt"
SERVER_SAVE_DIR="Worlds"
SCREEN_QUALITY="Fastest"
SCREEN_WIDTH=640
SCREEN_HEIGHT=480
STEAMCMD_UPDATE_ARGS="" (Gets appended here: +app_update [appid] [STEAMCMD_UPDATE_ARGS]; Example: "validate")
ADDITIONAL_ARGS="" (Pass additional arguments to the server. Make sure to escape correctly!)

If you want to learn more about configuring a Valheim server check this documentation.

Config

You can find the adminlist.txt, bannedlist.txt and permittedlist.txt here: /home/steam/valheim-dedicated/Worlds.

The world database files can be found in:

  • /home/steam/valheim-dedicated/Worlds/worlds for tag valheim:latest
  • /home/steam/.config/unity3d/IronGate/Valheim/ for tag valheim:plus

Image Variants:

The valheim images come in two flavors, each designed for a specific use case.

valheim:latest

This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is a bare-minimum Valheim dedicated server containing no 3rd party plugins.

valheim:plus

This is a specialized image. It contains the popular mod ValheimPlus.

Note: The game world is saved in a different directory in this tag, make sure to create an additional volume for world persistency across container recreations. See #Hosting a simple game server

Contributors

Contributors Display

valheim's People

Contributors

cm2walki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

valheim's Issues

Plus container will no longer run with current valheim patch/update (0.215.2)

Restarting container crashes with a segmentation fault (sig 11). Error in log file is:

GetPixel called on an undefined mip (valid values are 0 - 6
Caught fatal signal - signo:11 code:1 errno:0 addr:0x3fb
Obtained 3 stack frames.
#0  0x007fe9ef6ba140 in funlockfile
#1  0x007fe9f07a32c3 in Texture2D_CUSTOM_GetPixelImpl_Injected(ScriptingBackendNativeObjectPtrOpaque*, int, int, int, int, ColorRGBAf&)
#2  0x0000004042f655 in (wrapper managed-to-native) UnityEngine.Texture2D:GetPixelImpl_Injected (UnityEngine.Texture2D,int,int,int,UnityEngine.Color&)
start_server_bepinex.sh: line 129:   102 Segmentation fault

I tried to create a new server and get the same error. I've also tried updating the BepInEx (5.4.2105) and get the same result

Mono runtime and class libraries are out of sync

Your mono runtime and class libraries are out of sync.
The out of sync library is: /home/steam/valheim-dedicated/unstripped_corlib/mscorlib.dll

When you update one from git you need to update, compile and install
the other too.
Do not report this as a bug unless you're sure you have updated correctly:
you probably have a broken mono install.
If you see other errors or faults after this message they are probably related
and you need to fix your mono install first.

wrong mount path for valheim plus

If you use the latest tag then the mount path specified in the readme (/home/steam/valheim-dedicated/) is correct, but if you use the plus tag, then the path to the persisted data is different (/home/steam/.config/unity3d/IronGate/Valheim/).

This means the world saves are not persisted if you remove and rebuild the container and you lose your world.

Crossplay/PlayFab support

Consider apt install libatomic1 libpulse0 libpulse-dev to enable crossplay. Currently PlayFab is unable to register correctly and receive a join code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.