Skip to content

TModLoader server setup using Docker including automatic backups. Compatible with ARM.

License

Notifications You must be signed in to change notification settings

KonoLoserDa/tmodloader-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmodloader-docker

Easy to setup tModLoader server using docker with automatic backups.

Setup

  1. Clone repository
git clone https://github.com/cubebuc/tmodloader-docker.git
  1. Change directory
cd tmodloader-docker
  1. Launch detached using docker compose
docker compose up -d
  1. Attach to tModLoader container
docker attach tml
  • press ENTER after attaching

Now you can create/delete/start worlds and configure mods using the terminal.
To detach from the container press Ctrl + P + Q.


To shutdown the docker use:

docker compose down

Configure

serverconfig.txt

You can directly edit the serverconfig.txt file - it will be used for the server if present.
Paths start with /app/data, because that is where root repo folder is mapped in docker volumes.


Backups

Backups are setup using cron and save into backups/ folder (generates after first backup).
By default there are hourly and daily backups (keeping 3 and 2 last backups respectively).
You can edit the crontab file to customize them.

Example:

0 * * * * /app/data/backup.sh hourly 3
  • 0 * * * * → cron timing syntax
  • /app/data/backup.sh → backup script - do NOT change
  • hourly → subfolder name under backups
  • 3 → number of backups to keep in this folder

Updating

To avoid mod incompatibilities updating is done manually, following these simple steps:

  1. Shutdown the Docker
docker compose down
  1. Update the TML_VERSION
export TML_VERSION=v2xxx.y.z

where v.2xxx.y.z is the target version

  1. Re-Build the Docker
docker compose build --no-cache
  1. Re-Launch your Docker
docker compose up -d

Mods

To add mods, copy the .tmod files directly into tModLoader/Mods folder (generated after first start).

Recommendations

  • Add Better Autosave mod - by default it saves the world only once per Terraria day.
  • Specifying world in the serverconfig.txt disables interactive mode and starts the server directly (omitting it starts interactive mode).

About

TModLoader server setup using Docker including automatic backups. Compatible with ARM.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 55.4%
  • Dockerfile 44.6%