Skip to content

cubebuc/tmodloader-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 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

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published