Forge Home


A TShock Terraria Server module


9,327 latest version

1.9 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.1 (latest)
released Nov 6th 2014

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'dankreek-tshock', '0.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add dankreek-tshock
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install dankreek-tshock --version 0.0.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



dankreek/tshock — version 0.0.1 Nov 6th 2014


Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with terraria
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module


A module that downloads and installs the TShock Terraria server.

Module Description

Intalls the TShock Terraria server as well as an Upstart config file to allow for starting and stopping the service.

This module deploys a script in the TShock installation directory called which contains all the configurable command line options. The Upstart configuration runs GNU Screen as the root user and then launches the TShock server inside of it as the service user specified by configuration.


To use this module you will simply need a machine running Ubuntu 14.04. TShock will be installed as an Upstart service so the start, stop, and restart commands all work.


Adding the tshock class to a node definition should be all you need to get going with the defaults.

    class { 'tshock': }

Parameters which control how the server is started. If the parameter is not specified then the default is used.

Parameter Default Description
install_loc /opt/tshock The location where TShock is installed
user tshock The user that TShock precess is run as
ip The IP address that the server is bound to, indicates to bind to all available interfaces.
port 7777 The port that the server will listen on
maxplayers 8 The maximum number of players that can join the server
world default.wld The file name of the world to start. It will be created if it doesn't currently exist
world_path $install_loc/Terraria/Worlds The absolute path to where world files are to be stored
world_size 1 The size of the world if one it to be created. 1=small, 2=medium and 3=large. If the world already exists then this parameter is ignored
language English The language that is spoken on the server
conn_per_ip 8 The number of connections allowed per IP address


For more information on TShock see their site at at . This module installs TSHock version


This module has only been tested on Ubuntu Server 14.04, but should work on any version of Ubuntu based on upstart.

In this early version of the module I wasn't able to smartly send a signal to the TShock server to shut down, so currently when the stop signal is sent to the TShock upstart job, the exit command is pushed into the screen session along with the enter key to simulate a user typing exit in the TShock console. Hopefully in a future version I will be able to capture the TShock PID and be more intelligent about this.


Please see the Github repository to contribute or raise issues.

Release Notes/Contributors/Etc

  • Version 0.0.1
    • November 5, 2014
    • Initial release to the Puppet Forge.
  • Version 0.0.2
    • November 5, 2014
    • Documentation added.