Giter Club home page Giter Club logo

docker-svencoop-server's Introduction

docker-svencoop-server

Run a Sven Co-op dedicated server in Docker!

Created by: skylord123 https://github.com/skylord123
Docker Hub: https://hub.docker.com/r/skylord123/svencoop-server
GitHub: https://www.github.com/skylord123/docker-svencoop-server

I couldn't get any of the other containers working so I decided to make my own.
If you have never heard of Sven Co-op I highly recommend you check it out. It's an awesome game and it's now free on Steam.

Running the container

Running the container is super easy. Just run this command:

docker run --name svencoop-server -d \
-p 27015:27015 -p 27015:27015/udp \
--env 'GAME_PORT=27015' \
--env 'GAME_PARAMS=+maxplayers 12 +map osprey +log on -num_edicts 8192' \
--env 'VALIDATE=true'
--env 'UID=99' \
--env 'GID=100' \
--volume /mnt/user/appdata/steamcmd:/serverdata/steamcmd \
--volume /mnt/user/appdata/svencoop:/serverdata/serverfiles \
skylord123/svencoop-server:latest

This command will store steamcmd and serverfiles folders inside /mnt/user/appdata so if you want them stored elsewhere on the host make sure you change this (this was developed on Unraid which uses these paths).

If you run multiple containers make sure to share the steamcmd folder between them but have unique serverfiles folders.

After running the command steamcmd will start downloading the Sven Co-op dedicated server. Once that is finished it will launch the server and you should see the console output in your log.

Environment Variables

  • GAME_PORT - Game port for the server. Make sure this matches the port that users will use to connect or you may have issues (see below for more details)
  • GAME_PARAMS - Enter your arguments for svends_run (see above for example).
  • VALIDATE - Set the Variable to true if you want to validate the installation on container start otherwise leave it blank or set it to false.
  • USERNAME and PASSWORD - Steam user/pass for downloading (uses anonymous if not defined which works with Sven co-op so this is not necessary)

Auto restart unless stopped

Docker can automatically restart containers when they crash by simply adding this to the docker run command:

--restart=unless-stopped

Known Issues

All ports must match

Make sure that GAME_PORT matches the same port that clients will be connecting from otherwise you will get strange issues (even though it works).

Example: If you map GAME_PORT to 27015 (default) and then map it to 27016 on the host it will cause issues when clients try to add the server to their favorites (it will be added with whatever port the server is configured with in GAME_PORT even though it's really on another port).

Server fails to start with _stat error on Unraid 6.8 and above

If you see an error that looks like this then you will need to change your container appdata path:

_stat on file /serverdata/serverfiles/svencoop/liblist.gam which appeared to exist failed!!!

For some reason Unraid 6.8 caused this error to start happening. You can fix this by specifying the path to the appdata folder on the disk instead of the share. So you would change /mnt/user/appdata/svencoop to /mnt/cache/appdata/svencoop for example. If someone figures out more about why this is happening open an issue to let me know.

Report Issues or do Feature Requests

Issues and feature requests can be created from the issues tab on github.

License

We currently use the GNU GENERAL PUBLIC LICENSE. Click here for more information.

docker-svencoop-server's People

Contributors

skylord123 avatar

Stargazers

 avatar

Watchers

 avatar

docker-svencoop-server's Issues

failing to boot brand new image

On first boot I am presented with the following...

svencoop-server | SteamCMD not found!
svencoop-server | /serverdata/steamcmd/steamcmd_linux.tar.gz: Permission denied
svencoop-server | tar (child): /serverdata/steamcmd/steamcmd_linux.tar.gz: Cannot open: No such file or directory
svencoop-server | tar (child): Error is not recoverable: exiting now
svencoop-server | tar: Child returned status 2
svencoop-server | tar: Error is not recoverable: exiting now
svencoop-server | rm: cannot remove '/serverdata/steamcmd/steamcmd_linux.tar.gz': No such file or directory
svencoop-server | ---Update SteamCMD---
svencoop-server | /opt/scripts/start-server.sh: line 12: /serverdata/steamcmd/steamcmd.sh: No such file or directory
svencoop-server | ---Update Server---
svencoop-server | ---Validating installation---
svencoop-server | /opt/scripts/start-server.sh: line 25: /serverdata/steamcmd/steamcmd.sh: No such file or directory
svencoop-server | ---Server ready---
svencoop-server | ---Start Server---
svencoop-server | /opt/scripts/start-server.sh: line 69: /serverdata/serverfiles/svends_run: No such file or directory

I booted the image with the following docker-compose:
version: '3.3'
services:
svencoop-server:
container_name: svencoop-server
ports:
- '3075:3075'
- '3075:3075/udp'
environment:
- GAME_PORT=3075
- 'GAME_PARAMS=+maxplayers 12 +map osprey +log on -num_edicts 8192'
- VALIDATE=true
- UID=99
- GID=100
volumes:
- './steamcmd:/serverdata/steamcmd'
- './serverfiles:/serverdata/serverfiles'
image: 'skylord123/svencoop-server:latest'

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.