Skip to content
SerratedSharp edited this page Jan 11, 2025 · 18 revisions

This guide assumes that you're familiar with Docker its concepts and its usage.

For your convenience, we have in our repo a simple docker-compose.yml to make use of our docker container build.

This documentation covers the minimal basics of running ACE in Docker on any Docker compatible platform. Much more detailed step-by-step instructions are available in the ACE Hosting on Raspberry Pi instructions. While some of these instructions are specific to the Raspberry Pi platform, many will be applicable to most Docker hosts.

Server Setup

Download the following files. For Github hosted code files, you can use the first link in a browser to access the interactive code browser and then click the Download button. If using a command line such as wget, use the raw.githubusercontent.com link to directly retrieve the file.

Your resulting directory structure should look like this:

/docker-compose.yml
/docker.env
/Dats/client_cell_1.dat
/Dats/client_local_English.dat
/Dats/client_portal.dat

Note: It's assumed you have some form of Docker already setup. For private hosting, you could use Docker Desktop to run locally. ACE Hosting on Raspberry Pi contains additional details specifically to setting up docker on that platform.

Start ACE

Use a tool of your choice to run compose up on docker-compose.yml:

docker compose up -d

Monitor container output terminal, particularly for ace-server. It can take a couple minutes to initialize everything for the first time. The ace-server container will wait for mysql to fully start before it attempts to run. Thus, it may appear only ace-db container is started while mysql is still initializing internally, before ace-server even tries to start.

If *.dat files aren't located/accessible, then an error in the output will indicate this. As of writing, you will see the following output whenever the server is fully started successfully and ready:

ACEmulator command prompt ready.

Type "acecommands" for help.

ACE >> 
INFO : Registering ModManager commands...
INFO : No mods to display.

Note: A number of additional directories will be created automatically by docker-compose.yml's volumes: mapping in the same directory where docker-compose.yml resides. These are mapped to a folder internal to the ace-server, which provides an easy mechanism to copy content from the docker host into the container, and additionally ensures this content is preserved if the container is deleted.

To access the ACE console

docker container attach --sig-proxy=false ace-server

To access the docker compose logs

docker compose logs -f

Restart ACE

docker compose restart

Stop ACE

From an attached ace-server prompt (see To access the ACE console), run the ACE console command:

/shutdown

This ensures all DB updates are flushed and the world is closed.

Then you can exit the ACE console and return to the docker host and stop the container normally:

docker compose down

Update ACE to latest released master

docker compose down
docker compose pull
docker compose up -d

Troubleshooting

Error failed to read dockerfile: open Dockerfile: no such file or directory

This can occur when starting the container in some tools, such as the VSCode Docker extension, which automatically generates a --build parameter for the Compose Up option. The docker-compose.yml includes the following:

  ace-server:
    build: .
    image: acemulator/ace:latest

Solution: Comment out build: . in the docker-compose.yaml, save the file, then attempt to start the container again normally with docker compose up -d:

  ace-server:
    # build: .
    image: acemulator/ace:latest

Explanation:

Rather then build from source, the image: reference is already sufficient to pull the pre-built image of the server. The build: . parameter assumes the file https://github.com/ACEmulator/ACE/blob/master/Dockerfile is present in the current directory. Typically for server hosting you would not have a Dockerfile file present, as you only copy docker-compose.yaml, docker.env, and Dat files. Typically only emulator developers building the ACE server from source code need the build: parameter with the Dockerfile. Therefore the solution is to comment out this parameter and rely only on the prebuilt image: reference.