Quick Start
This guide gets you running locally in about 5 minutes using mock services. You don’t need to configure Google OAuth - the mock OAuth server simulates authentication with test users.
Prerequisites
Section titled “Prerequisites”Make sure you have these installed:
- mise - Install mise.
mise installinstalls the pinned Go, Bun, Node and golangci-lint versions frommise.toml - Docker & Docker Compose - Install Docker
- Task and Overmind - Install Task, install Overmind
See System Requirements for detailed installation instructions.
-
Clone the repository
Terminal window git clone https://github.com/DocSpring/rack-gateway.gitcd rack-gateway -
Install tools and dependencies
Terminal window mise installtask dev-setup # air, goimports and libfido2 (and Task and Bun if missing)go mod downloadcd web && bun install && cd .. -
Configuration
mise.tomlalready points everything at the mock services, so there’s nothing to configure. Only create amise.local.tomlfor your own overrides: don’t copymise.local.toml.exampleas it is, because its Google placeholders would replace the mock OAuth settings. -
Start everything
Terminal window task devThis migrates the database, then starts:
- Gateway API server at
http://localhost:8447 - Web UI at
http://localhost:5223 - Mock OAuth server at
http://localhost:3345 - Mock Convox API at
http://localhost:5443 - PostgreSQL and MinIO (for audit anchors) in Docker
- Gateway API server at
Try It Out
Section titled “Try It Out”Web UI
Section titled “Web UI”- Open
http://localhost:5223in your browser - Click Continue with Mock OAuth
- The mock OAuth server shows a user selection screen
- Choose admin@example.com, the one user the dev stack creates (see Test Users for the others)
- MFA is required for every user by default, so you land on Account Security: enroll an authenticator app (any TOTP app works), and then the other pages open
-
Build the CLI and log in
Terminal window task go:build:cli./bin/rack-gateway login staging http://localhost:8447Your browser opens to the mock OAuth server. Select a test user.
-
Run Convox commands
Terminal window # List apps (from mock Convox)./bin/rack-gateway apps# View processes./bin/rack-gateway ps# Check rack status./bin/rack-gateway rack -
Set up a convenient alias
Terminal window alias cg="./bin/rack-gateway"cg appscg ps
What You’re Running
Section titled “What You’re Running”The development environment consists of:
| Component | URL | Description |
|---|---|---|
| Gateway API | http://localhost:8447 | Authentication proxy |
| Web UI | http://localhost:5223 | Admin interface (Vite dev server) |
| Mock OAuth | http://localhost:3345 | Simulates Google OAuth |
| Mock Convox | http://localhost:5443 | Simulates Convox rack API |
| PostgreSQL | localhost:55432 | Database (in Docker) |
Test Users
Section titled “Test Users”The mock OAuth server offers four test users:
| Role | Capabilities | |
|---|---|---|
| admin@example.com | Admin | Full access to everything |
| deployer@example.com | Deployer | Deploy apps, manage builds and releases |
| ops@example.com | Ops | Restart apps, manage processes |
| viewer@example.com | Viewer | Read-only access |
The gateway only lets in users it knows, and the dev stack creates just admin@example.com (ADMIN_USERS in
mise.toml). To try the others, add them on the Users page as the admin, or seed them in your
mise.local.toml:
[env]DEPLOYER_USERS = "deployer@example.com"OPERATIONS_USERS = "ops@example.com"VIEWER_USERS = "viewer@example.com"Explore the Features
Section titled “Explore the Features”User Management
Section titled “User Management”- Login as
admin@example.com - Go to Users in the sidebar
- Add
deployer@example.comwith the Deployer role - Try changing a user’s roles
API Tokens
Section titled “API Tokens”- Go to API Tokens
- Create a new token with the CI/CD role shortcut
- Note a token can’t have permissions its owner’s role lacks
Audit Logs
Section titled “Audit Logs”- Go to Audit Logs
- See all actions you’ve taken, each recorded before it ran
- Note that env values are redacted
Account Security
Section titled “Account Security”- Go to Account Security
- Add a second MFA method, or regenerate your backup codes
- Click your name at the bottom of the sidebar to see your active sessions
Run Tests
Section titled “Run Tests”Verify everything is working:
# Go unit teststask go:test:unit
# Web unit teststask web:test
# Lint and fixtask lint:fixNext Steps
Section titled “Next Steps”Now that you have Rack Gateway running locally:
- Explore the RBAC system
- Try the MFA features
- Review the audit logs
- Set up Google OAuth
- Review Production Checklist
- Deploy with Docker or Convox
- Read the Development Guide
- Understand the Architecture
- Check the Contributing Guide
Troubleshooting
Section titled “Troubleshooting”Port already in use
Section titled “Port already in use”If you see port conflict errors:
# Stop all servicestask docker:down
# Restarttask devDatabase connection failed
Section titled “Database connection failed”Ensure Docker is running:
docker ps # Should show rack-gateway-postgres-1If the container isn’t running:
task docker:resettask devOAuth redirect issues
Section titled “OAuth redirect issues”Make sure you’re using the mock OAuth server URLs:
- Gateway:
http://localhost:8447(nothttps) - OAuth redirect:
http://localhost:8447/api/v1/auth/web/callback - No
mise.local.tomloverridingGOOGLE_OAUTH_BASE_URLorGOOGLE_ALLOWED_DOMAIN
For more help, see Troubleshooting.