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.
Logging
boolean
default:"true"
Enable or disable logging output.
string
default:"info"
The minimum log level to output.
Storage
boolean
default:"true"
Whether clients can trigger uploads from their game client or nui.
number
default:"50"
Maximum allowed file size in megabytes. Files exceeding this limit will be
rejected.
string[]
An array of MIME types permitted for upload. Any file type not in this list
will be rejected.
Rate Limiting
Per-client rate limiting prevents abuse by restricting how many uploads each client can make within a time window.boolean
default:"true"
Enable or disable rate limiting.
number
default:"60000"
The time window in milliseconds for rate limit tracking.
number
default:"10"
Maximum number of upload requests allowed per client within the time window.
string
default:"ip:license"
Defines how clients are uniquely identified for rate limiting. This is a
colon-separated list of identifiers.
Examples:
ip:license— Combines IP and license (default)license— License onlyip:license:steam— Multiple identifiers
Feature Flags
Settings for the feature flags module. The defaults fetch nothing until a flag is read, so a server that never reads one costs a single request in its life.boolean
default:"true"
Whether feature flags are available at all. With this off every read falls back
and nothing is fetched.
integer
default:"10"
How long a fetched configuration is served from memory before a read goes back
to the API, in seconds. Minimum
1.string
default:"nocloud_flags"
The
GlobalState key the shared flag values are published under, which is how
clients read them. Must match ^[A-Za-z_][A-Za-z0-9_]*$.boolean
default:"true"
Whether the last received flags are kept in resource key/value storage, so they
are served immediately on the next start and while the API is unreachable.
Polling
boolean
default:"false"
Whether the flags are refetched whether or not a client is reading them.
AddStateBagChangeHandler on the state bag, or a nocloud.flags.updated handler — since a change nobody reads is a change nothing would otherwise go and find.
integer
default:"60000"
How often the flags are refetched while polling runs, in milliseconds. Values
below
10000 are raised to 10000.A tick landing inside
cache_ttl_seconds skips, so that window is the real
floor. The API advises polling no faster than every 20 seconds and the SDK logs
a warning once if your interval is shorter.Example
config.json

