Git Product home page Git Product logo

terraria's Introduction

terraria

Docker images to run a Terraria Server. Images with TShock Server or Vanilla Server are available.

Auto Build Docker Image Size (tag) Docker Pulls Docker Stars

Usage

docker create --rm -it \
  --name=terraria \
  -v <path to data>:/config \
  -e world=<world_file_name> \
  -p 7777:7777 \
  beardedio/terraria

Docker Images are avaiable on Docker Hub

Supported tags and respective Dockerfile links

Quick reference

What is Terraria Server?

A Terraria server provides a platform for players to connect over the internet or other network for multiplayer games of Terraria.

How to use

Generating a new world

To run with out user intervention Terraria Server needs to be configure to use an already generated world. This means you can use one that you have already generated or you can generate one via docker by running this command:

sudo docker run --rm -it -p 7777:7777 \
    -v $HOME/terraria/config:/config \
    --name=terraria \
    beardedio/terraria

You can then follow the prompts to create a new world.

Starting your server with a preexisting world

The world file needs to exist in the config folder. To start a server using an already generated world, use this command:

sudo docker run --rm -dit \
  --name=terraria \
  -v $HOME/terraria/config:/config \
  -e world=<world_file_name> \
  -p 7777:7777 \
  beardedio/terraria

If you get an error from docker saying the container name already exists, it means you need to remove your old docker container process. sudo docker rm terraria

If you want to reattach to any running containers: sudo docker attach terraria Now you can execute any commands to the terraria server. Ctrl-p Ctrl-q will detatch you from the process.

Example Docker Compose file

Here is an example docker-compose file that enables to the use of the vanilla server

version: '3'

services:
  terraria:
    image: beardedio/terraria:vanilla-latest
    ports:
      - '7777:7777'
    restart: unless-stopped
    environment:
      - world=<world_file_name>
    volumes:
      - $HOME/terraria/config:/config
    tty: true
    stdin_open: true

beardedio/terraria:tshock-latest

TShock is a server modification for Terraria, written in C#, and based upon the Terraria Server API. It uses JSON for configuration management, and offers several features not present in the Terraria Server normally.

beardedio/terraria:tshock-dev-latest

TShock dev are unreleased development builds of TShock. These builds may be unstable but they are updated faster then the released versions so they support new versions of Terraria faster.

beardedio/terraria:vanilla-latest

Vanilla Terraria server is the server software provided by the developers of Terraria. This version has only basic features but it is updated along with the main game so it should always be up to date.

If a docker image isn't available of the latest versions please contact us about the new release so we can update this repo.

FAQ

  • Can I manage my own plugins for tshock?
    Yes, if you want manage you own plugins for tshock containers, you can add a volume mount to your docker command via -v <path to plugins folder>:/tshock/ServerPlugins. If you want to maintain any of the plugins that ship with tshock, you will need to copy them into the ServerPlugins folder. Mounting the plugins folder will override the plugins that ship with tshock.
  • I started the container but it keeps asking me to select a world, help?!
    You need to ether start the server with an existing world, in which case the server will start automaticly. Or you need to run the continer interactivly using the -it flag. This will allow you to create a new world. -The server returns a "System.NullReferenceException" exception when loading a world. Help!
    The server requires a tty connection, so when starting the server via docker run make sure to include the -it flag. Or if running using docker-compose make sure to add tty: true (see this issue)

Notes

  • Please check the TShock instructions for properly installing and configuring your terraria server.
  • Any additional command-line instructions can be added to the end of either method for launching a server. Docker maps the $HOME/terraria/world linux-host folder to the /tshock/world container-folder.
  • More information about running a server is available in the wiki.

License

The MIT License (MIT) Copyright (c) 2022 Brandon Skrtich

terraria's People

Contributors

hskrtich avatar ryansheehan avatar doomspork avatar einarf avatar neybar avatar stny avatar nathangorr avatar jonasahnstrom avatar kblaschke avatar skath avatar

Watchers

James Cloos 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.