Apache Casbin Gateway
1. Getting started

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 | bash

Windows

In PowerShell:

irm https://raw.githubusercontent.com/apache/casbin-gateway/master/scripts/install.ps1 | iex

What the installer does

  1. Downloads the build for this machine and unpacks it into ~/.local/share/casbin-gateway (%LOCALAPPDATA%\casbin-gateway on Windows).
  2. Puts a casbin-gateway command on your PATH.
  3. Starts it, and arranges for it to start again when you log in.
  4. 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.

VariableEffect
INSTALL_DIRInstall somewhere other than the default directory
NO_START=1Install without starting
NO_AUTOSTART=1Install 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:

PathHolds
data/casbin-gateway.dbThe SQLite database: providers, settings, records, permissions
data/Agent patch state
logs/casbin-gateway.outConsole 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.

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