Coder Social home page Coder Social logo

cm2walki / valheim Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 16.0 97 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

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.