Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

DarkflameServer

> 编程语言
Open source

The main repository for the Darkflame Universe Server Emulator project.

747 stars0 likes0 views
WebsiteGitHub

About

The main repository for the Darkflame Universe Server Emulator project.

Darkflame Universe

Introduction

Darkflame Universe (DLU) is a server emulator for LEGO® Universe. Development started in 2013 and has gone through multiple iterations and is now able to present a near perfect emulation of the game server.

LEGO® Universe

Developed by NetDevil and The LEGO Group, LEGO® Universe launched in October 2010 and ceased operation in January 2012.

License

Darkflame Universe is licensed under AGPLv3, please read LICENSE. Some important points:

  • We are not liable for anything you do with the code
  • The code comes without any warranty what so ever
  • You must disclose any changes you make to the code when you distribute it
  • Hosting a server for others counts as distribution

Hosting a server

We do not recommend hosting public servers. Darkflame Universe is intended for small scale deployment, for example within a group of friends. It has not been tested for large scale deployment which comes with additional security risks.

Supply of resource files

Darkflame Universe is a server emulator and does not distribute any LEGO® Universe files. A separate game client is required to setup this server emulator and play the game, which we cannot supply. Users are strongly suggested to refer to the safe checksums listed here to see if a client will work.

Setting up a single player server

  • If you don't know what WSL is, skip this warning. Warning: WSL version 1 does NOT support using sqlite as a database due to how it handles filesystem synchronization. You must use Version 2 if you must run the server under WSL. Not doing so will result in save data loss.
  • Single player installs now no longer require building the server from source or installing development tools.
  • Download the latest windows release (or whichever release you need) and extract the files into a folder inside your client. Note that this setup is expecting that when double clicking the folder that you put in the same folder as legouniverse.exe, the file MasterServer.exe is in there.
  • You should be able to see the folder with the server files in the same folder as legouniverse.exe.
  • Go into the server files folder and open sharedconfig.ini. Find the line that says client_location and put .. after it so the line reads client_location=...
  • To run the server, double-click MasterServer.exe.
  • You will be asked to create an account the first time you run the server. After you have created the account, the server will shutdown and need to be restarted.
  • To connect to the server, either delete the file boot.cfg which is found in your LEGO Universe client, rename the file boot.cfg to something else or follow the steps here if you wish to keep the file.
  • When shutting down the server, it is highly recommended to click the MasterServer.exe window and hold ctrl while pressing c to stop the server.
  • We are working on a way to make it so when you close the game, the server stops automatically alongside when you open the game, the server starts automatically.
  • If you are not setting a server up on mac, you can ignore this note
  • Note: you'll need to allow through System Preferences AuthServer, ChatServer, MasterServer, WorldServer and libmariadbcpp.dylib to run. The initial pop-up will block it due to the binaries being unsigned, after allowing them to run the servers will run as normal.

If you are not planning on hosting a server for others, working in the codebase or wanting to use MariaDB for a database, you can stop reading here.

If you would like to use a MariaDB as a database instead of the default of sqlite, follow the steps here.

Steps to setup a development environment

  • Clone this repository
  • Setting up a development environment
  • Install dependencies
  • Database setup
  • Build the server
  • Configuring your server
    • Required Configuration
    • Optional Configuration
  • Verify your setup
  • Running the server
  • User Guide
  • Docker

Disclaimers

Setup difficulty

Throughout the entire build and setup process a level of familiarity with the command line and preferably a Unix-like development environment is greatly advantageous.

Step by step walkthrough for building a single-player Windows server from source

If you would like a setup for a single player server only on a Windows machine built from source, use the Native Windows Setup Guide by HailStorm and skip this README.

Clone the repository

If you are on Windows, you will need to download and install git from here

Then run the following command

bash
git clone --recursive https://github.com/DarkflameUniverse/DarkflameServer

Install dependencies

Required compiler versions

  • g++11 or greater
  • MSVC unchecked
  • clang unchecked
  • appleclang unchecked

Windows packages

Ensure that you have either the MSVC C++ compiler (recommended) or the Clang compiler installed. You'll also need to download and install CMake (version 3.25 up to version 3.31!).

MacOS packages

Ensure you have brew installed. You will need to install the following packages

bash
brew install cmake gcc mariadb openssl zlib

Linux packages

Make sure packages like gcc, and zlib are installed. Depending on the distribution, these packages might already be installed. Note that on systems like Ubuntu, you will need the zlib1g-dev package so that the header files are available. libssl-dev will also be required as well as openssl. You will also need a MySQL database solution to use. We recommend using mariadb-server.

For Ubuntu, you would run the following commands. On other systems, the package install command will differ.

bash
sudo apt update && sudo apt upgrade

# Install packages
sudo apt install build-essential gcc zlib1g-dev libssl-dev openssl mariadb-server cmake

Required CMake version

This project uses CMake version 3.25 up to version 3.31 and as such you will need to ensure you have this version installed. You can check your CMake version by using the following command in a terminal.

bash
cmake --version

If you are going to be using an Ubuntu environment to run the server, you may need to get a more recent version of cmake than the packages available may provide.

The general approach to do so would be to obtain a copy of the signing key and then add the CMake repository to your apt. You can do so with the following commands.

Source of the below commands

…

Database setup

First you'll need to start MariaDB.

For Windows the service is always running by default.

For MacOS, run the following command

bash
brew services start mariadb

For Linux, run the following command

bash
sudo systemctl start mysql
# If systemctl is not a known command on your distribution, try the following instead
sudo service mysql start

You will need to run this command every time you restart your environment

If you are using Linux and systemctl and want the MariaDB instance to start on startup, run the following command

bash
sudo systemctl enable --now mysql

Once MariaDB is started, you'll need to create a user and an empty database for Darkflame Universe to use.

First, login to the MariaDB instance.

To do this on Ubuntu/Linux, MacOS, or another Unix like operating system, run the following command in a terminal

bash
# Logs you into the MariaDB instance as root
sudo mysql

For Windows, run the following command in the Command Prompt (MariaDB xx.xx) terminal

bash
# Logs you into the mysql instance
mysql -u root -p
# You will then be prompted for the password you set for root during installation of MariaDB

Now that you are logged in, run the following commands.

bash
# Creates a user for this computer which uses a password and grant said user all privileges.
# Change mydarkflameuser to a custom username and password to a custom password. 
CREATE USER 'mydarkflameuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON *.* TO 'mydarkflameuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;

# Then create a database for Darkflame Universe to use.
CREATE DATABASE darkflame;

Build the server

You can either run build.sh when in the root folder of the repository:

bash
./build.sh

Or manually run the commands used in build.sh.

If you would like to build the server faster, append -j where number is the number of simultaneous compile jobs to run at once. It is recommended that you have this number always be 1 less than your core count to prevent slowdowns. The command would look like this if you would build with 4 jobs at once:

bash
./build.sh -j4

Notes

Depending on your operating system, you may need to adjust some pre-processor defines in CMakeVariables.txt before building:

  • If you are on MacOS, ensure OPENSSL_ROOT_DIR is pointing to the openssl root directory.
  • By default it should be set to the correct directory.
  • If you are using a Darkflame Universe client, ensure client_net_version in build/sharedconfig.ini is changed to 171023.

Configuring your server

This server has a few steps that need to be taken to configure the server for your use case.

Required Configuration

Darkflame Universe can run with either a packed or an unpacked client. Navigate to build/sharedconfig.ini and fill in the following fields:

  • mysql_host (This is the IP address or hostname of your MariaDB server. This is highly likely localhost)
    • If you setup your MariaDB instance on a port other than 3306, which can be done on a Windows install, you will need to make this value tcp://localhost:portNum where portNum is replaced with the port you chose to run MariaDB on.
  • mysql_database (This is the database you created for the server)
  • mysql_username (This is the user you created for the server)
  • mysql_password (This is the password for the user you created for the server)
  • client_location (This is the location of the client files. This should be the folder path of a packed or unpacked client)
    • Ideally the path to the client should not contain any spaces.

Optional Configuration

  • After the server has been built there should be five ini files in the build directory: sharedconfig.ini, authconfig.ini, chatconfig.ini, masterconfig.ini, and worldconfig.ini.
  • authconfig.ini contains an option to enable or disable play keys on your server. Do not change the default port for auth.
  • chatconfig.ini contains a port option.
  • masterconfig.ini contains options related to permissions you want to run your servers with.
  • sharedconfig.ini contains several options that are shared across all servers
  • worldconfig.ini contains several options to turn on Quality of Life improvements should you want them. If you would like the most vanilla experience possible, you will need to turn some of these settings off.

Verify your setup

Your build directory should contain at a minimum all of the following files. All listed files are required for a server to start. ini files can be located at the environment variable DLU_CONFIG_DIR and do not need to be located in this directory.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++emulatorgamemmonetworking

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言