Run a server
A DarqlineMP server is a single program plus a resources/ folder of Lua game modes. It runs on Windows and Linux, built from source or in Docker.
Build and start
You need Rust, at least the version in rust-version of Cargo.toml.
git clone https://github.com/DarqlineMP/server.git
cd server
cargo build --release --lockedStart it on Linux:
target/release/darqlinemp-server # game port 23277 (UDP), client files on TCP 23277
target/release/darqlinemp-server 7777 # a different game portor on Windows, in PowerShell:
.\target\release\darqlinemp-server.exe
.\target\release\darqlinemp-server.exe 7777The server looks for resources/ in its working directory, so start it from the repository root or from a folder with the same layout (see Hosting). With the default configuration it starts the demo resource, a freeroam game mode, and logs listening on when it is ready for players.
To run it in Docker instead:
docker build -t darqlinemp-server .
docker run -d -p 23277:23277/udp -p 23277:23277/tcp -v darqlinemp-data:/srv/darqlinemp darqlinemp-serverConnect to it
Players connect through the DarqlineMP launcher with Direct connect and host:port, for example 127.0.0.1:23277 for a server on the same computer. A client can only connect to a server with the same protocol revision, so run the server release that matches your launcher.
For players on other computers, open the game port for UDP and the client files port for TCP (both are the same number unless you configure otherwise).
Next steps
- Your first resource: write an event handler and a command.
- Configuration: set the server name, player slots, password, ports and startup resources.
- Hosting: server files, the identity key, the console and updates.
