casbin-gateway

(โ˜… 568)

Casbin AI & MCP security gateway for HTTP, online demo: https://door.caswaf.com

  • .dockerignore
  • .gitignore
  • .golangci.yml
  • CLAUDE.md
  • DISCLAIMER
  • docker-compose.yml
  • Dockerfile
  • embed.go
  • go.mod
  • go.sum
  • LICENSE
  • main.go
  • NOTICE
  • README.md
  • README_zh.md

๐Ÿš€ Installation Guide

1. Get the code
git clone https://github.com/apache/casbin-gateway

Downloads the entire project code from GitHub to your computer.

cd casbin-gateway

Moves into the project folder you just downloaded.

2. Official Install Script

Easy Recommended
curl -fsSL https://raw.githubusercontent.com/apache/casbin-gateway/master/scripts/install.sh | bash

Downloads and runs the official install script in one line โ€” this handles the full setup automatically.

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

Downloads and runs the official install script via PowerShell โ€” this handles the full setup automatically.

โœ… After installing, open a new terminal and run the program's version command (e.g. --version) to confirm it worked.

Pulled directly from this repo's README.

3. Docker

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker compose up -d

Builds and starts all defined containers (server, database, etc.) at once, in the background.

โœ… Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.

Pulled directly from this repo's README.

4. Node.js

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Node.js Node.js must be installed to use npm. The LTS version is recommended.
cd web && yarn install && yarn build

Moves into the project folder you just downloaded.

cd web && yarn dev

Moves into the project folder you just downloaded.

โœ… After running the command, open the address shown in the terminal (usually something like http://localhost:3000) in your browser.

Pulled directly from this repo's README.

5. Go

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Go The Go compiler and toolchain.
go run main.go

Runs the Go program directly without a separate build step.

go build -tags embed -o casbin-gateway .

Compiles the Go program into an executable.

โœ… If the build finishes without errors, it worked. If you used go run ., check the terminal output.

Pulled directly from this repo's README.

// repository documentation