Skip to content

NickLaMuro/chef-7dtd-server

Repository files navigation

7dtd-server

Installs, configures and runs a 7 Days to Die server.

7 Days to Die is a PC zombie survial game made by "The Fun Pimps" and is available through Steam.

Requirements

  • To install a copy of the 7 Days to Die server client via chef, it requires credentials of a Steam account with SteamGuard (otherwise user input is required to install the server with steamcmd) disabled and a licensed copy of 7 Days to Die purchased for that account.
  • Ubuntu 12.04 (this might work on other apt-get based distros, but this is currently the only supported version at the moment)

Attributes

Required

Key Type Description Default
['sdtd']['steam_username'] String Steam username with a `7 Days to Die` license (required) nil
['sdtd']['steam_password'] String Password for the above username (required) nil

Instance Settings

Key Type Description Default
['sdtd']['instance_dir'] String The base directory for your instances "#{node["steamcmd"]["apps_dir"]}/294420/instances"
['sdtd']['instance_name'] String Folder name for the instance. "7dtd_instance_01"

Backup settings

Key Type Description Default
['sdtd']['backups_dir'] String The base directory for your backups. Each instance will have a subfolder in here. "#{node['steamcmd']['home']}/backups"
['sdtd']['compress_backups'] Boolean Whether or not to compress the backups created true

Server Config

Settings that determine the difficulty and other settings of the server, as well as alternative admin settings and controls.

Basic Config

Key Type Description Default
['sdtd']['serverconfig']['ServerPort'] String Port you want the server to listen on "26900"
['sdtd']['serverconfig']['ServerIsPublic'] String Whether or not to register this server with the master server. "false"
['sdtd']['serverconfig']['ServerName'] String Name of the server "My Game Host"
['sdtd']['serverconfig']['ServerPassword'] String Password for the server ""
['sdtd']['serverconfig']['ServerMaxPlayerCount'] String Maximum Concurrent Players "8"
['sdtd']['serverconfig']['ServerDescription'] String Description for the server "A 7DTD server"
['sdtd']['serverconfig']['ServerWebsiteURL'] String Website URL for the server ""

Game settings

Key Type Description Default
['sdtd']['serverconfig']['GameWorld'] String Options: Navezgane, MP Wasteland Horde, MP Wasteland Skirmish, MP Wasteland War, Random Gen "Random Gen"
['sdtd']['serverconfig']['GameName'] String Name of the game. Controls the server SEED. "My Game"
['sdtd']['serverconfig']['GameDifficulty'] String 0 - 4, 0=easiest, 4=hardest "2"
['sdtd']['serverconfig']['GameMode'] String GameModeSurvivalMP, GameModeSurvivalSP (MP has land protection) "GameModeSurvivalMP"
['sdtd']['serverconfig']['ZombiesRun'] String 0 = default day/night walk/run, 1 = never run, 2 = always run "0"
['sdtd']['serverconfig']['BuildCreate'] String cheat mode on/off "false"
['sdtd']['serverconfig']['DayNightLength'] String Time in minutes "40"
['sdtd']['serverconfig']['FriendlyFire'] String Can friendly players damage each other (PvP) "false"
['sdtd']['serverconfig']['PersistentPlayerProfiles'] String If disabled a player can join with any selected profile. If true they will join with the last profile they joined with "true"
['sdtd']['serverconfig']['DropOnDeath'] String 0 = everything, 1 = toolbelt only, 2 = backpack only, 3 = delete all "0"
['sdtd']['serverconfig']['DropOnQuit'] String 0 = nothing, 1 = everything, 2 = toolbelt only, 3 = backpack only "0"
['sdtd']['serverconfig']['CraftTimer'] String 0 = None (instant), 1 = Normal, 2 = Fast (double speed) "1"
['sdtd']['serverconfig']['LootTime'] String 0 = None (instant), 1 = Normal, 2 = Fast (double speed) "1"
['sdtd']['serverconfig']['EnemySenseMemory'] String Time, in seconds, that a zombie will pursue something that has been sensed. "60"
['sdtd']['serverconfig']['EnemySpawnMode'] String 0 = Disabled 0%, 1 = Very Low 50%, 2 = Low 75%, 3 = Medium 100%, 4 = High 125%, 5 = Very High 150% "3"
['sdtd']['serverconfig']['EnemyDifficulty'] String 0 = Normal, 1 = Feral "0"
['sdtd']['serverconfig']['NightPercentage'] String Percentage in whole numbers. "35"
['sdtd']['serverconfig']['BlockDurabilityModifier'] String Percentage in whole numbers. "100"
['sdtd']['serverconfig']['LootAbundance'] String Percentage in whole numbers. "100"
['sdtd']['serverconfig']['LootRespawnDays'] String Days in whole numbers. "7"
['sdtd']['serverconfig']['LandClaimSize'] String Size in blocks that is protected by a keystone "7"
['sdtd']['serverconfig']['LandClaimDeadZone'] String Keystones must be this many blocks apart (unless you are friends with the other player) "30"
['sdtd']['serverconfig']['LandClaimExpiryTime'] String The number of days a player can be offline before their claims expire and are no longer protected "3"
['sdtd']['serverconfig']['LandClaimDecayMode'] String Controls how offline players land claims decay. All claims have full protection for the first 24hrs. 0=Linear, 1=Exponential, 2=Full protection until claim is expired. "0"
['sdtd']['serverconfig']['LandClaimOnlineDurabilityModifier'] String How much protected claim area block hardness is increased when a player is online. 0 means infinite (no damage will ever be taken). Default is 32x "4"
['sdtd']['serverconfig']['LandClaimOfflineDurabilityModifier'] String How much protected claim area block hardness is increased when a player is offline. 0 means infinite (no damage will ever be taken). Default is 32x "4"
['sdtd']['serverconfig']['AirDropFrequency'] String How often airdrop occur in game-hours, 0 == never "72"
['sdtd']['serverconfig']['MaxSpawnedZombies'] String Making this number too large (more than about 80) may cause servers to run at poor framerates which will effect lag and play quality for clients. "60"

Control Panel Settings

Key Type Description Default
['sdtd']['serverconfig']['ControlPanelEnabled'] String Enable/Diable the control panel "false"
['sdtd']['serverconfig']['ControlPanelPort'] String Port of the control panel webpage "8080"
['sdtd']['serverconfig']['ControlPanelPassword'] String Password to gain entry to the control panel "CHANGEME"

Telnet Settings

Key Type Description Default
['sdtd']['serverconfig']['TelnetEnabled'] String Enable/Diable the telnet "true"
['sdtd']['serverconfig']['TelnetPort'] String Port of the telnet server "8081"
['sdtd']['serverconfig']['TelnetPassword'] String Password to gain entry to the telnet interface "CHANGEME"

NAT Settings

Key Type Description Default
['sdtd']['serverconfig']['DisableNAT'] String Set this to true if your router doesn't support NAT "true"
['sdtd']['serverconfig']['AdminFileName'] String Server Admin file name "admins.xml"
['sdtd']['serverconfig']['EACEnabled'] String Enables/Disables EasyAntiCheat "true"
['sdtd']['serverconfig']['SaveGameFolder'] String Use this to override the default save game path nil

Admin Config

This sets up the admin configuration for the default instance. Admins, moderators and commands all have permission levels associated with them. The commands available to the admins and moderators are determined by the permissions assigned to each of the commands.

A whitelist can also be set up that only allows those that are a part of the list.

Key Type Description Default
['sdtd']['serveradmin']['admins'] Hash A hash of Steam IDs and Permission levels as keys and values of the hash respectively to be admins of the server. nil
['sdtd']['serveradmin']['moderators'] Hash A hash of Steam IDs and Permission levels as keys and values of the hash respectively to be moderators of the server. nil
['sdtd']['serveradmin']['permissions'] Hash A hash of commands and Permission levels as keys and values of the hash respectively for permission levels for each command. nil
['sdtd']['serveradmin']['whitelist'] Hash A hash of Steam IDs and Permission levels as keys and values of the hash respectively of servers to be allowed to the server. If there are any items in the whitelist, the whitelist only mode is enabled. nil
['sdtd']['serveradmin']['blacklist'] Hash A hash of Steam IDs and Unban date as keys and values of the hash respectively for blacklist of steam users and when the ban is lifted. nil

Recipes

  • 7dtd-server::default: Installs the server, creates an instance, and runs the server
  • 7dtd-server::install: Installs the server
  • 7dtd-server::create: Creates/configures an instance
  • 7dtd-server::backup: Setups up backups for the server instance (TODO)
  • 7dtd-server::start: Starts the server (TODO)
  • 7dtd-server::stop: Stops the server (TODO)

Usage

7dtd-server::default

Include 7dtd-server in your node's run_list:

{
  "run_list": [
    "recipe[7dtd-server::default]"
  ]
}

Add include the following attributes:

override['sdtd']['steam_username'] = "YOUR_STEAM_USERNAME"
override['sdtd']['steam_password'] = "YOUR_STEAM_PASSWORD"

7dtd-server::backup

After having run the install and instance recipes (or default, which does both), add backup to the run list:

{
  "run_list": [
    "recipe[7dtd-server::backup]"
  ]
}

TODO

  • Add rsync script from vagrant
  • Convert definitions to LWRPs
  • Refactor code

Author

Author:: Nicholas LaMuro

About

Chef recipe for installing and configuring a 7 Days to Die server: http://7daystodie.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published