Giter VIP home page Giter VIP logo

ansible-role-dontstarvetogether's Introduction

Ansible role Don't Starve Together dedicated server

Setup and install one or more Don't Starve Together dedicated server.

caves included 🍄

Requirements

The Steam CMD client must be present on the targeted host. You may use this role in combination with this role for Steam cmd to ease things up.

In any case you can simply point to your existing installation with the help of these variables:

steamcmd_user: steam
steamcmd_user_home: /home/{{ steamcmd_user }}/
steamcmd_directory: /home/{{ steamcmd_user }}/cmd/

Role Variables

# steamcmd configuration
steamcmd_user: steam
steamcmd_user_home: /home/{{ steamcmd_user }}/
steamcmd_directory: /home/{{ steamcmd_user }}/cmd/
steamcmd_steam:
  username: anonymous
  password:

# app wide configuration
dst_app_id: 343050
dst_install_dir: '{{ steamcmd_user_home }}apps/dontstarvetogether/'
dst_server_token: ~ # proves ownership of Don’t Starve Together

# world
dst_world_preset: SURVIVAL_TOGETHER

# network
dst_server_as_a_service: true
dst_server_name: "[Host]'s World"
dst_server_description: Once uppon a time in a quite hostile world.
dst_server_port: 10999
dst_server_password: password
dst_server_save_slot: ~  # which save slot should the dedicated server load
dst_server_intention: cooperative
dst_max_players: 6 # 1..64
dst_pvp: false # true | false
dst_game_mode: survival # endless | survival | wilderness
dst_enable_autosaver: true # creates a save at the start of each day, which will be resumed from when the server restarts
dst_enable_snapshots: false # allow GSAs the ability to fully roll back a server to an older state
dst_tick_rate: 30 # quality of the server, higher tick rate consumes more bandwidth and CPU
dst_connection_timeout: 8000 # time in milliseconds that the server should wait before dropping a non responsive client
dst_enable_vote_kick: false # vote kick allows users to vote to kick players that are disrupting the game
dst_pause_when_empty: true # pause the simulation when the dedicated server is empty
dst_offline_server: false

# steam
dst_disable_cloud: true

# misc
dst_console_enabled: true
dst_autocompiler_enabled: true

# shard
dst_shard_enable: false # enable different server to work together
dst_shard_is_master: false # define the master server
dst_shard_name: overworld # define the shard name
dst_shard_cluster_key: change_this_if_you_set_bind_ip
dst_shard_master_ip: ~ # set the master server IP
dst_shard_id: "{{ dst_shard_name | to_uuid }}"

Example Playbook

Setup a classical survival Don't Starve Together server:

- hosts: myhostname
  vars:
    dst_server_token: myUniqueServerToken
  roles:
    - lutangar.dontstarvetogether

Setup a classical overworld server plus a caves server for spelunking:

- hosts: myhostname
  vars:
    dst_server_token: myUniqueServerToken
  roles:
    - { role: lutangar.dontstarvetogether, dst_shard_enable: true, dst_shard_is_master: true }
    - { role: lutangar.dontstarvetogether, dst_shard_enable: true, dst_world_preset: DST_CAVES, dst_server_port: 11000, dst_shard_name: caves, master_ip: 127.0.0.1 }

Remember there's only one master server, and other servers must set the master's IP and a different port number.

This setup would creates 2 system services named after the shard name, allowing to stop, start and restart servers individually:

service dst-overworld restart
service dst-caves restart

Don't forget to open the host ports to access the servers from the outside.

License

MIT

Resources

http://dont-starve-game.wikia.com/wiki/Guides/Don’t_Starve_Together_Dedicated_Servers

ansible-role-dontstarvetogether's People

Contributors

lutangar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.