Giter VIP home page Giter VIP logo

insurgency-sandstorm-server-dockerize's Introduction

Insurgency: Sandstorm Docker Container

Docker Image CI Docker Image Size (tag) Docker Pulls

Changelog
Feb, 2022
some fixes in modmap.env
mod.io token moved from Engine.ini to GameUserSettings.ini (because NWI)
fixed steam warning in dockerfile "Please use force_install_dir before logon!"
changed readme
changed ENTRYPOINT now you can use LAUNCH_SERVER_ENV to set map
new options on ini files

This repository contains a docker image with a dedicated server for Insurgency Sandstorm that you can fully customize to your need for COOP and PVP servers.

This image will be built any time there are updates to the steam app or upstream docker image, so you don’t have to update anything inside a container. I tried to build the image as “best-practice” as possible and to document everything for you.

Official documentation: Sandstorm Server Admin Guide

Another Server Admin Guide Server Admin Guide by mod.io

More config examples: Configs by zWolfi

How to build/get Insurgency Sandstorm dedicated server

cd directory where Dockerfile docker build -t andrewmhub/insurgency-sandstorm:latest . or get it on docker hub docker pull andrewmhub/insurgency-sandstorm

How to launch Insurgency Sandstorm dedicated server

Running multiple instances (use PORT, QUERYPORT and HOSTNAME) and LAUNCH_SERVER_ENV in modmap.env:

docker run -d --restart always --env-file /home/user/coop-modmap/modmap.env \
--name sandstorm-modmap --net=host \
-v /home/user/coop-modmap/Mods:/home/steam/steamcmd/sandstorm/Insurgency/Mods:rw \
-v /home/user/coop-modmap/config/ini:/home/steam/steamcmd/sandstorm/Insurgency/Saved/Config/LinuxServer:ro \
-v /home/user/coop-modmap/config/txt:/home/steam/steamcmd/sandstorm/Insurgency/Config/Server:ro andrewmhub/insurgency-sandstorm:latest

Examples config files in directory config

Optional launch options:

-NoEAC have problem with EAC just disables it

-nominidumps some crash dump handler that uploads crash information to insurgency devs servers this option disables it

docker-compose.yml example

version: '3.7'
services:
  insurgency-sandstorm:
    image: andrewmhub/insurgency-sandstorm:latest
    container_name: insurgency-sandstorm
    restart: unless-stopped
    env_file:
       - .env
    volumes:
      - /home/user/coop-modmap/config/ini:/home/steam/steamcmd/sandstorm/Insurgency/Saved/Config/LinuxServer:ro
      - /home/user/coop-modmap/config/txt:/home/steam/steamcmd/sandstorm/Insurgency/Config/Server:ro
      - /home/user/coop-modmap/Mods:/home/steam/steamcmd/sandstorm/Insurgency/Mods:rw
    ports:
      - "${PORT}:${PORT}/udp"
      - "${QUERYPORT}:${QUERYPORT}/udp"

.env example

HOSTNAME=[ISMC] MOD MAPS ONLY @120hz
PORT=12345
QUERYPORT=54321
LAUNCH_SERVER_ENV=LAUNCH_SERVER_ENV=Ministry?Scenario=Scenario_Ministry_Checkpoint_Security?Game=CheckpointHardcore?password=MyPa$$word?MaxPlayers=10 -MapCycle=MapCycle -Mods -ModList=Mods.txt -mutators="ISMCarmory_legacy,ImprovedAI,NoRestrictedArea,ScaleBotAmount,AdvancedSupplyPoints,WelcomeMessage,JoinLeaveMessage,FpLegs,JumpShoot" -GameStatsToken=my_token -GameStats -GSLTToken=my_token -ModDownloadTravelTo=TORO?Scenario=Scenario_TORO_Checkpoint_Security

Server auto update

Autoupdate game server. This script will keep your game servers automaticly updated updating intervals announce the server is shutting down for updates

Requirements: rcon-cli

wget https://github.com/gorcon/rcon-cli/releases/download/v0.10.1/rcon-0.10.1-amd64_linux.tar.gz
tar -xvzf rcon-0.10.1-amd64_linux.tar.gz
cp rcon-0.10.1-amd64_linux/rcon /usr/local/bin/

Get restart script example

wget --no-check-certificate -O /opt/restart-ins.sh https://raw.githubusercontent.com/AndrewMarchukov/insurgency-sandstorm-server-dockerize/master/AutoUpdater/restart-ins.sh
chmod +x /opt/restart-ins.sh

The next script make version comparison if game server version changed in steam or ISMC mod version you insurgency sandstorm server will automatically restarted and get update

wget --no-check-certificate -O /opt/check-manifest.sh https://raw.githubusercontent.com/AndrewMarchukov/insurgency-sandstorm-server-dockerize/master/AutoUpdater/check-manifest.sh
chmod +x /opt/check-manifest.sh

Get systemd unit daemon

wget --no-check-certificate -O /etc/systemd/system/my-server-check.service https://raw.githubusercontent.com/AndrewMarchukov/insurgency-sandstorm-server-dockerize/master/AutoUpdater/my-server-check.service
systemctl daemon-reload
systemctl enable my-server-check.service
systemctl start my-server-check.service

Tips and Tricks

How to save RAM on UE4 Linux(Docker) dedicated server

if you launch multiple servers on same host you can save some memory, on 2 game servers more than 1gb memory saved.

Make sure that parameter set on 1 after host reboot

echo 1 > /sys/kernel/mm/ksm/run

and add launch options -useksm -ksmmergeall then restart servers

wait some amount of time and check statistics grep -H '' /sys/kernel/mm/ksm/*

pages_shared - how many shared pages are being used

pages_sharing - how many more sites are sharing them i.e. how much saved

pages_unshared - how many pages unique but repeatedly checked for merging

pages_sharing*4096/1024/1024=how much memory saved

So, in your example, 264281 pages have been found to be shareable. KSM saved you about 1032 MB of memory.

insurgency-sandstorm-server-dockerize's People

Contributors

andrewmarchukov avatar dependabot[bot] avatar github-actions[bot] avatar

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.