Run with Docker Compose
The fastest way to see a working authorization server is the Compose file the repository ships. It brings up three services — MongoDB, a one-shot provisioning step, and the server — and needs no configuration beyond the one value discussed below.
Prerequisites: Docker with Compose v2 (docker compose, not the older docker-compose).
Bring it up
Section titled “Bring it up”-
Fetch the Compose file:
Terminal window curl -O https://raw.githubusercontent.com/RedFox-Soft/OAuth-server.ts/main/docker-compose.yml -
Decide the
ISSUERvalue now — see the warning below. Ifhttp://localhost:3000is not where a browser will reach this server, edit it in bothenvironment:blocks ofdocker-compose.yml, thesetupservice’s and theoauthservice’s. Changing only one leaves the seeded redirect URI and the advertised issuer disagreeing, which is exactly the mismatch the warning below cannot be repaired out of. -
Start everything:
Terminal window docker compose up -
Open the console at
http://localhost:3000/admin. The first visit shows a one-time setup screen that creates the initial super administrator.
What the three services do
Section titled “What the three services do”| Service | Image | Role |
|---|---|---|
mongo |
mongo:8 |
The datastore, on a named mongo-data volume, with a mongosh ping healthcheck the other services wait for |
setup |
ghcr.io/redfox-soft/oauth-server-ts:latest |
Runs bun run db:setup once and exits: collections, indexes, the initial RS256 signing key, the admin panel seed |
oauth |
ghcr.io/redfox-soft/oauth-server-ts:latest |
The server itself on port 3000, started only after setup completes successfully |
The ordering is load-bearing rather than tidy. Without the reserved admin project, bucket and
admin-panel client that setup seeds, the console’s sign-in redirects to a client no Client
document matches — and the first-run setup page still works, which makes it look like a login bug.
setup is idempotent, so re-running docker compose up after pulling a newer image is also the
upgrade path.
Where to go next
Section titled “Where to go next”- The console:
http://localhost:3000/admin— create the first administrator. - The discovery document, which is the authoritative list of endpoint URLs for a client library:
http://localhost:3000/.well-known/openid-configuration. - The key set:
http://localhost:3000/jwks. - A liveness probe that is never rate-limited:
http://localhost:3000/health.
For a production-leaning Compose file — pinned tags, an external database, a TLS proxy in front — see Deploy with Docker Compose.