Run an OpenDAOC Game Server

Does anyone remember this game? I absolutely use to love this game and still do, and I recently had the weird idea to set-up my own server and though that maybe I could find some source code online to run, and boom, I came across this mod of the famous 2001 Mythic game. It is called OpenDAOC thanks to the instructions it is actually really easy to spin your own server up, so let’s do it.

First thing we want to do is to have the correct Operating server, in my case I have used Ubuntu 22, so get a virtual machine with it or a spare machine connected to your LAN. Then, we are going to install docker and docker compose on it, there are plenty of resources online to do it and its a matter of copy paste. Follow steps here: https://docs.docker.com/compose/install/

The process now starts, go to the folder of your choice in my case

cd ~
mkdir daoc
cd daoc

Once in there create a file docker compose like so

vim docker-compose.yml

and copy paste the code at https://www.opendaoc.com/docs/core/docker-setup/ but we are going to add a port mapping to the database, so we can access the database from the docker host, our physical machine, via our mysql client. Why? I’ll tell you in a bit. (see below in bold).

networks:
  opendaoc-network:
    driver: bridge

volumes:
  opendaoc-db-data:
  base-db:

services:
  db:
    image: mariadb:10.6
    container_name: opendaoc-db
    stdin_open: true
    tty: true
    command: --default-authentication-plugin=mysql_native_password --lower_case_table_names=1 --character-set-server=utf8mb3 --collation-server=utf8mb3_general_ci --innodb_large_prefix=1 --innodb_file_format=Barracuda --innodb_file_per_table=1
    restart: always
    environment:
      MYSQL_DATABASE: opendaoc
      MYSQL_ROOT_PASSWORD: my-secret-pw
    volumes:
      - opendaoc-db-data:/var/lib/mysql
      - base-db:/docker-entrypoint-initdb.d
    networks:
      - opendaoc-network
    ports:
      - "3306:3306"

  gameserver:
    image: ghcr.io/opendaoc/opendaoc-core:latest
    container_name: opendaoc-server
    stdin_open: true
    tty: true
    ports:
      - "10300:10300"
      - "10400:10400"
    depends_on:
      - db
    environment:
      UID: "1000"
      GID: "1000"
      AUTO_ACCOUNT_CREATION: "True"
      CHEAT_LOGGER_NAME: "cheats"
      CPU_USE: "8"
      DB_AUTOSAVE: "True"
      DB_AUTOSAVE_INTERVAL: "10"
      DB_CONNECTION_STRING: "server=db;port=3306;database=opendaoc;userid=root;password=my-secret-pw;treattinyasboolean=true"
      DB_TYPE: "MYSQL"
      DETECT_REGION_IP: "True"
      ENABLE_COMPILATION: "True"
      ENABLE_UPNP: "False"
      GAME_TYPE: "Normal"
      GM_ACTION_LOGGER_NAME: "gmactions"
      INVALID_NAMES_FILE: "./config/invalidnames.txt"
      LOG_CONFIG_FILE: "./config/logconfig.xml"
      REGION_IP: "0.0.0.0"
      REGION_PORT: "10400"
      SCRIPT_ASSEMBLIES: ""
      SCRIPT_COMPILATION_TARGET: "./lib/GameServerScripts.dll"
      SERVER_IP: "0.0.0.0"
      SERVER_NAME: "OpenDAoC"
      SERVER_NAME_SHORT: "OPENDAOC"
      SERVER_PORT: "10300"
      UDP_IP: "0.0.0.0"
      UDP_PORT: "10400"
      DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: "False"
    volumes:
      - base-db:/tmp/opendaoc-db
    networks:
      - opendaoc-network

Cool, so now inside the ~/daoc folder just type

docker compose up -d

This is going to immediately pull the correct prepackaged image from the db service and same for the game server. As you can see both of the containers are on the same network “opendaoc-network” and as such can reach each other, which is what we want. So in a nutshell we have nothing to do.

guillaume@upper:~$ docker ps
CONTAINER ID   IMAGE                                   COMMAND                  CREATED       STATUS       PORTS                                                                                              NAMES
48f408225c78   ghcr.io/opendaoc/opendaoc-core:latest   "/bin/sh /app/entryp…"   8 hours ago   Up 8 hours   0.0.0.0:10300->10300/tcp, [::]:10300->10300/tcp, 0.0.0.0:10400->10400/tcp, [::]:10400->10400/tcp   opendaoc-server
dae8f104ae3b   mariadb:10.6                            "docker-entrypoint.s…"   8 hours ago   Up 8 hours   0.0.0.0:3306->3306/tcp, [::]:3306->3306/tcp                                                        opendaoc-db

Both containers are running, and we could launch the game at this stage by downloading the OpenDAOC client here: https://www.opendaoc.com/docs/client/ but before we do that and we edit the client launch file we need to have a look at the database: it needs to be filled with mobs, quests, drops, weapons, and so in order to have a complete game! Otherwise you’d launch the game with an also empty world.

Download and install mysql client on your machine, typically

sudo apt install mysql-client

then go to https://github.com/OpenDAoC/OpenDAoC-Database and download or git pull the folder. Now it downloaded and you know where you’ve put the downloaded files? good.

Connect to the mysql database, look at the databases available and create a new one in which we are going to apply all the “OpenDAOC-Database”.sql files we’ve just downloaded. Below we are creating dummydaoc.

guillaume@upper:~$ mysql -h 127.0.0.1 -u root -pWelcome1
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.5.5-10.6.21-MariaDB-ubu2004 mariadb.org binary distribution

Copyright (c) 2000, 2025, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| opendaoc           |
| performance_schema |
| sys                |
+--------------------+
6 rows in set (0.00 sec)

mysql> CREATE DATABASE dummydaoc;
Query OK, 1 row affected (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| dummydaoc          |
| information_schema |
| mysql              |
| opendaoc           |
| performance_schema |
| sys                |
+--------------------+
7 rows in set (0.00 sec)

mysql> exit
Bye!

Then, we are going to apply the bunch of .sql files to dummydaoc. Travel to the folder with the sql file, in my case

guillaume@upper:~/daoc/OpenDAoC-Database-master/opendaoc-db-core$ pwd
/home/guillaume/daoc/OpenDAoC-Database-master/opendaoc-db-core
guillaume@upper:~/daoc/OpenDAoC-Database-master/opendaoc-db-core$ ls
ability.sql                          languagegameobject.sql
account.sql                          languagenpc.sql
[...] // I've shortened the output

and type in

for file in *.sql; do
  echo "Applying $file to your_database_name..."
  mysql -u root -p'my-secret-pw' dummydaoc < "$file"
  echo ""
done

Normally all files have been applied to dummydaoc, so you can connect to the database again and verify, you should see a massive list of tables.

guillaume@upper:~$ mysql -h 127.0.0.1 -u root -pWelcome1
mysql> use dummydaoc;
mysql> show tables;

We need to use the correct database for the world to be populated, you remember? We need to relaunch the gameserver service from above with the correct newly created database change, it’s just matter of saying “point to dummydaoc”, instead of “opendaoc”, so go back to the docker compose file and edit it.

networks:
  opendaoc-network:
    driver: bridge

volumes:
  opendaoc-db-data:
  base-db:

services:
  db:
    image: mariadb:10.6
    container_name: opendaoc-db
    stdin_open: true
    tty: true
    command: --default-authentication-plugin=mysql_native_password --lower_case_table_names=1 --character-set-server=utf8mb3 --collation-server=utf8mb3_general_ci --innodb_large_prefix=1 --innodb_file_format=Barracuda --innodb_file_per_table=1
    restart: always
    environment:
      MYSQL_DATABASE: opendaoc
      MYSQL_ROOT_PASSWORD: my-secret-pw
    volumes:
      - opendaoc-db-data:/var/lib/mysql
      - base-db:/docker-entrypoint-initdb.d
    networks:
      - opendaoc-network
    ports:
      - "3306:3306"

  gameserver:
    image: ghcr.io/opendaoc/opendaoc-core:latest
    container_name: opendaoc-server
    stdin_open: true
    tty: true
    ports:
      - "10300:10300"
      - "10400:10400"
    depends_on:
      - db
    environment:
      UID: "1000"
      GID: "1000"
      AUTO_ACCOUNT_CREATION: "True"
      CHEAT_LOGGER_NAME: "cheats"
      CPU_USE: "8"
      DB_AUTOSAVE: "True"
      DB_AUTOSAVE_INTERVAL: "10"
      DB_CONNECTION_STRING: "server=db;port=3306;database=dummydaoc;userid=root;password=my-secret-pw;treattinyasboolean=true"
      DB_TYPE: "MYSQL"
      DETECT_REGION_IP: "True"
      ENABLE_COMPILATION: "True"
      ENABLE_UPNP: "False"
      GAME_TYPE: "Normal"
      GM_ACTION_LOGGER_NAME: "gmactions"
      INVALID_NAMES_FILE: "./config/invalidnames.txt"
      LOG_CONFIG_FILE: "./config/logconfig.xml"
      REGION_IP: "0.0.0.0"
      REGION_PORT: "10400"
      SCRIPT_ASSEMBLIES: ""
      SCRIPT_COMPILATION_TARGET: "./lib/GameServerScripts.dll"
      SERVER_IP: "0.0.0.0"
      SERVER_NAME: "OpenDAoC"
      SERVER_NAME_SHORT: "OPENDAOC"
      SERVER_PORT: "10300"
      UDP_IP: "0.0.0.0"
      UDP_PORT: "10400"
      DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: "False"
    volumes:
      - base-db:/tmp/opendaoc-db
    networks:
      - opendaoc-network

Relaunch the gameserver service

docker-compose rm -f gameserver && docker-compose up -d gameserver

You can verify with docker ps command that you’ve got both container are live, db and gameserver. Now this is done let’s go back to our client. Install the client on a simple path e.g. C:/openDAOC or something you can remember, create a .txt on your Desktop and go to the first line and key in

"E:\OpenDAoC\connect.exe" "E:\OpenDAoC\game1127.dll" yourip Patrick Welcome1

Do not skip the “” but change the path to your game so the script can find the files connect.exe and game1127.dll, at yourip you can either enter either your public IP, your domain or your local IP. Then enter a name which will create an account in the database automatically and the password of your choice, it does not matter, use whatever, but re-use the same credentials in order to find your characters again though.

Save the file and change the extension to .bat, you can now launch the game by double clicking, you are in.

Now, two things, one make sure that the machine, in my case the ubuntu VM, does have its firewall down for ports 10300 and 10400, because if you look at the docker compose file these are the ports used for the application to listen onto incoming connections. If you want your friends to join over the internet your server it needs to be reachable, you need to enable port forwarding on your home router, and state that connections on 10300 and 10400 must be routed to local ip e.g. 192.168.1.74 or your machine name or FQDN “in my case it is upper.home” if you have your dns service working (set up on your router as well), you may have to take a firewall setting down on the router as well.

guillaume@upper:~/daoc$ ip addr | grep 192
    inet 192.168.1.74/24 brd 192.168.1.255 scope global dynamic noprefixroute eno1

Happy gaming.

Leave a Reply

Your email address will not be published. Required fields are marked *