1. Launch Diarkis Server in Local Environment

Introduction

This page provides a guide on how to start a Diarkis server in your local environment using the Diarkis Server Template. It is recommended to go through these steps before beginning development with Diarkis.

Environment Preparation

To set up the server template, Go 1.22 or later is required.

The installation method varies depending on the platform, so please follow the official documentation: https://go.dev/doc/install

Server development with Diarkis can be performed on macOS, Linux, and Windows.

If you're starting the server in a Windows environment, please refer to Launch Diarkis Server on Windows Environment.

Generating a Project from the Server Template

  1. First, clone the repository by running git clone https://github.com/Diarkis/diarkis-server-template.git at a desired PATH.

  2. Execute the following command to generate the project. The output destination will be the absolute path specified in output.

make init project_id={project ID} builder_token={builder token} output={absolute path to install}

# Example
make init project_id=00000000000 builder_token=xxxx-yyyy-zzzz output=/tmp/diarkis-dir

The project ID and builder token mentioned here are issued to developers who have an enterprise license for Diarkis. The core of Diarkis itself is closed-source and implemented in Go, requiring you to build it using diarkis-cli.

If previous versions are needed, you can either check out the desired version’s tag or download it from the release list.

Setup

Run the following command in the generated project.

This will download various resources necessary for development, such as references for code completion.

Generating Server Binaries

To generate binaries for local use, run the following make task.

Upon execution, Diarkis binaries will be created under remote_bin.

Starting the Server

Start each of the MARS, HTTP, and UDP servers.

Obtaining Connection Information

If mars, http, and udp are running, you can obtain connection information with curl as follows. This completes the server startup.

The above HTTP endpoint indicates authentication to the UDP server with uid test. The returned information can then be used by various client libraries to facilitate packet exchange.

Last updated

Was this helpful?