Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

1. Role Variables

Jose R. Gonzalez edited this page May 8, 2018 · 1 revision

The following variables are configurable and will be organized based on context.

Infrastructure Variables

These variables are elements that relate to the infrastructure itself - and how you would like that configured. The values here are the defaults as defined in the role here. Comments have been added for clarification in this wiki.

# system user that is created on each host
terraria_user: "terraria"

# universal path, acts as home directory for the system user
terraria_install_path: "/opt/terraria"

# directory structure of the universal path
terraria_install_path_components:
  - worlds
  - software

# directory structure for the world-specific path
world_install_path_components:
  - bin
  - backups

# path where each world's directory will be created
worlds_dir: "{{ terraria_install_path }}/worlds"

# rate in which the save scripts will rotate old world files.
# configurable based on your intended recovery solution
# unit: minutes
backup_preserve_age_minutes: 720

# this is the location of the server files that the role reaches
# out to grab. We expect the files to be listed as <version>.zip
# at this path. Useful for configuring a local mirror, but otherwise
# will reach upstream for the server files.
terraria_server_file_mirror: 'https://terraria.org/server'

# the application - the path to the binary is built dynamically 
# using symlinks, and our scripts need to reference the right path
# this will eventually be auto-detected by the role
server_binary: 'TerrariaServer.bin.x86_64'

Terraria Software Variables

These are the elements of the Terraria server itself that are read by the software. Generally speaking, these are configuration file elements that are defined when the world is started.

# The name of your Terraria world. This must
# be one word for the time being.
world_name: "TerraNova"

# The message of the day for your world
# displayed at login
world_motd: "A new beginning..."

# The difficulty of your world. 
# Options: "normal", "expert"
world_difficulty: "normal"

# The size of your world
# Options: "small", "medium", "large"
world_size: "medium"

# The max allowed players
world_max_players: 5

# The language of your server
server_lang: "en-US"

# A list of banned players.
banned_players:
  - PlAcEhOlDeRl337

# enable the auto-creation of your world
# The terraria software will only consume this variable
# if a world file is not found. 
world_autocreate: True

# The seed used to generate your world
# The terraria software will only consume this variable
# if a world file is not found. 
world_seed: "ThisIsNotReallyASeed"

# The listen port of your server
# this must be unique per host
server_port: 7777

# The password of your server. By default
# the role does not configure the server to require
# a password.
server_password:

# The server NPC stream value which controls the enemy
# movement data in exchange for bandwidth. Per documentation
# a value of 0 is off
server_npc_stream: 60

# The priority of this instance on the system
# Options: "realtime", "high', "abovenormal", "normal", "belownormal", "idle"
server_system_priority: "high"

# Whether uPNP should be configured - as this is 
# intended for hosted solutions, this is set to false
# by default
server_upnp_enabled: False

# The secure level used by the server. This is disabled by
# default as false positives with ranged characters and 
# automatic weapons can boot a player without cause
world_secure_level: 0
Clone this wiki locally