Where Does Kong Store Config and Routes?
Kong gateway node config and declarative route file paths on Linux for self-hosted API traffic. With backup tips.
Last updated
Kong keeps node settings in /etc/kong/kong.conf with listeners, logging, and database links. Routes, plugins, and consumers live in Postgres or Cassandra per that config. The file decides which database the node joins.
DB-less installs swap the database for a decK state file checked into git. Plugins configure per route in either mode. Back up kong.conf with the database dump or state file. Nodes without the database serve nothing. Rate limiting guards upstream services. Logging plugins ship request data to collectors.
Where Kong stores this, by platform
/etc/kong/kong.conf
Listener, logging, and database settings for the node. Restrict read access since secrets live here. Keep with database dumps for restores.
kong.yaml (decK state file)
Declarative routes and plugins for DB-less installs. Version in git and apply with decK. Database installs keep equivalents in Postgres.
Frequently asked questions
what do i back up for a Kong move
Copy /etc/kong/kong.conf with a Postgres or Cassandra dump. The config holds listeners and database links. Routes live in the database. Both restore the gateway.
can Kong run without a database
Yes. Run Kong in DB-less mode with a decK state file instead of Postgres. Config file still sets listeners. State files version well in git for small teams.
Notice an outdated path? Let us know.