yon09/terraria-server

By yon09

Updated over 1 year ago

A Terraria server Docker image for Raspberry Pi with customizable world settings and player options.

Image
Networking
0

491

yon09/terraria-server repository overview

Overview

This Docker image provides a Terraria server that is fully compatible with multiple platforms, including Raspberry Pi (ARM32 and ARM64). It allows you to customize world settings and server configurations through environment variables.

Features

  • Multiplatform Support: Compatible with x86_64, ARM32, and ARM64 (e.g., Raspberry Pi 3/4).
  • Customizable World and Server: Define world name, size, difficulty, MOTD, language, max players, password, and seed.
  • Automated Setup: Automatically creates a new world if none exists.
  • Expandable: Ideal for use with Docker Compose.

How to Use

  1. Docker Run Command To start the Terraria server with custom parameters, run:
docker run -d -p 7777:7777 \
  -e WORLD_NAME=MyWorld \
  -e WORLD_SIZE=2 \
  -e WORLD_DIFFICULTY=1 \
  -e WORLD_SEED=myseed123 \
  -e MOTD=Welcome!!! \
  -e LANGUAGE=en-US \
  -e MAX_PLAYERS=8 \
  -e PASSWORD=<YOUR_PASSWORD> \
  -v /worlds/path:/opt/terraria-server/worlds \
  --name terraria-server \
  yon09/terraria-server:latest
Environment Variables and Defaults:
  • WORLD_NAME: Set the name of the world file (e.g., "MyWorld.wld"). Default is "MyWorld".
  • WORLD_SIZE: Set the world size (1 = small, 2 = medium, 3 = large). Default is 1 (small).
  • WORLD_DIFFICULTY: Set the world difficulty (0 = normal, 1 = expert, 2 = master). Default is 0 (normal).
  • WORLD_SEED: Set the seed you want to use. Default is an empty string "", which generates a random seed.
  • MOTD: Message of the day displayed on server join. Default is "Welcome!!!".
  • LANGUAGE: Sets the server language. Supported options include en-US, de-DE, it-IT, fr-FR, es-ES, ru-RU, zh-Hans, pt-BR, and pl-PL. Default is en-US.
  • MAX_PLAYERS: Sets the maximum number of players allowed on the server. Must be between 1 and 255. Default is 8.
  • PASSWORD: Optional server password for player access. Default is an empty string "" (no password).
  1. Using Docker Compose Create a docker-compose.yml file with the following content:
version: '3'
services:
  terraria-server:
    image: yon09/terraria-server:latest
    container_name: terraria-server
    ports:
      - "7777:7777"
    volumes:
      - /worlds/path:/opt/terraria-server/worlds
    environment:
      - WORLD_NAME=MyWorld
      - WORLD_SIZE=2
      - WORLD_DIFFICULTY=1
      - WORLD_SEED="myseed123"
      - MOTD=Welcome!!!
      - LANGUAGE="en-US"
      - MAX_PLAYERS=8
      - PASSWORD=<YOUR_PASSWORD>
    restart: unless-stopped

Then, start the server with:

docker-compose up -d

Additional Information

  • Ports: The server listens on port 7777 by default. Ensure that the port is open and mapped correctly on your system.
  • Data Persistence: To persist the world data, mount the world directory to a volume

Feel free to customize these parameters to fit your needs. Enjoy your Terraria server on Raspberry Pi!

Tag summary

Content type

Image

Digest

sha256:021da7a89

Size

269.9 MB

Last updated

over 1 year ago

docker pull yon09/terraria-server