tModLoader server with a web dashboard, Workshop mods, world management, and backups. AMD64/ARM64.
3.8K
Updated 2026-10-17 10:55 UTC · Refreshed hourly · Metric definitions
Run a modded Terraria server in Docker, with a built-in web dashboard for managing worlds, Workshop mods, players, and backups. Keep your server's data across container updates and manage it from your browser or Docker Compose.
This independently maintained project has its own features, fixes, and releases. It is not affiliated with Re-Logic or the tModLoader team.
Container images · Docker Hub · Releases · Changelog
Full changelog · All releases and preview notes
Read image tags and updates in the full documentation
Read dashboard gallery in the full documentation
You need Docker Engine with Compose or Docker Desktop, a 64-bit AMD64 or ARM64 Linux container environment, and enough memory and disk space for your mod pack. Players need tModLoader clients compatible with the server's version and mods.
Clone this repository, or download docker-compose.yml and .env.example into the same folder.
git clone https://github.com/Crosis47/tmodloader.git
cd tmodloader
Copy .env.example to .env:
cp .env.example .env
On Windows PowerShell, use Copy-Item .env.example .env instead.
Open .env. For browser-based configuration, set:
TMOD_WEB_ENABLED=1
This enables settings edits, world selection, and loading profiles and playthroughs in the dashboard. Environment values seed the initial settings; afterward, saved web values take precedence. Save changes in the dashboard, then use Review & apply to apply them and restart the game.
Set TMOD_WEB_ENABLED=0 to manage settings through .env and run without
the dashboard or its setup step. Existing installations can explicitly retain
TMOD_CONFIG_SOURCE=env to keep environment-managed settings with dashboard
monitoring, console, and backup controls.
Review the essential settings below before starting, particularly the game password, world name, and mods.
Server passwords can be changed or removed in Configuration when web management is enabled. Save the password as a draft, then review and apply to restart the game. Passwords are never returned by the settings API; the protected server data stores the value needed to generate the game configuration. A saved dashboard password (including an empty value) overrides the Compose password or password file on later starts.
docker compose pull
docker compose up -d
docker compose logs --tail=100 --follow tmodloader
With the dashboard enabled, the game waits for first-run admin setup:
http://SERVER-IP:8080 from your home network, or
http://localhost:8080 on the Docker host.The container saves a hashed credential in the persistent data directory and
continues startup automatically. First-time mod downloads and world generation
can take several minutes. Press Ctrl+C to stop following logs without stopping
the server.
HTTP works for clients in 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16
(RFC 1918), plus loopback. Other sources, including non-loopback IPv6, require
HTTPS for setup and all dashboard access. HTTP traffic is unencrypted; use it
only on a trusted network. The server checks the client source IP, not the URL.
Leave TMOD_WEB_ORIGIN empty when opening the server IP. For a hostname, set it
to the exact browser origin. For HTTPS through a reverse proxy, also set
TMOD_WEB_TRUSTED_PROXY to that proxy's IP as seen by the container, or its service name/network alias (for example, reverse-proxy) on a shared Docker network. Hostnames are resolved for each request; failed lookups do not trust forwarded headers. Use a name controlled by you on a trusted network. URLs, ports, wildcards, and subnets are not accepted.
The proxy must preserve Host and overwrite X-Forwarded-For with the actual
single client IP and X-Forwarded-Proto with http or https. Multi-proxy header
chains are rejected. Restrict backend access to the proxy when publishing it.
Docker forwarding or another gateway can hide the original source IP behind a private address. This rule can only classify the IP the container actually sees; do not directly port-forward the HTTP dashboard to the internet. Use the HTTPS proxy with the trusted-proxy setting to preserve the original client identity.
Check readiness in the dashboard or run:
docker compose ps
Once the server is healthy, connect from tModLoader to your Docker host's address
on port 7777 (or your chosen TMOD_PORT). Allow that TCP port through
the host firewall and forward it on your router if players connect over the internet.
Read essential settings in the full documentation
Read data and backups in the full documentation
For startup or connection problems, begin with docker compose ps and
docker compose logs --tail=200 tmodloader. Include relevant logs with an
issue report, removing private
information first.
Built on tModLoader for Terraria. Inspired by JACOBSMILE/tmodloader1.4. Thanks also to ldericher, rfvgyhn, guillheu, and FlorentLM for their earlier work.
Container code and scripts are distributed under LICENSE.md. Terraria, tModLoader, and bundled third-party tools retain their respective licenses.
The update card offers an opt-in Announce new tModLoader versions in game chat setting. It saves immediately without a restart, defaults to off, and sends one announcement per newly detected release while the game is healthy. The administration service checks in the background even without an open dashboard, using the existing release-check cache. Disabling and re-enabling the option does not repeat an already announced release.
Use the Theme selector in the header to choose Slate & Teal, Forest, Ocean, Amethyst, Copper, Solarized, Nord, or Rose Pine. The sun/moon button switches between light and dark mode. Both choices are remembered in this browser; initial light/dark mode follows your system preference.
For GitHub API rate limits during release discovery, optionally provide
TMOD_GITHUB_TOKEN as a runtime environment variable. Public release metadata
requires no additional repository permissions. It is used only for GitHub API
requests, is not a dashboard setting, and is not included in image builds.
CI smoke tests use their temporary workflow token automatically.
With TMOD_WEB_ENABLED=0, settings are environment-managed even if
TMOD_CONFIG_SOURCE=web remains set. Saved WebUI settings and game passwords
are ignored but retained for when WebUI management is enabled again.
Set TMOD_PORT for the game (default 7777) and TMOD_WEB_PORT for the dashboard
(default 8080). The supplied Compose configuration uses each setting directly
for both the container listener and published host port.
For compatibility, Compose accepts TMOD_HOST_PORT and TMOD_WEB_HOST_PORT
as fallbacks when their corresponding recommended setting is unset or empty.
TMOD_PORT and TMOD_WEB_PORT take precedence when both names are supplied.
Use the recommended names for new configurations.
If using a custom server configuration file, its game listening
port must match TMOD_PORT. Custom Compose files can still map different host and
container ports using Docker's normal port mapping.
With WebUI enabled, Docker health checks the dashboard while first-time admin setup
is waiting. After admin setup, both the dashboard and game must be healthy. A stopped
or failed game reports unhealthy after Docker's configured failed checks, while the
dashboard remains available for recovery. Downloads, world generation, backups, and
intentional game stops can also temporarily report unhealthy; health status alone
does not restart the container. The dashboard reports game readiness separately.
With TMOD_WEB_ENABLED=0, Docker health checks game readiness only.
The default startup grace period is 60 seconds, with checks every 30 seconds and three
failures required to report unhealthy. A successful check ends the startup grace period.
Keep the default unless measured startup time requires a longer grace period, such
as initial downloads or world generation in headless mode. Adjust
TMOD_HEALTH_START_PERIOD in the supplied Compose .env, or Docker's
--health-start-period, to suit that startup time. This is a deployment setting,
not a WebUI setting.
healthcheck --container selects the appropriate check; healthcheck (or --game)
always checks the game. Internal update and recovery operations use game readiness.
The dashboard readiness endpoint /healthz is accessible only from container loopback
and returns no credentials or game information. Deployment ports, mounts, and settings
management mode remain controlled outside the dashboard.
The bundled server-only mod also manages the TCP listener lifecycle. Each accept thread owns its socket, preventing an older thread from closing a replacement listener when connection slots fill and reopen. Terraria still handles player limits, authentication, and packets. No client mod is required. This addresses listener recovery; it is not a substitute for firewall or access controls.
Upstream report: tModLoader/tModLoader#5470.
Content type
Image
Digest
sha256:ceeff4966…
Size
240.5 MB
Last updated
about 3 hours ago
docker pull crosis47/tmodloader