# Set Up Group Module on Server

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

The Group module can be set up on TCP and UDP servers.

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

To expose built-in commands to a client, you can set it up using the `diarkisexec` package.

Add the following to the main function of your server. Below is an example of setting it up on a UDP server. The `setup` function of `diarkisexec` must 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{
		Group:      &diarkisexec.Options{ConfigPath: "/configs/shared/group.json", ExposeCommands: true},
	})
	diarkisexec.SetupDiarkisUDPServer("/configs/udp/main.json")
	diarkisexec.StartDiarkis()
}
```

Since you can easily start a server using the server template, it is recommended to use this first. Refer to [diarkis-server-template](https://help.diarkis.io/en/getting-started/diarkis-server-template "mention").


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
