> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nonefivem.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Configure the NoCloud CFX SDK for security, rate limiting, and storage options

The SDK is configured via the `config.json` file located in the root of your `nocloud` resource folder. The default configuration is preconfigured with secure defaults and sensible limits—you can adjust these values to fit your needs.

<Tip>
  The `$schema` property enables autocomplete and validation in editors like VS
  Code.
</Tip>

***

## Logging

<ParamField path="logging.enabled" type="boolean" default="true">
  Enable or disable logging output.
</ParamField>

<ParamField path="logging.level" type="string" default="info">
  The minimum log level to output.
</ParamField>

| Level   | Description                   |
| ------- | ----------------------------- |
| `debug` | Verbose debugging information |
| `info`  | General operational messages  |
| `warn`  | Warning messages              |
| `error` | Error messages only           |

***

## Storage

<ParamField path="storage.enable_client_uploads" type="boolean" default="true">
  Whether clients can trigger uploads from their game client or nui.
</ParamField>

<ParamField path="storage.max_file_size_mb" type="number" default="50">
  Maximum allowed file size in megabytes. Files exceeding this limit will be
  rejected.
</ParamField>

<ParamField path="storage.allowed_file_types" type="string[]">
  An array of MIME types permitted for upload. Any file type not in this list
  will be rejected.
</ParamField>

| Category  | MIME Types                                                            |
| --------- | --------------------------------------------------------------------- |
| Images    | `image/jpeg`, `image/png`, `image/gif`, `image/webp`, `image/svg+xml` |
| Video     | `video/mp4`, `video/webm`                                             |
| Audio     | `audio/mpeg`, `audio/wav`                                             |
| Documents | `text/plain`                                                          |

***

## Rate Limiting

Per-client rate limiting prevents abuse by restricting how many uploads each client can make within a time window.

<ParamField path="storage.rate_limit.enabled" type="boolean" default="true">
  Enable or disable rate limiting.
</ParamField>

<ParamField path="storage.rate_limit.window_ms" type="number" default="60000">
  The time window in milliseconds for rate limit tracking.
</ParamField>

| Value     | Duration  |
| --------- | --------- |
| `60000`   | 1 minute  |
| `300000`  | 5 minutes |
| `3600000` | 1 hour    |

<ParamField path="storage.rate_limit.max_requests" type="number" default="10">
  Maximum number of upload requests allowed per client within the time window.
</ParamField>

<ParamField path="storage.rate_limit.client_identifier_extractor" type="string" default="ip:license">
  Defines how clients are uniquely identified for rate limiting. This is a
  colon-separated list of identifiers.
</ParamField>

| Identifier | Description                 |
| ---------- | --------------------------- |
| `ip`       | Client's IP address         |
| `license`  | Rockstar license identifier |
| `steam`    | Steam ID (if available)     |
| `discord`  | Discord ID (if available)   |
| `fivem`    | FiveM account ID            |

**Examples:**

* `ip:license` — Combines IP and license (default)
* `license` — License only
* `ip:license:steam` — Multiple identifiers
