Configuration
Diadem reads configuration from src/lib/server/config.toml, which should be linked from config/config.toml.
Each option is either for the server or the client. Note that all client options are publicly accessible.
[server][client]server.log
Section titled “server.log”[server.log]level = "info"# file = "/var/log/diadem.log"level: log level (crit,error,warning,info,debug)file: optional rotating log output path
server.golbat
Section titled “server.golbat”[server.golbat]url = "http://127.0.0.1:9001"secret = ""defaultNestName = "Unknown Nest"url: Golbat base URL, must be accessible to Diadem’s serversecret: Must match your configured Golbat secretdefaultNestName: The default nest name, as configured in Fletchling
server.dragonite
Section titled “server.dragonite”[server.dragonite]url = "http://127.0.0.1:7272"secret = ""Only used for scout.
url: Dragonite base URL, must be accessible to Diadem’s serversecret: Must match your configured Dragonite secret
server.koji
Section titled “server.koji”[server.koji]url = "http://127.0.0.1:8080"secret = "secret"projectName = "reactmap"Koji is optional. It’s used for area-based permissions, area search and in the coverage map.
url: Koji base URL, must be accessible to Diadem’s serversecret: Must match your configured Koji secretprojectName: The project name used to fetch areas from
By default, Diadem shows a Globe icon for areas in the search menu. You can configure the displayed icon per area
by setting a lucideIcon property in Koji.
You can find supported icons here. Make sure to convert the icon name from kebab-case to PascalCase.
Reverse Geocoding
Section titled “Reverse Geocoding”Diadem supports different geocoding providers for address search.
Out of all options, Photon is the best fit and can be used across your mapping stack. Find how to set it up here.
Geometry
Section titled “Geometry”When searching for a place, Diadem can show the resulting geometry on the map. These are not supported by all providers.
- Photon
- Option 1: Run Photon with
-full-geometriesand sethasGeometriesto true (requires ~600 GB for a planet import, more details here) - Option 2: Configure Nominatim. When a user select a search result, geometries are fetched from Nominatim (jumping is instant, displaying the result may take a little)
- Option 1: Run Photon with
- Pelias: Not supported
- Nominatim: Supported
server.photon
Section titled “server.photon”[server.photon]url = "https://photon.komoot.io/"# basicAuth = "user:pass"#hasGeometries = falsehasGeomtries: If you run Photon with-full-geometries, set to true
server.pelias
Section titled “server.pelias”[server.pelias]url = "https://api.geocode.earth/"# apiKey = "..."# basicAuth = "user:pass"server.nominatim
Section titled “server.nominatim”[server.nominatim]url = "https://nominatim.openstreetmap.org/"# basicAuth = "user:pass"#userAgent = "Diadem / Contact: name@email.com"userAgent: Set this to something unique if you’re using public nominatim
server.auth
Section titled “server.auth”[server.auth]enabled = trueoptional = truesecret = ""baseUrl = ""enabled: Enables authenticationoptional: Iftrue, show a login prompt in the menu. Iffalse, lock the app behind a login prompt.secret: Required when enabled. Random 32+ chars used to sign/encrypt auth cookies and OAuth tokens. Can also be set via theBETTER_AUTH_SECRETorAUTH_SECRETenv var.baseUrl: Required when enabled. Public app URL (scheme + host only), e.g.https://map.example.com.
[server.auth.discord]clientId = ""clientSecret = ""Currently, only Discord auth is supported.
Get your client ID and secret by setting up an application in the Discord Developer Portal
and enabling OAuth2. The callback URL is <baseUrl>/api/auth/callback/discord — register this exact URL in the Discord OAuth app’s redirect list.
client.discord
Section titled “client.discord”[client.discord]serverLink = "https://discord.com/invite/..."serverId = "123..."Client-facing Discord metadata used in UI. Server ID is used to check membership before prompting to join the server.
server.permissions
Section titled “server.permissions”Permission rules are an array of sets:
[[server.permissions]]# everyone = true# loggedIn = true# guildId = "123..."# roleId = "123..."# areas = ["London"]features = ["gym", "pokestop"]Rules are additive. For every rule a user matches, they get access to all its areas and features. config.example.toml shows some examples.
Rule match fields:
everyone(bool)loggedIn(bool)guildId(Discord guild id)roleId(Discord role id)
Grant fields:
areas: Koji area names (optional)features: one or more feature keys
Supported feature keys include:
*for everythingpokemon,pokestop,gym,station,nest,spawnpoint,route,tappable,s2cell,weather,scout
server.limits
Section titled “server.limits”Rate-limiting is pretty bare-bones, but should work.
Controls request limits and optional rate limiting.
[server.limits]enableRateLimiting = falsenonDeltaMultiplier = 3heavyFilterMultiplier = 2heavyFilterRatio = 0.2enableRateLimiting: turn limiter on/offnonDeltaMultiplier: extra cost for full queriesheavyFilterMultiplier: extra cost for highly filtered full queriesheavyFilterRatio: threshold for what is considered a heavy filter query
Per-type overrides:
[server.limits.pokemon]requestLimit = 10000rateLimit = 2000000rateLimitTime = 3600Available keys:
pokemon,pokestop,gym,station,nest,spawnpoint,route,tappable,s2cell
server.db and server.internalDb
Section titled “server.db and server.internalDb”[server.db]host = "127.0.0.1"port = 3306database = "golbat"user = ""password = ""
[server.internalDb]host = "127.0.0.1"port = 3306database = "diadem"user = ""password = ""server.db: external Golbat DB used for data queries (user needs SELECT permissions)server.internalDb: internal Diadem DB used for users/sessions (user needs ALL permissions)
client.general
Section titled “client.general”[client.general]mapName = "Diadem"defaultLocale = "en"customHome = falsedefaultLat = 51.516855defaultLon = -0.080500defaultZoom = 15# minZoom = 0# maxZoom = 20url = ""image = ""description = ""allowCrawlers = falsedisallowedPaths = []- branding and defaults for map and metadata
customHome: When true,/renders custom home and map moves to/mapdefaultLat,defaultLon,defaultZoom: The default map position for first-time usersminZoom,maxZoom: Locking users into a map zoom rangeurl,image,description: SEO/OpenGraph metadataallowCrawlers,disallowedPaths: robots.txt config
server.staticMap
Section titled “server.staticMap”[server.staticMap]enabled = falseurl = "https://tiles.example.com"diademUrl = "https://map.example.com"# style = "positron"Controls static map rendering for link previews. It’s recommended to use Rampardos or SwiftTileserverCache.
url: Base Tileserver URL, as accessible from your Diadem serverdiademUrl: Public Diadem URL, used for image linksstyle: Optional map style id override, otherwise uses the default light Map Style ID
client.tools
Section titled “client.tools”[client.tools]showToolsMenu = truecoverageMap = truescout = trueEnables/disables the different tools. showToolsMenu disables the Tools menu altogether.
client.mapPositions
Section titled “client.mapPositions”[client.mapPositions]coverageMapLat = 51.516855coverageMapLon = -0.080500coverageMapZoom = 10
# Static UIstyleLat = 53.563styleLon = 9.979styleZoom = 12coverageLat = 53.563coverageLon = 9.979coverageZoom = 5.5scoutLat = 53.563scoutLon = 9.979scoutZoom = 10.5There are a couple of maps used throughout Diadem that are independent of the main map. Use this to control where they’re positioned.
coverageMap...: The initial position when opening the coverage mapstyle...: Position for style previews in the profile menucoverage...,scout...: Background maps used in Tools menu links
client.mapStyles
Section titled “client.mapStyles”Array of map style definitions.
[[client.mapStyles]]id = "positron"name = "Positron"url = "https://.../style.json"# default = "light"Supported keys:
id: unique idname: display nameurl: style URLdefault: optionallightordark
client.uiconSets
Section titled “client.uiconSets”Configure any UIcon repo.
[[client.uiconSets]]id = "internalName"name = "User-facing name"url = "https://raw.githubusercontent.com/.../"# base = { scale = 1 }# pokemon = { default = true, scale = 0.5 }- One set should use id
DEFAULT, it’s expected for that to be wwm-uicons. urlmust be a valid link to a repo that follows the UIcon standard- You should never change or remove an ID, as this may cause the site to break for your existing users
Modifiers can be used to adjust sizing and positioning for icons on the map.
baseis applied to all icons- Supported modifier keys:
pokemon,pokestop,gym,station,tappable,quest,invasion,max_battle,raid_pokemon,raid_pokemon_6,raid_egg,raid_egg_6 - Supported modifier fields:
defaultto make this the default set for this objectscaleto modify the icon’s sizeoffsetX/offsetYto modify the icon’s positionspacingto control the space between icons, when they can be displayed as an array