# forcebyte/terraria-tmodloader-server-arm architecture

> Architecture diagram of the GitHub repository forcebyte/terraria-tmodloader-server-arm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/forcebyte/terraria-tmodloader-server-arm
- Repository: https://github.com/forcebyte/terraria-tmodloader-server-arm
- Video tour (about a minute): https://gitdiagram.com/forcebyte/terraria-tmodloader-server-arm/video

## Overview

This repository packages and operates a persistent Terraria tModLoader 1.4.4 dedicated server, with an ARM64-compatible container runtime. The main workflow is to launch the container, configure or select a world, and serve Terraria clients while retaining worlds, mods, and configuration on mounted storage. Separate capabilities cover automatic and interactive world creation, mod installation/enabling, and Docker Compose or Kubernetes deployment. The README documents these behaviors; source excerpts were unavailable, so internal script-to-script wiring is not inferred.

Main entry points: [`tModLoader`](https://github.com/forcebyte/terraria-tmodloader-server-arm/tree/main/tModLoader) (tModLoader server), [`tModLoader/Scripts/entrypoint.sh`](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/entrypoint.sh) (Container entrypoint), [`Dockerfile`](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/Dockerfile) (ARM64 server image), [`tModLoader/Scripts/inject`](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/inject) (Console injection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Server runtime"]
  node_tml_image["ARM64 server image"]
  node_entrypoint["Container entrypoint<br/>[entrypoint.sh]"]
  node_server["tModLoader server"]
  node_inject["Console injection"]
  node_config_setup["Config setup<br/>[create-config.sh]"]
  node_version_scripts["Version retrieval"]
  node_terraria_version["Terraria version lookup"]
end

subgraph group_data["Persistent server data"]
  node_config["Server configuration"]
  node_worlds[("World files")]
  node_mods[("Mod configuration")]
  node_install_list["Workshop ID list<br/>[install.txt]"]
  node_enabled_mods["Enabled mods<br/>[enabled.json]"]
end

subgraph group_operations["Deployment and operations"]
  node_compose_example["Compose example"]
  node_k8s_example["Kubernetes deployment"]
end

node_operator(("Server operator"))
node_docker["Docker runtime"]
node_clients(("Terraria clients"))
node_steam_workshop["Steam Workshop"]

node_operator -->|"starts container"| node_docker
node_compose_example -.->|"configures deployment"| node_docker
node_k8s_example -.->|"deploys container"| node_docker
node_docker -->|"runs image"| node_tml_image
node_tml_image -->|"starts"| node_entrypoint
node_entrypoint -->|"launches"| node_server
node_docker -->|"mounts persistent data"| node_worlds
node_docker -->|"mounts persistent data"| node_mods
node_server -->|"reads and writes"| node_worlds
node_server -->|"reads mod settings"| node_mods
node_install_list -->|"identifies mods"| node_steam_workshop
node_server -.->|"obtains mods"| node_steam_workshop
node_operator -->|"configures server"| node_config_setup
node_config_setup -->|"prepares configuration"| node_config
node_config -->|"configures"| node_server
node_operator -->|"issues commands"| node_inject
node_inject -->|"sends console input"| node_server
node_clients -->|"connects to"| node_server
node_entrypoint -.->|"retrieves version"| node_version_scripts
node_version_scripts -.->|"checks version"| node_terraria_version

click node_tml_image "https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/Dockerfile"
click node_entrypoint "https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/entrypoint.sh"
click node_server "https://github.com/forcebyte/terraria-tmodloader-server-arm/tree/main/tModLoader"
click node_inject "https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/inject"
click node_config "https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/serverconfig-example.txt"
click node_config_setup "https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/create-config.sh"
click node_worlds "https://github.com/forcebyte/terraria-tmodloader-server-arm/tree/main/tModLoader/Worlds"
click node_mods "https://github.com/forcebyte/terraria-tmodloader-server-arm/tree/main/tModLoader/Mods"
click node_install_list "https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Mods/install.txt"
click node_enabled_mods "https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Mods/enabled.json"
click node_compose_example "https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/examples/docker-compose/docker-compose-example.yml"
click node_k8s_example "https://github.com/forcebyte/terraria-tmodloader-server-arm/tree/main/examples/kubernetes/terraria-calamity"
click node_version_scripts "https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/get-tmodloader-144.sh"
click node_terraria_version "https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/get-terraria-version.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_tml_image,node_entrypoint,node_server,node_inject,node_config_setup,node_version_scripts,node_terraria_version,node_clients toneBlue
class node_config,node_worlds,node_mods,node_install_list,node_enabled_mods toneAmber
class node_compose_example,node_k8s_example,node_operator toneMint
class node_docker,node_steam_workshop toneIndigo
```

## Components

### Server runtime

- [ARM64 server image](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/Dockerfile): `Dockerfile`
- [Container entrypoint](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/entrypoint.sh): `tModLoader/Scripts/entrypoint.sh`
- [tModLoader server](https://github.com/forcebyte/terraria-tmodloader-server-arm/tree/main/tModLoader): `tModLoader`
- [Console injection](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/inject): `tModLoader/Scripts/inject`
- [Config setup](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/create-config.sh): `tModLoader/Scripts/create-config.sh`
- [Version retrieval](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/get-tmodloader-144.sh): `tModLoader/Scripts/get-tmodloader-144.sh`
- [Terraria version lookup](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Scripts/get-terraria-version.sh): `tModLoader/Scripts/get-terraria-version.sh`

### Persistent server data

- [Server configuration](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/serverconfig-example.txt): `tModLoader/serverconfig-example.txt`
- [World files](https://github.com/forcebyte/terraria-tmodloader-server-arm/tree/main/tModLoader/Worlds): `tModLoader/Worlds`
- [Mod configuration](https://github.com/forcebyte/terraria-tmodloader-server-arm/tree/main/tModLoader/Mods): `tModLoader/Mods`
- [Workshop ID list](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Mods/install.txt): `tModLoader/Mods/install.txt`
- [Enabled mods](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/tModLoader/Mods/enabled.json): `tModLoader/Mods/enabled.json`

### Deployment and operations

- [Compose example](https://github.com/forcebyte/terraria-tmodloader-server-arm/blob/main/examples/docker-compose/docker-compose-example.yml): `examples/docker-compose/docker-compose-example.yml`
- [Kubernetes deployment](https://github.com/forcebyte/terraria-tmodloader-server-arm/tree/main/examples/kubernetes/terraria-calamity): `examples/kubernetes/terraria-calamity`

### Other components

- **Server operator**
- **Docker runtime**
- **Terraria clients**
- **Steam Workshop**

## Connections

- Server operator → Docker runtime: starts container
- Compose example → Docker runtime: configures deployment
- Kubernetes deployment → Docker runtime: deploys container
- Docker runtime → ARM64 server image: runs image
- ARM64 server image → Container entrypoint: starts
- Container entrypoint → tModLoader server: launches
- Docker runtime → World files: mounts persistent data
- Docker runtime → Mod configuration: mounts persistent data
- tModLoader server → World files: reads and writes
- tModLoader server → Mod configuration: reads mod settings
- Workshop ID list → Steam Workshop: identifies mods
- tModLoader server → Steam Workshop: obtains mods
- Server operator → Config setup: configures server
- Config setup → Server configuration: prepares configuration
- Server configuration → tModLoader server: configures
- Server operator → Console injection: issues commands
- Console injection → tModLoader server: sends console input
- Terraria clients → tModLoader server: connects to
- Container entrypoint → Version retrieval: retrieves version
- Version retrieval → Terraria version lookup: checks version
