# OpenTTD JGRPP Docker Server This setup builds OpenTTD with the JGR Patch Pack (JGRPP) from source and runs it in a Docker container. ## Getting Started 1. **Build and start the server:** ```bash docker-compose up -d --build ``` 2. **Accessing the console:** ```bash docker exec -it openttd-jgrpp openttd -D ``` (Actually, the server runs in dedicated mode. You can view logs with:) ```bash docker-compose logs -f ``` 3. **Configuration:** The configuration is stored in `config/openttd.cfg`. The default password is set to `asd`. 4. **Save Games:** Save games are stored in `config/save/`. ## AdminBridge GameScript `config/` is gitignored (it holds savegames, downloaded content and generated config), so the AdminBridge GameScript — the server-side half of the Python client's admin GameScript channel — is kept in [gamescript/AdminBridge/](../gamescript/AdminBridge/README.md) instead and bind-mounted read-only over the container's `game/AdminBridge` by `docker-compose.yml`. Nothing to install: `docker-compose up` serves the tracked copy. Edit it there, not under `config/game/`, which the mount shadows. A GameScript is loaded at game start, so restart the server to pick up a change. Running the server outside this compose file? Copy the directory in by hand instead: ```bash cp -r ../gamescript/AdminBridge ~/.local/share/openttd/game/ ``` ## JGRPP Source The source code is cloned from the `jgrpp` branch of `https://github.com/JGRennison/OpenTTD-patches` (currently at tag `jgrpp-0.71.1`) and carries local patches from `patches/` — see [patches/README.md](patches/README.md). After a fresh clone of the source, apply them with `git -C OpenTTD-patches am ../patches/*.patch` before building. To update the server to a newer JGRPP version: 1. Update the `OpenTTD-patches` directory: ```bash cd OpenTTD-patches && git pull && cd .. ``` 2. Reapply (rebase if needed) the local patches from `patches/`. 3. Rebuild the image: ```bash docker-compose up -d --build ```