Configure and Run
Configure the Server
CORS allowed origins:
make run (and .\build.ps1 run on Windows) automatically configures the Gate and Console development origins (https://localhost:5190 and https://localhost:5191) on startup, so no manual CORS setup is required for the standard flow.
To allow additional origins, add them to backend/cmd/server/config/resources/server_configs/cors.yaml or set them at runtime with PUT /server-config/cors.
Open backend/cmd/server/deployment.yaml and make the following change:
Configure the Gate client:
gate_client:
port: 5190
This configuration points the backend server to the local ThunderID Gate application for authentication.
Run the Server
All-in-one (Backend + Frontend together)
Start the ThunderID server and apps in development mode.
- Linux/macOS
- Windows
make run
.\build.ps1 run
This command will automatically set up your complete development environment:
What happens:
- Installs frontend dependencies and builds packages
- Starts the frontend development servers
- Generates TLS certificates (if missing)
- Initializes SQLite databases
- Starts the backend server
- Runs the bootstrap script which creates:
- The
Consoleapplication with the correct redirect URIs - The default admin user (credentials default to
admin/admin; configurable viaADMIN_USERNAME/ADMIN_PASSWORDenvironment variables)
- The
Services that start:
- Backend server: https://localhost:8090
- ThunderID Gate (Login/Register): https://localhost:5190/gate
- ThunderID Console (Admin Console): https://localhost:5191/console
Separate terminals (for debugging independently)
Use this approach when you need to debug the backend and frontend independently.
Terminal 1 - Backend:
- Linux/macOS
- Windows
make run_backend
.\build.ps1 run_backend
Terminal 2 - Frontend:
- Linux/macOS
- Windows
make run_frontend
.\build.ps1 run_frontend
Terminal 3 - Seed the initial data (one-time only):
- Linux/macOS
- Windows
PUBLIC_URL="https://localhost:8090" \
go run -C backend/cmd/server . bootstrap \
--console-redirect-uris "https://localhost:5191/console"
$env:PUBLIC_URL = "https://localhost:8090"
go run -C backend/cmd/server . bootstrap `
--console-redirect-uris "https://localhost:5191/console"
This runs the in-process bootstrap subcommand, which creates the default resources (including the Console application and the default admin user — credentials default to admin / admin) directly through the service layer. No temporary server or security bypass is involved. You only need to do this once — the data persists in the SQLite databases, and the subcommand is idempotent if re-run.
Don't use ./setup.sh here. That script is designed for the packaged distribution zip and expects a compiled ./thunderid binary at the project root. From source code, run the bootstrap subcommand as shown above, or use make run (Option A) which handles everything for you.