1.2 Installation
One command. No database, no Go, no Node, no configuration file to write.
Linux and macOS
curl -fsSL https://raw.githubusercontent.com/apache/casbin-gateway/master/scripts/install.sh | bashWindows
In PowerShell:
irm https://raw.githubusercontent.com/apache/casbin-gateway/master/scripts/install.ps1 | iexWhat the installer does
- Downloads the build for this machine and unpacks it into
~/.local/share/casbin-gateway(%LOCALAPPDATA%\casbin-gatewayon Windows). - Puts a
casbin-gatewaycommand on your PATH. - Starts it, and arranges for it to start again when you log in.
- Adds a Casbin Gateway entry to the desktop and Start menu, to
~/Applications, or to the application menu, depending on the platform.
The terminal you installed from is yours again straight away. An archive unpacked by hand gets the same entry the first time the launcher runs.
| Variable | Effect |
|---|---|
INSTALL_DIR | Install somewhere other than the default directory |
NO_START=1 | Install without starting |
NO_AUTOSTART=1 | Install without starting at login |
First start
Gateway opens in its own window. There is no sign-in screen: it serves this machine only, and signs the local admin in on sight.
Closing that window leaves Gateway running behind its tray icon, which is also where you reopen the window, turn Start at Login off and on (Settings → Startup is the same switch), and quit for real.
If you would rather use a browser, or you are on a machine with no desktop at all, everything is still at http://localhost:17000, and casbin-gateway start runs the server on its own with no window and no tray.
The account behind that automatic sign-in is admin / 123. It only matters if you open Gateway to the network — see 5.2 Security and serving other machines.
Where things live
Gateway writes everything relative to its install directory:
| Path | Holds |
|---|---|
data/casbin-gateway.db | The SQLite database: providers, settings, records, permissions |
data/ | Agent patch state |
logs/casbin-gateway.out | Console output while it runs in the background |
tmp/ | Scratch space |
The installed casbin-gateway command is a wrapper that always starts Gateway in its install directory, which is why it works from anywhere. Running the executable directly from some other folder gives you a second, empty installation there.
Checking that it started
Gateway prints what it is actually doing when it starts, so the result can be checked instead of a file:
+---------------------------------------------------------------------+
| Casbin Gateway |
+---------------------------------------------------------------------+
| Management UI | http://localhost:17000 (this machine only) |
| Settings | Settings page, seeded from conf/app.conf |
| Web UI files | web/build |
| Database | sqlite, file "./data/casbin-gateway.db" (connected) |
| Sign-in | built-in user table, Casdoor is not configured |
| Relay auth | this machine only, no token needed |
+---------------------------------------------------------------------+casbin-gateway status answers the same question later.
A previous Gateway still holding port 17000 is stopped first, so a restart never waits on it. A port held by anything else stays with that program: Gateway names the process holding it and stops, rather than taking the port or starting half-configured.
Building from source instead
Go 1.25+ and Node.js with Yarn are needed; the README has the commands.
Note that the one-command install ships nightly builds, rebuilt from master on every push and published as the nightly pre-release. They exist so Gateway can be tried without a Go and Node toolchain; anything else should be built from a source release.
Next: 1.3 The interface.
1.1 Introduction
Casbin Gateway is a local gateway for the AI coding agents installed on your machine. It finds them, shows what they carry, puts one endpoint in front of the model vendors they talk to, and keeps the record of what they did and what it cost.
1.3 The interface
Everything is at http://localhost:17000, in the desktop window or in a browser. The sidebar is the whole product, in the order you would set it up: the agents, the models behind them, the gates they pass through, then what they ran and what it cost, with settings last.