
commitf4311e593f
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 22:16:50 2024 -0600 temp fix for MSVC debug builds commit0e81c69de8
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 21:11:04 2024 -0600 CMakePresets indentation commitd7aa52a0fc
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 21:03:37 2024 -0600 use DLU_CONFIG_DIR envvar commitd1bfe9f15d
Merge:6e781da2
de3fe931
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Nov 16 20:24:05 2024 -0600 Merge branch 'main' into MSVCCompilerFlags commit6e781da2e7
Merge:6ccd72c6
3a6123fe
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 13 18:15:16 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit6ccd72c6a9
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 13 17:48:58 2024 -0500 add RelWithDebInfo presets and move -Werror flag into presets.json commitb96cfd71a4
Merge:c4adcee8
1ee45639
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Apr 9 01:47:17 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commitc4adcee8e8
Merge:7f9fcb5b
28ce8ac5
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 22:30:35 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit7f9fcb5b75
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 22:10:01 2024 -0500 change gnu and clang build directories to enable consistent artifact generation commit553740e8a0
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 21:38:34 2024 -0500 update build presets commit39a8029fda
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:30:06 2024 -0500 update github actions commit7eae64f8a6
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:18:46 2024 -0500 disable /WX on MSVC commit24d3bc0ce6
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:11:59 2024 -0500 altered cmake configuration scripts commit368f4ccabf
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 6 23:00:04 2024 -0500 change defaults commit7d7ea68bf9
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 22:23:32 2024 -0500 fix preset commit57d0b12f9b
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 6 21:50:32 2024 -0500 expand cmake presets commitaa62d357bb
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:50:26 2024 -0500 rename gcc to gnu commitd6e4edd886
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:27:20 2024 -0500 change runtime output dir commitabe413f239
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:22:47 2024 -0500 debug try 2 commitc6c771b892
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:16:00 2024 -0500 add debug messages (again) commit6c6966afd2
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:46:58 2024 -0500 was not actually fixed commitfab74c90b6
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:37:02 2024 -0500 are these messages actually somehow fixing the issue? commita4b6b7c0d9
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:27:34 2024 -0500 see if this re-breaks mac commit07626f8ebb
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:04:59 2024 -0500 back to debug messages commitbdf9adc0e8
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:55 2024 -0500 Revert "try disabling an apple-specific build rule" This reverts commit45ec66e976
. commit8154207848
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:53 2024 -0500 Revert "more fiddling with mac test builds" This reverts commit0f843c02c9
. commit8f5c10d158
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:52 2024 -0500 Revert "try and narrow down the macos build failure cause" This reverts commit5fd86833fa
. commit54876bf886
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:50 2024 -0500 Revert "try stripping out all the custom macos test logic again" This reverts commitcc15a26ce8
. commit8af35727a6
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:48 2024 -0500 Revert "I'm really just throwing everything to the wall and seeing what sticks" This reverts commit1a05b027fe
. commite143f22ada
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:46 2024 -0500 Revert "more macos tinkering" This reverts commit829ec35b57
. commit495e70c376
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:44 2024 -0500 Revert "implib" This reverts commitd41349d6ed
. commit37dbb52104
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:42 2024 -0500 Revert "try manual link directory specification" This reverts commit0c2d40632e
. commitce568189fc
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:40 2024 -0500 Revert "save me" This reverts commitbd73aa21a9
. commitc420a72016
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:36 2024 -0500 Revert "aaaaaaaaa" This reverts commit338279c396
. commitdccac945bb
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:08 2024 -0500 Revert "paths paths paths" This reverts commit9a7d86aa6c
. commit9a7d86aa6c
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:39:08 2024 -0500 paths paths paths commit338279c396
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:29:01 2024 -0500 aaaaaaaaa commitbd73aa21a9
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:21:16 2024 -0500 save me commit0c2d40632e
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:09:03 2024 -0500 try manual link directory specification commitd41349d6ed
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:52:20 2024 -0500 implib commit829ec35b57
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:43:47 2024 -0500 more macos tinkering commit1a05b027fe
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:18:41 2024 -0500 I'm really just throwing everything to the wall and seeing what sticks commitcc15a26ce8
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:09:45 2024 -0500 try stripping out all the custom macos test logic again commit5fd86833fa
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:54:53 2024 -0500 try and narrow down the macos build failure cause commit0f843c02c9
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:47:19 2024 -0500 more fiddling with mac test builds commit45ec66e976
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:29:29 2024 -0500 try disabling an apple-specific build rule commit6e41423dc3
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 04:01:07 2024 -0500 one last MacOS try for the night commitbc79a17ddb
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 03:50:41 2024 -0500 try fixing macos build commitd6031ce9f5
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 03:04:52 2024 -0500 try zero-initializinng this struct to solve docker issue commit24cbd94a80
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 02:34:36 2024 -0500 attempted docker fix commit7812f27330
Merge:ef8029d4
18c27b14
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Fri Apr 5 23:32:29 2024 -0500 Merge branch 'main' into MSVCCompilerFlags commitef8029d46f
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Fri Apr 5 23:30:26 2024 -0500 update cmake configs commit04a7bc2b8d
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 21:00:23 2024 -0500 edit build script commit9fc6b4e973
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 18:10:09 2024 -0500 fix build directory issue commita19afaaab0
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 18:06:37 2024 -0500 update .gitignore commit426d34a0aa
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 17:58:19 2024 -0500 unexclude toolchain dir commit9ce7d9043c
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 17:55:02 2024 -0500 updated cmake workflows commitdb5c10c331
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:58:00 2024 -0500 temporarily remove macos build for testing purposes commitf7da00ff89
Merge:145f97cf
661e0939
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:51:39 2024 -0500 Merge branch 'MSVCCompilerFlags' of https://github.com/jadebenn/DarkflameServer into MSVCCompilerFlags commit145f97cfdc
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:50:39 2024 -0500 build reorganization and experimental clang support commit661e0939b7
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Wed Apr 3 22:13:11 2024 -0500 fix typo in windows preset commit018e5707d7
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:30:33 2024 -0500 try using compiler flags for mac instead commit81e5f059d5
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:20:31 2024 -0500 macos refuses to work :( commita3d70197f2
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:13:37 2024 -0500 try adding build types back to mac commit005d439a4a
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:58:44 2024 -0500 edit macos presets commitbba825f0c8
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:48:20 2024 -0500 update CMake presets commit199c8224a5
Merge:1116ba83
c1c5db65
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:00:39 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit1116ba8306
Merge:9316bd6e
c7b3d9e8
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sun Feb 11 21:03:02 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit9316bd6eeb
Merge:62fb8ad0
29666a1f
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Feb 10 21:02:52 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit62fb8ad071
Merge:d5089b72
24f94edf
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Thu Feb 8 21:41:50 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commitd5089b72cc
Author: jadebenn <jonahbenn@yahoo.com> Date: Sun Feb 4 16:26:38 2024 -0600 add Linux debug preset commit7c9f56ff76
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Feb 3 16:02:53 2024 -0600 move out g++ O2 flag commit6cc99fae42
Merge:96276391
050184c5
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Feb 3 02:41:43 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit962763916d
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 22:00:49 2024 -0600 export the compile commands so I can see if they're having any effect commit4b7d1d6593
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 21:49:24 2024 -0600 trying 'init' flags instead commit3fa80063e9
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 21:13:47 2024 -0600 ONE MORE TIME commitae2115c68d
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:52:33 2024 -0600 final(?) try for now commit119937f5d9
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:34:44 2024 -0600 ditto commitab39754597
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:34:41 2024 -0600 testing if these even have any effect commite7058be3dc
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:28:05 2024 -0600 third test commit10d7776fb2
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 19:33:59 2024 -0600 trying more variations on the flags commit70f3756098
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 18:49:46 2024 -0600 testing commit9b7c593ae9
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Tue Jan 30 08:49:53 2024 -0600 Update CMakePresets.json commit8a34544d0e
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Tue Jan 30 08:44:29 2024 -0600 test moving flags to json commitb682f13fa9
Merge:2239507d
d78b5087
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Mon Jan 29 22:49:29 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit2239507d3c
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Mon Jan 29 06:14:47 2024 -0600 Add MSVC optimization flags
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
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.
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.
Step by step walkthrough for a single-player server
If you would like a setup for a single player server only on a Windows machine, use the Native Windows Setup Guide by HailStorm and skip this README.
Steps to setup server
- Clone this repository
- Install dependencies
- Database setup
- Build the server
- Configuring your server
- Verify your setup
- Running the server
- User Guide
- Docker
Clone the repository
If you are on Windows, you will need to download and install git from here
Then run the following command
git clone --recursive https://github.com/DarkflameUniverse/DarkflameServer
Install dependencies
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 CMake version 3.25 or later!).
MacOS packages
Ensure you have brew installed. You will need to install the following packages
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.
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 or higher 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.
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.
# Remove the old version of CMake
sudo apt purge --auto-remove cmake
# Prepare for installation
sudo apt update && sudo apt install -y software-properties-common lsb-release && sudo apt clean all
# Obtain a copy of the signing key
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
# Add the repository to your sources list.
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
# Next you'll want to ensure that Kitware's keyring stays up to date
sudo apt update
sudo apt install kitware-archive-keyring
sudo rm /etc/apt/trusted.gpg.d/kitware.gpg
# If sudo apt update above returned an error, copy the public key at the end of the error message and run the following command
# if the error message was "The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6AF7F09730B3F0A4"
# then the below command would be "sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF7F09730B3F0A4"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <TheCopiedPublicKey>
# Finally update and install
sudo apt update
sudo apt install cmake
Database setup
First you'll need to start MariaDB.
For Windows the service is always running by default.
For MacOS, run the following command
brew services start mariadb
For Linux, run the following command
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
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
# Logs you into the MariaDB instance as root
sudo mysql
For Windows, run the following command in the Command Prompt (MariaDB xx.xx)
terminal
# 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.
# 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.
GRANT ALL ON *.* TO 'mydarkflameuser'@'localhost' IDENTIFIED BY 'password' 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:
./build.sh
Or manually run the commands used in build.sh.
If you would like to build the server faster, append -j<number>
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:
./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.
- If you are using a Darkflame Universe client, ensure
client_net_version
inbuild/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 likelylocalhost
)- 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.
- 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
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
, andworldconfig.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 serversworldconfig.ini
contains several options to turn on QOL 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 now look like this:
- AuthServer
- ChatServer
- MasterServer
- WorldServer
- authconfig.ini
- chatconfig.ini
- masterconfig.ini
- sharedconfig.ini
- worldconfig.ini
- ...
Running the server
If everything has been configured correctly you should now be able to run the MasterServer
binary which is located in the build
directory. Darkflame Universe utilizes port numbers under 1024, so under Linux you either have to give the AuthServer
binary network permissions or run it under sudo.
To give AuthServer
network permissions and not require sudo, run the following command
sudo setcap 'cap_net_bind_service=+ep' AuthServer
and then go to build/masterconfig.ini
and change use_sudo_auth
to 0.
Linux Service
If you are running this on a linux based system, it will use your terminal to run the program interactively, preventing you using it for other tasks and requiring it to be open to run the server.
Note: You could use screen or tmux instead for virtual terminals
To run the server non-interactively, we can use a systemctl service by copying the following file:
cp ./systemd.example /etc/systemd/system/darkflame.service
Make sure to edit the file in /etc/systemd/system/darkflame.service
and change the:
User
andGroup
to the user that runs the darkflame server.ExecPath
to the full file path of the server executable.
To register, enable and start the service use the following commands:
- Reload the systemd manager configuration to make it aware of the new service file:
systemctl daemon-reload
- Start the service:
systemctl start darkflame.service
- Enable OR disable the service to start on boot using:
systemctl enable darkflame.service
systemctl disable darkflame.service
- Verify that the service is running without errors:
systemctl status darkflame.service
- You can also restart, stop, or check the logs of the service using journalctl
systemctl restart darkflame.service
systemctl stop darkflame.service
journalctl -xeu darkflame.service
First admin user
Run MasterServer -a
to get prompted to create an admin account. This method is only intended for the system administrator as a means to get started, do NOT use this method to create accounts for other users!
Account management tool (Nexus Dashboard)
If you are just using this server for yourself, you can skip setting up Nexus Dashboard
Follow the instructions here to setup the DLU Nexus Dashboard web application. This is the intended way for users to create accounts and the intended way for moderators to approve names/pets/properties and do other moderation actions.
Admin levels
The admin level, or Game Master level (hereafter referred to as gmlevel), is specified in the accounts.gm_level
column in the MySQL database. Normal players should have this set to 0
, which comes with no special privileges. The system administrator will have this set to 9
, which comes will all privileges. gmlevel 8
should be used to give a player a majority of privileges without the safety critical once.
While a character has a gmlevel of anything but 0
, some gameplay behavior will change. When testing gameplay, you should always use a character with a gmlevel of 0
.
User guide
Some changes to the client boot.cfg
file are needed to play on your server.
Allowing a user to connect to your server
To connect to a server follow these steps:
- In the client directory, locate
boot.cfg
- Open it in a text editor and locate where it says
AUTHSERVERIP=0:
- Replace the contents after to
:
and the following,
with what you configured as the server's public facing IP. For exampleAUTHSERVERIP=0:localhost
for locally hosted servers - Next locate the line
UGCUSE3DSERVICES=7:
- Ensure the number after the 7 is a
0
- Launch
legouniverse.exe
, throughwine
if on a Unix-like operating system - Note that if you are on WSL2, you will need to configure the public IP in the server and client to be the IP of the WSL2 instance and not localhost, which can be found by running
ifconfig
in the terminal. Windows defaults to WSL1, so this will not apply to most users.
Updating your server
To update your server to the latest version navigate to your cloned directory
cd path/to/DarkflameServer
Run the following commands to update to the latest changes
git pull
git submodule update --init --recursive
Now follow the build section for your system and your server is up to date.
In-game commands
- A list of all in-game commands can be found here.
Verifying your client files
LEGO® Universe 1.10.64
To verify that you are indeed using a LEGO® Universe 1.10.64 client, make sure you have the full client compressed in a rar file and run the following command.
# Replace <file> with the file path to the zipped client
# If on Linux or MacOS
shasum -a 256 <file>
# If on Windows using the Command Prompt
certutil -hashfile <file> SHA256
Below are known good SHA256 checksums of the client:
8f6c7e84eca3bab93232132a88c4ae6f8367227d7eafeaa0ef9c40e86c14edf5
(packed client, rar compressed)c1531bf9401426042e8bab2de04ba1b723042dc01d9907c2635033d417de9e05
(packed client, includes extra locales, rar compressed)0d862f71eedcadc4494c4358261669721b40b2131101cbd6ef476c5a6ec6775b
(unpacked client, includes extra locales, rar compressed)
If the returned hash matches one of the lines above then you can continue with setting up the server. If you are using a fully downloaded and complete client from live, then it will work, but the hash above may not match. Otherwise you must obtain a full install of LEGO® Universe 1.10.64. You must also make absolutely sure your LEGO Universe client is not in a Windows OneDrive. DLU is not and will not support a client being stored in a OneDrive, so ensure you have moved the client outside of that location.
Darkflame Universe Client
Darkflame Universe clients identify themselves using a higher version number than the regular live clients out there. This was done make sure that older and incomplete clients wouldn't produce false positive bug reports for us, and because we made bug fixes and new content for the client.
To verify that you are indeed using a Darkflame Universe client, make sure you have the full client compressed in a zip file and run the following command.
# Replace <file> with the file path to the zipped client
# If on Linux or MacOS
shasum -a 1 <file>
# If on Windows using the Command Prompt
certutil -hashfile <file> SHA1
Known good SHA1 checksum of the Darkflame Universe client:
91498e09b83ce69f46baf9e521d48f23fe502985
(packed client, zip compressed)
Docker
The Darkflame Server is automatically built and published as a Docker Container / OCI Image to the GitHub Container Registry at:
ghcr.io/darkflameuniverse/darkflameserver
.
Compose
Warning
It seems that Docker Desktop on Windows with the WSL 2 backend has some issues with MariaDB (c.f. mariadb-docker#331) triggered by NexusDashboard migrations, so this setup may not work for you. If that is the case, please tell us about your setup in NexusDashboard#92.
You can use the docker-compose
tool to setup a MariaDB database, run the Darkflame Server and manage it with Nexus Dashboard all
at once. For that:
- Install Docker Desktop
- Open the directory that contains your LU Client
- If the
legouniverse.exe
is in a subfolder calledclient
, you're good to go. There may also be a folderversions
. - Otherwise, create a new
client
folder and move the exe and everything else (e.g.res
andlocale
) in there. This is necessary to work around a bug in the client that will prevent that you to log back in after getting disconnected.
- If the
- Download the docker-compose.yml file and place it next to
client
. - Download the .env.example file and place it next to
client
with the file name.env
- You may get warnings that this name starts with a dot, acknowledge those, this is intentional. Depending on your operating system, you may need to activate showing hidden files (e.g. Ctrl-H in Gnome on Linux) and/or file extensions ("File name extensions" in the "View" tab on Windows).
- Update the
ACCOUNT_MANAGER_SECRET
andMARIADB_PASSWORD
with strong random passwords.- Use a password generator like https://keygen.io
- Avoid
:
and@
characters - Once the database user is created, changing the password will not update it, so the server will just fail to connect.
- Set
EXTERNAL_IP
to your LAN IP or public IP if you want to host the game for friends & family
- Open a terminal in the folder with the
docker-compose.yml
andclient
- Run
docker compose up -d
- This might require
sudo
on Linux, and a recent version of docker compose
- This might require
- Run
docker exec -it dlu-darkflameserver-1 /app/MasterServer -a
and follow the instructions to create the initial admin account - Open http://localhost:8000 to access Nexus Dashboard with the admin account to create normal users
- Set
AUTHSERVERIP=0:localhost
inclient/boot.cfg
- Replace
localhost
with the value ofEXTERNAL_IP
if you changed that earlier. - Also make sure
UGCUSE3DSERVICES=7:
is set to0
- Replace
- Launch
legouniverse.exe
Standalone
This assumes that you have a database deployed to your host or in another docker container.
A basic deployment of this contianer would look like:
# example docker contianer deployment
docker run -it \
-v /path/to/configs/:/app/configs \
-v /path/to/logs/:/app/logs \
-v /path/to/dumps/:/app/dumps \
-v /path/to/res:/app/res:ro \
-v /path/to/resServer:/app/resServer \
-e DUMP_FOLDER=/app/dumps \
-p 1001:1001/udp \
-p 2005:2005/udp \
-p 3000-3300:3000-3300/udp \
ghcr.io/darkflameuniverse/darkflameserver:latest
You will need to replace the /path/to/
's to reflect the paths on your host.
Any config option in the .ini
's can be overridden with environmental variables: Ex: log_to_console=1
from shared_config.ini
would be overidden like -e LOG_TO_CONSOLE=0
Development Documentation
This is a Work in Progress, but below are some quick links to documentaion for systems and structs in the server Networked message structs General system documentation
Credits
DLU Team
Research and Tools
Community Management
Logo
- Cole Peterson (BlasterBuilder)
Active Contributors
Former Contributors
- TheMachine
- Matthew
- Raine
- Bricknave
Special Thanks
- humanoid24
- pwjones1969
- Simon
- ALL OF THE NETDEVIL AND LEGO TEAMS!