> For the complete documentation index, see [llms.txt](https://docs.nxcframework.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nxcframework.net/configuring/server-cfg.md).

# server.cfg reference

The handful of settings that cannot live in the database.

Everything else is [configured in game](/configuring/in-game.md). These are here because they are needed before a database connection exists, or because they should never be in a database.

## Required

Nexus Core refuses to start without these, deliberately. A value that is optional is a value that is empty on the one server where it mattered.

### `nxc_server_build`

```cfg
set nxc_server_build "106"
```

The exact Cfx Server build you are running. Find it on the last line of startup:

```
fx: b106-ea/Win
     ^^^        this number
```

Required so a platform regression can be attributed to a specific update rather than to whatever changed most recently. Enhanced is early access; this will matter.

**Left blank on purpose in the template.** A pre-filled value is one nobody would correct.

### `mysql_connection_string`

```cfg
set mysql_connection_string ""
```

Read by `oxmysql`. Build the value from these parts:

| Part              | Example                                   |
| ----------------- | ----------------------------------------- |
| Scheme            | `mysql://`                                |
| User and password | your database user, a colon, its password |
| Host              | `@localhost` or `@10.0.0.4:3306`          |
| Database          | `/nexuscore`                              |
| Charset           | `?charset=utf8mb4` — include it           |

No fully assembled example is printed here on purpose. A credential-shaped string in documentation is the one people copy, and `charset=utf8mb4` is the part they then leave off.

The database can be empty — the framework creates its own tables and applies its own migrations.

## Optional

### `nxc_environment`

```cfg
set nxc_environment "development"
```

`development`, `staging`, or `production`. Production refuses some combinations that are fine elsewhere — debug logging, and development mode.

### `nxc_log_level`

```cfg
set nxc_log_level "info"
```

`debug`, `info`, `warn`, or `error`. `debug` is refused in production.

### `nxc_token_signing_key`

```cfg
# set nxc_token_signing_key ""
```

**Leave it commented out.** Nexus Core generates a key at every startup from the database's cryptographic random source and rotates it by restarting. You never need to set this.

It ships commented rather than blank on purpose. An absent convar and a blank one behave identically — both generate — but only a blank one can be silently overridden by a second blank `set` written below it, and `server.cfg` is read top to bottom with the last `set` winning. A filled-in key was lost that way once already.

Restarting therefore invalidates live sessions. That is intended: a session token that outlives the server which issued it is a token nobody can revoke.

Set it only if you run more than one server instance that must share sessions. A supplied key must be at least 32 characters; a shorter one is refused rather than quietly replaced.

### `nxc_dev_mode`

```cfg
set nxc_dev_mode "false"
```

Enables diagnostic commands. **Must be false in production** — it exposes internal state, and `nxc_core` refuses to start a production environment with it on.

### `nxc_startup_mode`

```cfg
set nxc_startup_mode "normal"
```

`normal` or `recovery`. Recovery starts the framework without applying migrations, for when a migration is the thing that is wrong.

## Aces

```cfg
add_ace group.admin command.nxcui allow
```

Needed for `/nxcui` in addition to `nxc_dev_mode`. See [Console commands](/running-your-server/commands.md).

## What is NOT here

**No secrets beyond the database string and signing key.** Webhook URLs, API keys, and per-business credentials belong in configuration, encrypted at rest, not in this file.

**No gameplay settings.** Hours, prices, limits, and messages are registered by the resources that own them and edited in game.


---

# 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://docs.nxcframework.net/configuring/server-cfg.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.
