Public | Automated Build

Last pushed: 20 days ago
Short Description
tshock, the Terraria server
Full Description

tshock, the Terraria server

This generates images for Docker and rkt with the latest version of TShock.

Usage

Remember to create, and then mount these directories:

  • /var/lib/tshock/worlds - if you want any form of persistence, that is
  • /var/lib/tshock/config - or else you won't be able to rename your world and the such
  • /var/lib/tshock/log - okay, that one is optional

Without any command line arguments a new world will be generated for you,
if none exists.
You will most probably want this unless you have already used Terraria to generate one and have uploaded it.

mkdir -p /tmp/terraria/{log,config,worlds}
chown -R 1000:1000 /tmp/terraria

docker run -ti --rm \
  -p 7777:7777 \
  -v /tmp/terraria/config:/var/lib/tshock/config \
  -v /tmp/terraria/worlds:/var/lib/tshock/worlds \
  -v /tmp/terraria/log:/var/lib/tshock/log \
  wmark/terraria

# no arguments = generate a new world if none exists

Your first commands, after connecting to the server, should be:
/auth XXXXX
(instructions will be displayed to create an admin account and how to sign in)
/serverpassword XXXX

Now disconnect to edit the configuration file. Name your world. ;-)
Finally, start the server again for good.

This is how you do it with a specific world file.
If you skipped the last line, then the pre-generated one will be used:

# Remember to prepend this to your *.wld: /var/lib/tshock/worlds/
# That is the location for world files within the container.

docker run -ti --rm \
  -p 7777:7777 \
  -v /tmp/terraria/config:/var/lib/tshock/config \
  -v /tmp/terraria/worlds:/var/lib/tshock/worlds \
  -v /tmp/terraria/log:/var/lib/tshock/log \
  wmark/terraria \
    -world /var/lib/tshock/worlds/myTerrariaWorldName.wld

See also:
https://tshock.atlassian.net/wiki/display/TSHOCKPLUGINS/Setting+Up+Your+Server

Use with rkt

Adjust the paths and run:

mkdir -p /tmp/terraria/{log,config,worlds}
chown -R 1000:1000 /tmp/terraria

sudo rkt run \
  --port=terraria:7777 \
  --volume logdir,kind=host,source=/tmp/terraria/log \
  --volume config,kind=host,source=/tmp/terraria/config \
  --volume worlds,kind=host,source=/tmp/terraria/worlds \
  blitznote.com/aci/terraria:4.3.20 \
    -- -autocreate 1 -world /var/lib/tshock/worlds/AutoGenerated-1.wld
Docker Pull Command
Owner
wmark
Source Repository

Comments (0)