All apps · 0 apps
ageLANServer-BattleServer
Docker app from indyone's Repository
Overview
Readme
View on GitHub
ageLANServer-BattleServer
ageLANServer is a LAN server emulator for the Age of Empires Definitive Edition games, developed by luskaner. It replaces the online services (accounts, profiles and the lobby list) with a server running on your Unraid box, so you can play multiplayer over your local network without an internet connection. The game on each PC connects to it with a launcher.
A BattleServer is the program that runs a match while it is played. BattleServer.exe ships with
the game and relays the game traffic between the players. Normally the host's own PC runs it; with a
BattleServer on the server, matches do not depend on one player's PC. Age of Empires IV and Age of
Mythology: Retold only work this way.
This template is the same as ageLANServer plus a BattleServer running
inside the same container. It includes Wine to run the Windows BattleServer.exe, so the download is
about 1.3 GB. For the original three games alone, ageLANServer is enough.
Template: templates/ageLANServer-BattleServer.xml
Image: ghcr.io/indyone/agelanserver-battleserver
Upstream: luskaner/ageLANServer
Supported games
Age of Empires: Definitive Edition
Age of Empires II: Definitive Edition
Age of Empires III: Definitive Edition
Age of Empires IV: Anniversary Edition (requires a BattleServer)
Age of Mythology: Retold (requires a BattleServer)
Configuring the Unraid template
Settings
| Setting | Container path / variable | Default | Purpose |
|---|---|---|---|
| Game | GAMES |
age2 |
The game this container serves (see below). |
| Certificates Path | /app/resources/certificates |
/mnt/user/appdata/agelanserver-battleserver/certificates |
SSL certificates, generated on first run. Keep it so they survive restarts. |
| Config Path | /app/resources/config |
/mnt/user/appdata/agelanserver-battleserver/config |
Server configuration (see config.toml). |
| BattleServer Folder | /app/battleserver |
/mnt/user/appdata/agelanserver-battleserver/battleserver |
Folder with BattleServer.exe (see below). |
| Logs Path | /app/logs |
/mnt/user/appdata/agelanserver-battleserver/logs |
Server and BattleServer logs. Add --log to Post Arguments for detailed server logging. |
Each container runs one game. Set GAMES to one of:
GAMES value |
Game |
|---|---|
age1 |
Age of Empires: Definitive Edition |
age2 (default) |
Age of Empires II: Definitive Edition |
age3 |
Age of Empires III: Definitive Edition |
age4 |
Age of Empires IV: Anniversary Edition |
athens |
Age of Mythology: Retold |
The template uses host networking. Port 443 and TCP ports 27012, 27112 and 27212 (the
BattleServer) must be free on the host. If the BattleServer stops, the container stops, so its
restart policy brings both back.
Providing BattleServer.exe
BattleServer.exe ships with the game and cannot be redistributed. Copy it from your own install
into the BattleServer Folder; it starts automatically with the container. Use the one from the
game the container serves, except for two games:
- Age of Empires IV does not ship a
BattleServer.exe. - Age of Mythology: Retold ships one that is buggy.
For both, use the BattleServer.exe from Age of Empires II: DE, the newer version. Do not also add a
BattleServer for the same game in config.toml.
config.toml
On the first start the config folder is filled with the per-game folders (do not delete them) and a
fully commented config.toml.example. Rename it to config.toml, edit it, and restart the container.
Multiple games
Each container serves one game, so for several games run one container per game:
- With host networking only one container can use port
443and the BattleServer ports, so create an ipvlan L2 network (Settings > Docker > Docker custom networks) and give each container its own LAN IP. ipvlan is preferred over macvlan because it does not need promiscuous mode. - Use separate appdata folders for each container, for example
.../appdata/agelanserver-battleserver-aoe4/.... - Name each container after its game:
agelanserver-battleserver-aoe4,agelanserver-battleserver-aoe2, ...
Playing the game
Hosting a game
When you create a lobby:
- Choose Server in the game's Server list to use the BattleServer in this container.
- Alternatively, choose Use Local Lan Server to run the match on your own PC.
Connecting from your PC
Use the launcher from the
upstream releases. In resources/config.toml set:
[Server]
Start = 'false'
Host = '<your server IP>'
Then run the game's start script (for example start_age2.bat) as administrator. The launcher
points the game at your server and undoes its changes when you quit.
Troubleshooting
- Multiplayer is greyed out. The server's data is for the newest game build. Update the game (check it is the copy the launcher starts).
- "Could not create game. Unknown error". Choose Server (or Use Local Lan Server) when creating the lobby.
- The container stops right after starting. For
age4andathensthe BattleServer Folder must containBattleServer.exe. Open the container's log. - The container keeps restarting. Open the container's log. Port
443and the BattleServer ports must be free on the host.
About the image
ageLANServer is developed by luskaner. The Docker image comes from my fork, indyone/ageLANServer:
- Kept in sync with upstream. A GitHub Actions workflow merges
luskaner/ageLANServerinto the fork every day, and every change to the source rebuilds the images and publishes them to the GitHub Container Registry. - The server itself is untouched. The fork only adds files: a Docker setup under
tools/server-docker-unifiedand the build workflows.
What the fork adds so that it works well on Unraid:
- One image instead of two. Upstream's Docker setup runs the certificate generator and the server as separate containers. Here they are combined: the SSL certificates are generated on the first start and reused afterwards.
- Volumes that work with Unraid shares. Per-game config files and a commented
config.toml.exampleare placed into the config folder on first run, so a bind-mounted appdata folder works from the start. - One game per container, chosen with the
GAMESvariable, so several games never fight over port443or the UDP discovery port. - An optional BattleServer, in this image, which runs the game's own
BattleServer.exeunder Wine next to the server. The ageLANServer template uses the image without it. - The Unraid templates in this repository.
Support
- Unraid setup (this template, the Docker image, volumes, networking, installing on Unraid): open an issue here.
- The server software itself (game behaviour, launcher, bugs, feature requests): supported by its original author, luskaner/ageLANServer issues.
Requirements
BattleServer.exe from your own game install (see the BattleServer Folder setting). Required for age4 and athens.
Port 443 and TCP ports 27012, 27112 and 27212 must be free on the host IP used by this container.
For a single game: host networking is the simplest option (the ports must be free on the host).
For multiple games: create an ipvlan L2 custom network (Settings > Docker > Docker custom networks)
and assign each container a unique LAN IP — this avoids the port conflicts that occur when multiple
containers share the same host network stack. ipvlan is preferred over macvlan as it does not require
promiscuous mode on the host NIC.
Categories
Related apps
Explore more like this
Explore allDetails
ghcr.io/indyone/agelanserver-battleserver:latestRuntime arguments
- Network
host- Shell
sh- Privileged
- false
- Extra Params
--restart=unless-stopped
Template configuration
Persistent storage for the server's SSL certificates. Generated automatically on first run; keep this mounted so the certificates survive restarts and clients keep trusting the server.
- Target
- /app/resources/certificates
- Default
- /mnt/user/appdata/agelanserver-battleserver/certificates
- Value
- /mnt/user/appdata/agelanserver-battleserver/certificates
Server configuration. On first run the per-game folders (do not delete them) and a fully commented config.toml.example are placed here. Rename the example to config.toml and edit it to change authentication, announce settings, etc. Restart the container after editing.
- Target
- /app/resources/config
- Default
- /mnt/user/appdata/agelanserver-battleserver/config
- Value
- /mnt/user/appdata/agelanserver-battleserver/config
Folder containing BattleServer.exe from your game install, from the game this container serves (AoE IV ships none and AoM's is buggy: for age4 and athens use the one from AoE II: DE). It is started automatically inside the container. Required for age4 and athens; for the other games an empty folder runs without a BattleServer.
- Target
- /app/battleserver
- Default
- /mnt/user/appdata/agelanserver-battleserver/battleserver
- Value
- /mnt/user/appdata/agelanserver-battleserver/battleserver
Server and BattleServer log files. Detailed server file logging is off by default; add --log to Post Arguments (Advanced View) to enable it.
- Target
- /app/logs
- Default
- /mnt/user/appdata/agelanserver-battleserver/logs
- Value
- /mnt/user/appdata/agelanserver-battleserver/logs
The single game this container serves: age2 (AoE II: DE), age1 (AoE: DE), age3 (AoE III: DE), age4 (AoE IV) or athens (AoM: Retold). age4 and athens will not start without BattleServer.exe in the BattleServer Folder. To serve another game, run a second container with its own IP (ipvlan network) and its own appdata folders.
- Target
- GAMES
- Default
- age2|age1|age3|age4|athens
- Value
- age2