Documentation
Dragonite
Configuration

Dragonite Configuration

Dragonite reads its settings from config.toml. Every key has a built-in default, so you only need to set what you want to change. Start from the example config in the Dragonite-Public (opens in a new tab) repository.

The Default column below is the value Dragonite uses when the key is missing from your file.

Loading the config

Dragonite looks for config.toml and then configs/config.toml in its working directory. Use -c / --config to load a different file:

./dragonite --config /etc/dragonite/config.toml

Most settings can be reloaded without a restart through the /reload API or the reload button in Dragonite Admin.

Minimal config

[general]
api_host = "127.0.0.1"
api_port = 7272
 
[auth.ptc]
enable = true
 
[koji]
url = "http://127.0.0.1:8080"
bearer_token = "KOJI_SECRET"
 
[rotom]
endpoint = "ws://127.0.0.1:7071"
 
[processors]
golbat_endpoint = "http://127.0.0.1:9001"
golbat_raw_bearer = ""
golbat_api_secret = ""
 
[db.dragonite]
host = "127.0.0.1"
port = 3306
user = "dragonite"
password = "secret"
name = "dragonite"
pool_size = 10

General section

KeyDefaultDescription
api_host"0.0.0.0"Listen address of the Dragonite API.
api_port7272Listen port of the Dragonite API.
instance_name""Name of this instance, shown in Dragonite Admin's instance selector.
statstrueWrite worker stats to the database.
worker_stats_interval5Minutes between worker stats writes.
account_statstrueWrite account stats to the database.
disable_fort_lookupfalseTurn off fort inspection completely (gym details, lure times, names).
disable_rsvp_scanningfalseDon't collect raid RSVP data.
⚠️

Keep the Dragonite API on 127.0.0.1 or a private network ([general] api_host), and never expose it to the internet. People use Dragonite Admin with its login. Scripts and tools go through Dragonite Admin as well: set api_secret in the admin config and send it in the X-Dragonite-Admin-Secret header.

Auth sections

Each login provider has its own section: [auth.ptc] and [auth.nk] (Niantic Kids). Enable at least one. See Accounts & Auth for how they work.

[auth.ptc]
enable = true
#remote_auth_url = ""
#token_init_enabled = true
#token_refresh_only = true
 
[auth.nk]
enable = false

Without any [auth.*] section that has enable = true, Dragonite falls back to the deprecated auth keys under [general] and [tuning] and enables all providers. Add an [auth.<provider>] section to avoid this.

KeyDefault (PTC / NK)Description
enablefalseUse this provider.
enable_scanningtrueUse accounts of this provider for scanning.
enable_levelingtrueUse accounts of this provider for leveling. Turning off both lets the token background jobs run without logging into the game.
login_delay20Seconds between logins on the same proxy.
remote_auth_url""Remote login service (Xilriws or Swirlix).
remote_auth_secret""Secret for the remote login service, if it needs one.
remote_auth_timeout_seconds60Timeout for remote login requests.
token_refresh_onlytrueOnly use accounts that already have a stored token; don't log in through remote auth while scanning.
token_init_enabledfalseBackground job that collects tokens for accounts that don't have one yet.
token_init_concurrency1Parallel token collection requests.
token_init_interval_seconds20 / 180Seconds between token collection requests.
token_init_start_delay_minutes5Delay after startup before token collection starts.
token_init_retry_delay_minutes60Wait before retrying a failed token collection.
token_refresh_concurrency10Parallel token refresh requests.
token_refresh_days28 / 12Refresh tokens older than this many days. 0 disables refreshing.
token_refresh_start_delay_minutes5Delay after startup before token refresh starts.
token_refresh_bannedfalseAlso refresh tokens of banned accounts.
token_valid_days32 / 16Age in days after which a token is considered expired.
ip_ban_backoff_minutes10How long to stop using a proxy after an IP ban.
auth_ban_on_refreshfalseMark a PTC account as auth-banned when its token refresh is rejected.

Without remote_auth_url, Dragonite can't log in PTC accounts and can't collect refresh tokens for them; only accounts that already have a token can be used. In that case token_init_enabled must stay false and token_refresh_only must stay true, or Dragonite won't start.

Accounts section

[accounts]
required_level = 31
leveling_level = 31
KeyDefaultDescription
required_level31Minimum account level for scanning. Allowed: 31 to 40.
leveling_level31Level that Level mode levels accounts to. Allowed: 0 to 32.

Koji section

[koji]
url = "http://127.0.0.1:8080"
bearer_token = "KOJI_SECRET"
KeyDefaultDescription
url""URL of your Koji (opens in a new tab) instance, used to calculate routes.
bearer_token""Koji's KOJI_SECRET, if set.
sort_by"TSP"Route sorting algorithm Koji uses.
route_calc_concurrency1How many route calculations Dragonite sends to Koji at the same time.

Rotom section

[rotom]
endpoint = "ws://127.0.0.1:7071"
#secret = ""
KeyDefaultDescription
endpointrequiredRotomNG controller listener (controller_listener.address, default port 7071). Dragonite won't start without it.
secret""Must match RotomNG's controller_listener.secret when that is set.

Processors section

Where Dragonite sends the game data it collects.

[processors]
golbat_endpoint = "http://127.0.0.1:9001"
golbat_raw_bearer = ""
golbat_api_secret = ""
#golbat_grpc_endpoint = "127.0.0.1:50001"
#raw_endpoints = ["token@http://127.0.0.1:9002/raw"]
KeyDefaultDescription
golbat_endpoint""Golbat HTTP address, without /raw. Used for raw data and Golbat API calls. Required even when gRPC is used.
golbat_raw_bearer""Golbat's raw_bearer. Used for HTTP and gRPC raw sending.
golbat_api_secret""Golbat's api_secret.
golbat_grpc_endpoint""Golbat gRPC address (grpc_port). When set, raw data goes over gRPC instead of HTTP.
raw_endpoints[]Additional destinations that accept the raw format, as "token@url" or "url".
max_concurrent_raw_sends100Maximum in-flight raw sends per destination (HTTP and gRPC). Excess sends are dropped and counted in metrics.

Database section

[db.dragonite]
host = "127.0.0.1"
port = 3306
user = ""
password = ""
name = "dragonite"
pool_size = 10
KeyDescription
hostDatabase host.
portDatabase port.
userDatabase user.
passwordDatabase password.
nameDatabase (schema) name.
pool_sizeMaximum connections to the database.

See Database.

Scheduler section

[scheduler]
enabled = true
KeyDefaultDescription
enabledtrueRun the scheduler. Turning it off also stops scheduled route recalculation and quest scans.

Tuning section

⭐ Advanced option ⭐ The defaults are chosen to keep accounts safe. Change them only if you know why.

Account recycling

Accounts are rotated out once they reach a request limit.

KeyDefaultDescription
recycle_gmo_limit50000Map requests per account.
recycle_encounter_limit13500Encounters per account.
recycle_gym_limit9975Gym detail requests per account.
recycle_invasion_limit900Invasions per account.
minimum_account_reuse_hours0Hours an account rests before it can be used again. 169 (7 days) is a common choice.
test_shadow_bannedtrueDetect shadow-banned accounts and mark them as banned.

Movement and delays

KeyDefaultDescription
location_delay1000Milliseconds to wait after moving before requesting map data (Pokémon mode). A longer delay reduces empty results.
fort_location_delay-1Same for Fort mode. -1 uses location_delay.
rare_location_delay-1Delay after each rare Pokémon queue item. -1 uses location_delay.
scout_location_delay-1Delay after each scout queue item. -1 uses location_delay, 0 disables it. Only affects dedicated scout workers.
speed0Cap the delay by movement speed in km/h: the delay becomes min(location_delay, distance / speed). 0 disables this.
initial_gmo_success_rate0Make location_delay dynamic. See below.
minimum_location_delay0Lower limit for the dynamic location delay.
distance0Distance from which distance_delay is added when the first map request fails.
distance_delay0Extra delay in milliseconds for such jumps.

Dynamic location delay

With initial_gmo_success_rate set, Dragonite treats location_delay as the maximum and adjusts each worker's delay to reach that success rate (in percent) for first-try map requests, never going below minimum_location_delay. The delay is checked every 50 steps and resets to the maximum when the account is rotated.

[tuning]
location_delay = 7000
initial_gmo_success_rate = 80
minimum_location_delay = 3000

Scanning

KeyDefaultDescription
encounter_pokemontrueEncounter Pokémon seen by Pokémon and rare Pokémon workers. When false, Pokémon are reported without IVs. Scouts are not affected.
scout_age_limit30Minutes before an unprocessed scout request is dropped.
fort_inspection_interval_minutes360Re-inspect every fort at least this often. 0 disables timed inspection.
lured_fort_recheck_minutes5Re-inspect lured pokestops this often to catch lure extensions.
rare_pokemon_minimum_seen500Pokémon an area must have seen before rarity is calculated for rare Pokémon mode.
rare_pokemon_scan_cellfalseAlso look for rare Pokémon among nearby cell Pokémon.
rare_pokemon_only_matchesfalseRare Pokémon workers only encounter their target, not other Pokémon they see.
team_selection""Team for accounts without one: empty or random, mystic, valor, instinct, or off.

Quests

KeyDefaultDescription
quest_quarantinetrueOnly quest with quest-capable accounts (PTC accounts not known to be AR-banned). See quest quarantine.
reserve_quest_accountsfalseLet Pokémon and Fort workers use non-quest-capable accounts first, so quest-capable accounts stay available for questing.

Invasions

KeyDefaultDescription
invasion_leadersfalseAlso queue leader and Giovanni invasions. This needs accounts with a Rocket Radar.
invasion_queue_limit_per_worker10Queue size per invasion worker.
max_grunt_queue_size0Maximum grunt queue size. 0 uses the per-worker limit × invasion workers.
max_leader_queue_size0Maximum leader queue size. 0 uses the per-worker limit × invasion workers.

Login

KeyDefaultDescription
disable_ptc_auth_bypassfalseAlways do a full PTC login instead of reusing a recently refreshed token.

GMO section

⭐ Advanced option ⭐ Controls retries of map requests (GMO).

KeyDefaultDescription
retries8Maximum attempts per location.
no_pokemon_delay3000Milliseconds to wait before retrying when the response has no Pokémon.
no_cell_delay3000Milliseconds to wait before retrying when the response has no cells.
allow_consecutive_failures3Consecutive locations with an empty response (or no Pokémon where Pokémon were seen before) before the worker gives up on the account. The account is tested for a shadow ban first.
allow_consecutive_no_pokemon10Same for locations visited for the first time that return no Pokémon.
max_consecutive_rpc_errors5Consecutive request errors before the session is restarted.

Logging section

[logging]
save = true
#debug = false
KeyDefaultDescription
savetrueWrite log files to logs/.
debugfalseDebug logging. Very verbose.
max_size500Log file size in MB before rotation.
max_age30Days to keep rotated files.
max_backups1000Rotated files to keep.

Prometheus section

[prometheus]
enabled = true
#token = ""
KeyDefaultDescription
enabledfalseServe metrics at /metrics on the API port.
token""When set, /metrics requires Authorization: Bearer <token>.
bucket_size[.00005 … 10]Histogram buckets in seconds.

See Prometheus.

Pyroscope section

Continuous profiling with Pyroscope (opens in a new tab).

KeyDefaultDescription
server_address""Pyroscope server. Empty disables profiling.
application_name"dragonite"Application name in Pyroscope.
api_key""Pyroscope API key.
loggerfalseLog Pyroscope client output.
mutex_profile_fraction5Mutex profile sampling.
block_profile_rate5Block profile sampling.