Apache Casbin Gateway
5. Operations

5.1 Settings and configuration

Everything is optional. Settings are changed on the Settings page and stored in the database, so nothing has to be edited by hand and nothing has to be restarted.

The file and the page

conf/app.conf, next to the executable, seeds the settings on the very first start and explains each one. The one-step install has no file beside it and seeds from the copy baked into the binary instead.

Editing the file after that first start does nothing — except for the keys read before the database is open:

httpport, driverName, dataSourceName, dbName, redisEndpoint.

The settings people actually change

SettingDefaultWhat it does
httpport17000Port of the web UI and the REST API
httpaddr127.0.0.1Interface the web UI binds to — 5.2
driverName / dataSourceNamesqlite / ./data/casbin-gateway.dbWhere data is stored
llmRecordModefullHow much of each relayed request is kept — 4.2
providerProbeModeautoWhether providers are probed on their own, only when asked (manual), or never (off) — 3.4
apiKeyEncryptionKeyemptyEncrypts provider API keys at rest (AES-256-GCM)
casdoorEndpointemptySwitches sign-in over to Casdoor SSO

The Settings page, section by section

SectionHolds
StartupWhether Gateway starts when you log in. The tray menu's Start at Login is the same switch
LLM recordsThe recording mode and the limits around it — 4.2
Channel probesProbe mode and how long before a report goes stale — 3.4
AgentsAgent state directory, how many agent records to keep, how often to poll a monitored agent
Sign-inThe five Casdoor fields; empty means Gateway's own user table
SecurityapiKeyEncryptionKey and the relay token — 5.2
NetworkOutbound SOCKS5 proxy, allowed hosts, allowed origins
BackupsSnapshots of the configuration — 5.3
Cloud syncA copy of every backup, somewhere that is not this machine — 5.3
Import and exportThe configuration as one file, to move to another machine and read back

Using MySQL instead of SQLite

XORM is used, so every database it supports works. Point Gateway at your server and it creates dbName on first start if it does not exist:

driverName = mysql
dataSourceName = root:123@tcp(localhost:3306)/
dbName = casbin_gateway

Connecting Casdoor

Casdoor is optional and takes over member management. Create an organization and an application for Gateway in a Casdoor instance, then fill in the five fields of Settings → Sign-in.

Sign-in redirects to Casdoor as soon as casdoorEndpoint is set, which also enables OAuth logins.

Checking the result instead of the file

The startup summary reports what Gateway is actually doing — which port, which database, which settings source, whether the relay needs a token (1.2).

Next: 5.2 Security and serving other machines.

Edit on GitHub
Apache Incubator

Apache Casbin (Incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright © 2026 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.

Apache, Apache Casbin, the names of Apache projects, and the feather logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and/or other countries. All other marks mentioned may be trademarks or registered trademarks of their respective owners.

On this page