Skip to content

Latest commit

 

History

3,977 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dragons Dogma Online - Server

badge

Server Emulator for the Game Dragons Dogma Online.



Disclaimer

The project is intended for educational purpose only.

Quick Start

Developer Setup

  1. Clone: git clone https://github.com/sebastian-heinz/Arrowgene.DragonsDogmaOnline.git

  2. Install .NET 10.0 SDK or later

  3. Open the project in your IDE of choice:

    1. Visual Studio — Open DragonsDogmaOnline.sln (minimum Visual Studio 2022)

    2. VS Code — Install the C# plugin, then open the project folder

    3. IntelliJ Rider — Open DragonsDogmaOnline.sln (minimum Rider 2021.3)

  4. Run the Ddon.Cli project with arguments server start

User Setup

  1. Clone: git clone https://github.com/sebastian-heinz/Arrowgene.DragonsDogmaOnline.git

  2. Install .NET 10.0 SDK or later

  3. Run publish.cmd (Windows) or publish.sh (Linux/macOS) to build

  4. Launch with StartServer.cmd from the publish output directory

  5. See the FAQ for common questions

Note
When updating from a previous build, ensure db.sqlite is in publish/win-x64-#.#.#.#/Server/Files/Database and run MigrateDatabase.cmd if needed.

Architecture

The server consists of four components, all started automatically with the default configuration:

Web Server

HTTP/download on port 52099

Login Server

TCP on port 52100

Game Server

TCP on port 52000

Database

SQLite (file or in-memory) or PostgreSQL

Persistence

  • SQLite via System.Data.SQLite — file-based or in-memory with auto-backup on start/close. Best for development.

  • PostgreSQL via Npgsql — recommended for production and parallel write operations.

Sample configurations, schemas, and containerization setups are provided for both.

Container Setup

A Dockerfile builds & publishes the server from source. Docker Compose files:

  • docker-compose up — SQLite (config)

  • docker-compose -f docker-compose.psql.yml up — PostgreSQL (config)

Useful commands
docker-compose up --build                    # force rebuild
docker-compose down -v                       # clean up with volumes
RUNTIME=linux-arm64 docker-compose build     # build for arm64

Client

Launch the client with:

"DDO.exe" "addr=localhost port=52100 token=00000000000000000000 DL=http://127.0.0.1:52099/win/ LVer=03.04.003.20181115.0 RVer=3040008"

Server Settings Reference

Configuration properties defined in ServerSetting.cs. These control server identity, networking, and diagnostic logging.

Purpose Description Use Case / Example

Id

Unique server identifier (int)

Distinguishes server instances. Defaults to -1 (invalid). Set to a positive integer when registering the server, e.g. 1 for a primary game server.

Name

Human-readable server name

Displayed in server lists or logs. For example "Lestania-01" to label a game world instance.

ListenIpAddress

IP address the server binds to

Defaults to IPAddress.Any (all interfaces). Set to a specific IP like 192.168.1.100 to restrict which network interface accepts connections.

ServerPort

TCP port the server listens on

Defaults to 52100. Change to avoid port conflicts or run multiple instances, e.g. 52101 for a second login server.

LogLevel

Verbosity of log output (int)

0 = default. Increase for more verbose output during development and debugging.

LogUnknownPackets

Log packets with no registered handler

Defaults to true. Useful for reverse engineering new packet types. Disable in production to reduce log noise.

LogOutgoingPackets

Log headers of sent packets

Defaults to true. Helps trace server responses. Disable for performance in high-traffic environments.

LogOutgoingPacketPayload

Log full payload of sent packets

Defaults to false. Enable to inspect exact bytes sent to clients, e.g. when debugging malformed response data.

LogOutgoingPacketStructure

Log structured breakdown of sent packets

Defaults to false. Enable to see field-by-field decoded output of outgoing packets during protocol development.

LogIncomingPackets

Log headers of received packets

Defaults to true. Helps trace client requests. Disable in production to reduce log volume.

LogIncomingPacketPayload

Log full payload of received packets

Defaults to false. Enable to inspect raw bytes from clients, e.g. when reverse engineering a new client action.

LogIncomingPacketStructure

Log structured breakdown of received packets

Defaults to false. Enable to see decoded fields of incoming packets, useful for verifying parser correctness.

ConsumerQueueCapacityPerLane

Max queued items per consumer lane

Defaults to 100000. Increase if the server handles high throughput and packets are being dropped due to queue saturation.

TcpServerSettings

Low-level TCP socket configuration (Link to Configuration)

Wraps Arrowgene.Networking.SAEAServer.TcpServerSettings. Tune buffer sizes, backlog, and socket options for production deployments.

Table 1. Suggested settings for DDON:
Setting Value Note

TcpServerSettings.OrderingLaneCount

1

Must remain at 1 as the DDON server is single-threaded and not threadsafe

TcpServerSettings.MaxQueuedSendBytes

8388608

Maximum bytes (~8 MB) that can be buffered for sending before back-pressure is applied

ConsumerQueueCapacityPerLane

100000

Maximum number of events that can be queued per lane before networking stalls

Progress

See the wiki.

Guidelines

Git Workflow

Work via feature branches:

  1. Create feature/feature-name or fix/bug-fix-name from master

  2. Push changes to that branch

  3. Create a Pull Request into master

Best Practices

  • Use the project logger — not Console.WriteLine

  • Own the code: extract solutions, discard libraries

  • Annotate with documentation comments

Naming Conventions

Object Notation Char Mask Underscores

Class

PascalCase

[A-z][0-9]

No

Constructor

PascalCase

[A-z][0-9]

No

Method

PascalCase

[A-z][0-9]

No

Method arguments

camelCase

[A-z][0-9]

No

Local variables

camelCase

[A-z][0-9]

No

Constants

PascalCase

[A-z][0-9]

No

Fields

_camelCase

[A-z][0-9]

Yes

Properties

PascalCase

[A-z][0-9]

No

Delegates

PascalCase

[A-z]

No

Enum types

PascalCase

[A-z]

No

Attribution

Contributors

  • Nothilvien @sebastian-heinz — Reverse Engineering & Server Code

  • Ando — Reverse Engineering & Tooling (Session Splitter, Camellia Key Cracker)

  • David — Reverse Engineering (unpacking PC Executable, defeating Anti Debug and CRC checks)

  • The White Dragon Temple

Libraries

About

Server for Dragons Dogma Online

Topics

Resources

Stars

232 stars

Watchers

21 watching

Forks

Releases

Packages

Used by

Contributors

Languages