With database = off there is no PostgreSQL to run, and the Admin API becomes read-only. Configuration is a YAML file applied at boot or replaced wholesale.
# kong.conf
database = off
declarative_config = /etc/kong/kong.yaml
# kong.yaml
_format_version: "3.0"
services:
- name: billing
url: http://billing.internal:8080
routes:
- name: billing-route
paths: ["/billing"]
plugins:
- name: rate-limiting
config: { minute: 100, policy: local }
# replace the running config
curl -X POST http://localhost:8001/config -F config=@kong.yaml
# POST /consumers in DB-less mode:
# HTTP/1.1 405 Method Not Allowed
#
# What it costs: no runtime provisioning, so anything that creates consumers
# or credentials on the fly (a signup flow, OAuth2 token storage) will not work.
#
# What it buys: no database to run or back up, identical config on every node,
# and a start-up that cannot half-apply.
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-25