> For the complete documentation index, see [llms.txt](https://help.diarkis.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.diarkis.io/en/diarkis-modules/matchmaker/setup-server.md).

# Set Up MatchMaker Module on Server

## Overview <a href="#diarkis-room-wosettoappusuru" id="diarkis-room-wosettoappusuru"></a>

The MatchMaker module must define matchmaking on an HTTP server. This is necessary because the data is managed in the memory of the HTTP server.

The publication of built-in commands can be set up on UDP and TCP servers.

## Setup <a href="#birutoinkomandowokuraiantonisuru" id="birutoinkomandowokuraiantonisuru"></a>

To publish built-in commands to clients, you can set up using the `diarkisexec` package.

Add the following to the main function of the server. Below is a sample setup for a UDP server. The `setup` function of `diarkisexec` needs to be executed before calling `diarkisexec.StartDiarkis()`.

For more details, please refer to the [diarkisexec API reference](https://docs.diarkis.io/docs/server/current/diarkis/diarkisexec/index.html).

```go
package main

import "github.com/Diarkis/diarkis/diarkisexec"

func main() {
	logConfigPath := "/configs/shared/log.json"
	meshConfigPath := ""

	diarkisexec.SetupDiarkis(logConfigPath, meshConfigPath, &diarkisexec.Modules{
		MatchMaker: &diarkisexec.Options{ConfigPath: "/configs/shared/matching.json", ExposeCommands: true},
	})
	diarkisexec.SetupDiarkisUDPServer("/configs/udp/main.json")
	diarkisexec.StartDiarkis()
}
```

It is recommended to first utilize the server template for easily launching a server. Please consider using this: [Diarkis Server Template](/en/getting-started/diarkis-server-template.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.diarkis.io/en/diarkis-modules/matchmaker/setup-server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
