LICENSE (MIT), installed as /usr/share/doc/terraria-server-manager/copyright in both packages and with %license in the RPM. README gains a License section and an up-to-date repository layout and build section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
terraria-server-manager
Run any number of vanilla Terraria and tModLoader dedicated servers on one Linux host. Each server is its own systemd service, and they're all managed with the terractl command.
sudo terractl new calamity tmodloader
sudo terractl mods calamity add ~/tmod-export
sudo terractl enable calamity --now
sudo terractl attach calamity
Features
- Many servers, one host. Each instance is
terraria@<name>.service, with its own directory, port, world and mods. - Vanilla and tModLoader side by side, chosen per instance.
- No manual installs.
terractl fetchdownloads official Terraria and tModLoader server zips (or drop them into/var/lib/terraria/distyourself); they're unpacked on demand, and each instance can be pinned to a specific version.terractl upgradechecks a new zip, backs up the worlds and switches version in one step. - Safe shutdowns. Stopping a server saves the world first.
- A live console.
terractl attachshows the server's output and lets you type commands into it;terractl watchjust shows the output. - Mod management.
terractl modsinstalls, enables and removes mods, with correct file ownership. - Tab completion for commands, instance names, mods and console commands.
- Export and import. Pack an instance into one
.tar.gzfor backups or moving to another machine, and import it anywhere, with paths, ports and ownership adjusted. - Scheduled backups.
terractl backup enable <name>backs an instance up daily (or on any schedule) with a systemd timer, saving the world first and keeping the newest 14. - Self-check.
terractl doctorchecks the whole setup, explains what's wrong with the command to fix it, and--fixfixes what it safely can. - Manage other hosts. Run any command on another host with
terractl --host nas ..., and copy or move instances between hosts withterractl copyandterractl move, like LXD/Incus remotes. Hosts opt in by running theterractlddaemon; access is per computer, over pinned TLS. - Hardened. Servers run as an unprivileged
terrariauser and can only write to their own data. - Access for moderators. Members of the
terrariagroup can start, stop and restart servers, use the console and read the servers' own logs, withoutsudoand without seeing the rest of the system's logs. - Helper for Windows. A PowerShell script exports your enabled tModLoader mods for the server.
Requirements
- Debian 12+ or Ubuntu 22.04+ (
.deb), or Fedora, RHEL 9+ and compatible (.rpm); other systemd-based distributions should work withmake install unzip,systemd; for tModLoader, alsocurland ICU (libicu)python3andopenssl, for managing other hosts
Install
From the apt repository, which also brings updates with sudo apt upgrade:
sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSL https://gitea.adbraun.lol/api/packages/adam/debian/repository.key \
-o /etc/apt/keyrings/terraria-server-manager.asc
echo "deb [signed-by=/etc/apt/keyrings/terraria-server-manager.asc] https://gitea.adbraun.lol/api/packages/adam/debian stable main" |
sudo tee /etc/apt/sources.list.d/terraria-server-manager.list
sudo apt update
sudo apt install terraria-server-manager
On Fedora, RHEL and compatible, from the RPM repository:
sudo curl -fsSL https://gitea.adbraun.lol/api/packages/adam/rpm.repo \
-o /etc/yum.repos.d/terraria-server-manager.repo
sudo dnf install terraria-server-manager
Or download the .deb or .rpm from the releases page, then:
sudo apt install ./terraria-server-manager_<version>_all.deb # Debian, Ubuntu
sudo dnf install ./terraria-server-manager-<version>-1.noarch.rpm # Fedora, RHEL
Or install from source, without a package:
sudo make install
Documentation
See docs/guide.md. It covers installation, creating instances, the console, configuration, mods, versions and upgrades, permissions and troubleshooting. Installed systems also have it at /usr/share/doc/terraria-server-manager/README.md.
Repository layout
bin/terractl The command-line tool
lib/terractl-remote Managing other hosts (--host, remote, daemon, copy, move), in Python
systemd/ terraria@ service and socket, terractld, terraria-backup@ service and timer
completions/bash/ Bash completion for terractl
config/ /etc/default settings, sysusers.d, tmpfiles.d, polkit and journald files
packaging/deb/ Debian package metadata and install/remove scripts
packaging/rpm/ RPM spec (Fedora, RHEL)
docs/guide.md Full documentation
tools/windows/ export-tmod-mods.ps1 for exporting mods from Windows
VERSION Current version, used by the build
Makefile make check | deb | rpm | install | uninstall | clean
Building
make check # syntax checks, plus shellcheck, pyflakes and rpmspec if installed
make deb # build/terraria-server-manager_<version>_all.deb
make rpm # build/terraria-server-manager-<version>-1.noarch.rpm (needs rpmbuild)
To release, update VERSION and CHANGELOG.md, commit, and push a matching tag:
git tag v$(cat VERSION) && git push origin v$(cat VERSION)
The release workflow (.gitea/workflows/release.yaml, Gitea Actions) then builds the .deb and the .rpm, publishes them as a release with that version's changelog section as the notes, and adds them to the apt and RPM repositories. It needs a runner with the ubuntu-latest label. To build a package by hand instead, run make deb or make rpm.
License
MIT; see LICENSE.
Disclaimer
This is an unofficial community tool. It is not affiliated with or endorsed by Re-Logic or the tModLoader team. It does not include any Terraria or tModLoader software; you supply the official server downloads.