Skip to main content

Configuration Reference

All configurable options via convars and environment variables.

Server Convars

Set in server.cfg:

Development

ConvarDefaultDescription
dev_mode"false"Enable development mode filtering
dev_features""Comma-separated module names to load (empty = all)
set dev_mode "true"
set dev_features "init,characters,spawning"

Database

ConvarDefaultDescription
mongodb_uriMongoDB connection string
mongodb_database"true_life"Database name
set mongodb_uri "mongodb://user:pass@localhost:27017"
set mongodb_database "true_life"

Telemetry

ConvarDefaultDescription
otel_enabled"false"Enable OpenTelemetry export
otel_endpoint"http://localhost:4318"OTEL Collector endpoint
otel_service_name"true_life"Service name for traces
set otel_enabled "true"
set otel_endpoint "http://localhost:4318"
set otel_service_name "true_life"

Metrics

ConvarDefaultDescription
metrics_port"9100"Prometheus metrics HTTP port
set metrics_port "9100"

Environment Variables

Set in .env or shell environment:

Docker Services

VariableDescription
MONGO_INITDB_ROOT_USERNAMEMongoDB root username
MONGO_INITDB_ROOT_PASSWORDMongoDB root password
GRAFANA_ADMIN_USERGrafana admin username
GRAFANA_ADMIN_PASSWORDGrafana admin password
# .env
MONGO_INITDB_ROOT_USERNAME=admin
MONGO_INITDB_ROOT_PASSWORD=changeme
GRAFANA_ADMIN_USER=admin
GRAFANA_ADMIN_PASSWORD=admin

Service Ports

Default ports for all services:

ServicePortDescription
MongoDB27017Database
UI Dev Server3000Vite HMR
Grafana3001Dashboards
Live Map3002Player map
Documentation3003Docusaurus
Prometheus9090Metrics queries
Metrics Endpoint9100FiveM metrics scrape
OTEL Collector4318OTLP HTTP receiver
Tempo3200Trace queries
Loki3100Log queries

FiveM Resource Configuration

fxmanifest.lua

fx_version 'cerulean'
game 'gta5'

name 'true_life'
description 'True Life FiveM Framework'
version '1.0.0'

server_script 'dist/server.js'
client_script 'dist/client.js'

ui_page 'dist/ui/index.html'

files {
'dist/ui/**/*'
}

Complete server.cfg Example

# True Life Configuration

# Development
set dev_mode "false"
set dev_features ""

# Database
set mongodb_uri "mongodb://admin:password@localhost:27017"
set mongodb_database "true_life"

# Telemetry
set otel_enabled "true"
set otel_endpoint "http://localhost:4318"
set otel_service_name "true_life"

# Metrics
set metrics_port "9100"

# Start resource
ensure true_life