# Set Up Room Module on Server

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

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

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

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

Add the following to your server's main function. Below is a sample setup for a UDP server. Note that the `diarkisexec` setup function 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{
		Room:       &diarkisexec.Options{ExposeCommands: true},
	})
	diarkisexec.SetupDiarkisUDPServer("/configs/udp/main.json")
	diarkisexec.StartDiarkis()
}
```

It's recommended to first utilize the server template for easily starting up a server. [diarkis-server-template](https://help.diarkis.io/en/getting-started/diarkis-server-template "mention")
