Configuration

config_server.lua

The server-only settings: upload providers, logging, number and IBAN generators, GIF, video relay and price API.

config_server.lua is loaded on the server only. It holds your upload keys, webhooks and API keys.

Never share it, never paste it in a support ticket, never put it in a public repository. This page names each setting and its purpose. It does not show values for keys, tokens or webhook addresses; you fill those in yourself.

#Upload

Setting Type What it does
ServerConfig.Upload.Provider string 'fivemanage', 'fmapi', 'relay', 'custom' or 'none'
Upload.Fivemanage.Image string (secret) Fivemanage v3 API key. One key is enough for every file type
Upload.Fivemanage.Video, Audio string (secret) Optional separate keys per file type
Upload.Fivemanage.CdnHost string Your Fivemanage custom CDN domain, if you enabled one
Upload.FmApi.Token string (secret) Fivemanage v2 token, for keys created before v3 (Provider = 'fmapi')
Upload.Relay.Url string Address of the Fixitfy upload relay (https)
Upload.Relay.Key string (secret) Leave empty; the server enrols itself on first use. Set it only if Fixitfy gave you one
Upload.Custom.Url string Any service that accepts a multipart upload and answers with JSON containing the file URL
Upload.Custom.Field string Multipart field name of the file. Default 'file'
Upload.Custom.Headers table Headers sent with the upload, for example an authorization header
Upload.Custom.Hosts string list Add when the service's links are served from another domain than Url
Upload.AllowedHosts string list Hosts photos, avatars, attachments and listing images may come from, besides the active provider's own host. Subdomains are included
Upload.BlockedHosts string list Always refused, even when listed in AllowedHosts. Default: Discord's CDN hosts, because its attachment links are signed and expire within a day

Every player who looks at a photo loads it from its host. Limiting images to known hosts means a link in a chat or a profile cannot be used to collect viewers' IP addresses. Add your own image host to AllowedHosts if players or scripts use one. Links that fail the check are refused when they are sent.

Each provider is described on Upload.

#Logs

Setting Type Default What it does
ServerConfig.Logs.Enabled boolean true Master switch
Logs.Locale string or nil nil Language of console, file and Discord logs. nil uses Config.Locale
Logs.BotName string 'fx-phone' Name of the webhook user
Logs.BotAvatar string '' Avatar image address of the webhook user
Logs.DiscordBotToken string (secret) empty Optional bot token, only used to show Discord usernames next to ids
Logs.Console boolean false Print every event to the console
Logs.File boolean true Daily files logs/fx-phone-<date>.log. The last 7 days are kept
Logs.ShowIp boolean false IP as a spoiler in Discord and plain in the file
Logs.ShowCoords boolean true Player position
Logs.ShowTokens boolean false Hardware token count in Discord, the tokens in the file
Logs.Webhooks table (secret) empty One Discord webhook address per group: phone, calls, messages, bank, invoices, media, social, marketplace, news, darkchat, sim, shop, admin
Logs.Events table every event on ['kind'] = { enabled, color, webhook? } per event

enabled = false on an event stops it everywhere: console, file and Discord. An event's own webhook sends it somewhere other than its group. Groups, events and delivery are described on Logging.

#Number and IBAN generators

luafunction ServerConfig.NumberGenerate(identifier)
    return Config.Number.Prefix .. Utils.RandomDigits(Config.Number.Length)
end

function ServerConfig.IbanGenerate(identifier)
    return 'FX' .. Utils.RandomDigits(8)
end

Both are called until they return a value nobody has. A number must be digits only; an IBAN 4 to 34 letters and digits. When the bank adapter knows the character's IBAN (tgiann-bank), that one is used first.

#GIF

Setting Type What it does
ServerConfig.Gif.Provider string 'giphy', 'tenor', 'klipy' or 'none'
ServerConfig.Gif.Key string (secret) API key of the provider. It never leaves the server; the phone searches through it

GIF searches are cached for 10 minutes.

#Video

The relay for video calls and live streams. With TurnSecret and IceServers left empty, the picture goes through the Fixitfy relay. See Video relay.

Setting Type Default What it does
ServerConfig.Video.Hosted boolean true Use the Fixitfy relay when no TURN server is set below. false turns it off
Video.TurnSecret string (secret) empty The static-auth-secret of your coturn server. Leave empty when every server below has its own login
Video.IceServers list empty Each entry: { urls = { ... }, username = '', credential = '' }. Entries without a username get a login minted from TurnSecret for each call
Video.AllowDirect boolean false false sends every frame through the relay, so players never learn each other's IP address. true also lets two phones connect directly when they can, which saves relay traffic
Video.CredentialSeconds number 600 Lifetime of one minted login. The phone renews it during longer calls

The phone only ever receives short-lived credentials for the call it is in. The secret stays on the server.

#Crypto

Setting Type Default What it does
ServerConfig.Crypto.CoinGecko boolean true Live prices from CoinGecko. When false, the prices in Config.Crypto.Coins are used
ServerConfig.Crypto.ApiKey string (secret) empty Optional CoinGecko demo API key. The keyless public API is enough at the default refresh interval

#Social

Setting Type Default What it does
ServerConfig.Social.DefaultAvatar string '' https image given to new Chirp, Pixl and Flame accounts. Empty shows the initials
ServerConfig.Social.DefaultBanner string '' https header image for new accounts. Empty shows a plain header

#Console commands

fxphone:number, fxphone:wipe and fxphone:mail are defined at the bottom of this file, so you can change or remove them. They are open to the server console and to players for whom the framework admin check or the fxphone.admin ACE is true. See Installation.