Configuration
Config File Reference
Config File Location
By default FiveNet looks at the following places to find a config.yaml
file (in order):
.
- Current active/working directory./config
- Mainly used by the containerized version of FiveNet.
Must Set Config Options
The most important options for FiveNet to run correctly:
http.publicURL
- Public facing URL of your FiveNet instance.http.sessions.cookieSecret
- Secret used to handle user cookies (should be randomly generated once during install, at least 24 characters long).http.sessions.domain
- Public facing Domain/Subdomain name of your FiveNet instance.database.dsn
- Database connection string.nats.url
- NATS message queue URL (with credentials included).jwt.secret
- Secret used for creating the user tokens (should be randomly generated once during install, at least 24 characters long).auth.superuserGroups
- List of groups that will be granted superuser in FiveNet.
For detailed info on these options check the configuration reference section below.
Reference
logLevel
string
Log level for FiveNet.
mode
string
Can be
debug
or release
.tracing
enabled
boolean
type
'stdout' | 'otlptracegrpc' | 'otlptracehttp'
url
string
OTLP Tracing endpoint URL
insecure
boolean
timeout
string (duration)
environment
string
ratio
float
attributes
map[string]string
http
listen
string
Web listen address
adminListen
string
Admin listen address (for monitoring metrics)
publicURL
string required
Full public URL to the FiveNet instance, e.g.,
https://fivenet.example.com
.origins
string[] required
List of origins that are allowed to be served (can be
["*"]
to allow any origin):origins:
- "https://fivenet.example.com"
sessions
required
cookieSecret
string required
A random session cookie secret, should be at least 24 characters long. Must stay the same as otherwise the cookies are invalidated and everyone must login again.
domain
string required
The domain FiveNet is running on
fivenet.example.com
.trustedProxies
string[] required
List of trusted proxies (this enables the use of
X-Forwarded-For
/ X-Real-IP
header from a proxy):trustedProxies:
- "1.2.3.4/24"
database
dsn
string required
The database source name (DSN) for your MySQL database.It is required to keep the parameters after the
DB_USER:DB_PASS@tcp(DB_HOST:DB_PORT)/DB_NAME?collation=utf8mb4_unicode_ci&parseTime=True&loc=Europe%2FBerlin
?
, only thing you can change is the &loc=Europe%2FBerlin
to change the timezone for the database connection.For writing a database source name (DSN), refer to https://github.com/go-sql-driver/mysql#dsn-data-source-name for details.
custom
For more information on the Golang SQL driver options available here, checkout https://go.dev/doc/database/manage-connections
maxOpenConns: 32
maxIdleConns: 5
connMaxIdleTime: 15m
connMaxLifetime: 60m
nats
required
Make sure that your NATS server/cluster has JetStream enabled.
url
Must be in format of
nats://localhost:4222
.
You can specify the credentials in it like this nats://USER:PASSWORD@localhost:4222
.replicas
Replicas count of streams and key value stores created in NATS.
jwt
required
secret
A random JWT secret, should be at least 24 characters long. Must stay the same as otherwise the tokens are invalidated and everyone must login again.
storage
type
'filesystem' | 's3'
Either filesystem or S3 storage, requires the config options for the chosen storage type.
filesystem
path
string
The filesystem directory to storage data in.
s3
S3 bucket credentials and details:
endpoint: ""
region: "us-east-1"
accessKeyID: ""
secretAccessKey: ""
useSSL: true
bucketName: ""
prefix: ""
imageProxy
enabled
boolean
If the image proxy should be enabled. You shouldn't change this from
true
to false
as it would case existing "proxied" images to break in existing documents.url
string
cachePrefix
string
options
allowHosts
string[]
List of allowed hosts for caching images from external sources.
denyHosts
string[]
List of denied hosts for caching images from external sources.
cache
refreshTime
string
audit
retentionDays
number
oauth2
providers
name
string
label
string
homepage
string
icon
string
defaultAvatar
string
type
string
Can be
discord
or generic
.redirectURL
string
clientID
string
clientSecret
string
scopes
string[]
List of OpenID scopes.
endpoints
authURL
string
tokenURL
string
postalsFile
string
Path to the
postals.json
file, the default path is working for the provided FiveNet container image.auth
superuserGroups
string[]
List of groups that will have superuser access in FiveNet.
superuserUsers
string[]
List of char identifiers that will have superuser access in FiveNet regardless the group.
dispatchCenter
convertJobs
string[]
List of jobs of GKSPhone dispatches that should be converted to FiveNet dispatches.DEPRECATED Will be removed soon.
discord
enabled
boolean
commands
enabled
boolean
Advanced Config Options
Custom Columns
To disable a column, set it to "-"
in the database.custom.columns
structure like this:
database:
# [...]
custom:
columns:
user:
# This would disable the display of the visum number
visum: "-"
playtime: "playtime"
vehicle:
# Your `owned_vehicles` table doesn't have a `model` column?
# Just set it to `"-"` to disable it
model: "model"
conditions:
user:
filterEmptyName: false