Skip to content

Quickstart

This walkthrough starts the management API on 127.0.0.1:9080, the HTTP proxy on 0.0.0.0:8080, and one route that matches every request.

Open two terminals:

Terminal window
python3 -m http.server 9001
Terminal window
python3 -m http.server 9002

From the repository root:

Terminal window
just run-seed

Or build the admin UI and run Raahi through Cargo:

Terminal window
cd ui && npm install && npm run build && cd ..
cargo run --release -- --seed

Open the admin UI at http://localhost:9080.

The seeded setup contains:

  • The demo-service upstream, with round-robin load balancing
  • The targets 127.0.0.1:9001 and 127.0.0.1:9002
  • The demo-route route, which matches every host and path
Terminal window
curl -i http://localhost:8080/
curl -i http://localhost:8080/

Requests alternate between the two targets. Stop one server and Raahi removes it from rotation after a failed connection or health check.

Raahi starts with management authentication disabled. Create the first admin before exposing the management listener to another machine:

Terminal window
curl -X POST http://127.0.0.1:9080/api/v1/users \
-H 'content-type: application/json' \
-d '{
"email": "[email protected]",
"name": "You",
"role": "admin",
"password": "replace-with-a-long-password"
}'

Creating the first user enables authentication immediately. Sign in through the web UI for normal work.