Self-host OAuth2 Proxy with Levelrail
Reverse proxy that puts an OAuth2 or OIDC login in front of any upstream. The install form carries oauth2-proxy.cfg as an editable file with a generated cookie secret, so it starts without extra flags.
- Authoroauth2-proxy
- LicenceMIT
- Memory64 MiB
- Services1
How to self-host OAuth2 Proxy
-
Pull the images
One image is pulled on your server.
Show images
quay.io/oauth2-proxy/oauth2-proxy:v7.15.6
-
Create the app
One service starts in a single Compose app, on port 4180.
-
Fill in the secrets
You do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
After the first start
- Set the client id and client secret from your identity provider, then edit the config file setting to change the provider and the upstream. Open the address followed by /ping to confirm it is up.
OAuth2 Proxy requirements
- Memory
- About 64 MiB
- Architectures
- amd64 unknown, arm64 unknown
- Ports
- 4180
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- MIT, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then OAuth2 Proxy. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the OAuth2 Proxy docs page.
Deploy OAuth2 Proxy your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy OAuth2 Proxy from the CLI
levelrail-cli templates install oauth2-proxy --name my-oauth2-proxy Deploy OAuth2 Proxy with the API
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
https://levelrail.example.com/api/v1/service-templates/oauth2-proxy/install \
-d '{
"name": "my-oauth2-proxy"
}' OAuth2 Proxy configuration
OAuth2 Proxy services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| oauth2-proxy | quay.io/oauth2-proxy/oauth2-proxy:v7.15.6 | 4180 | none |
OAuth2 Proxy environment variables
The catalog lists no environment variables for this template.
Ports and volumes
- Ports
- 4180
- Volumes
- none
OAuth2 Proxy FAQ
How much memory does OAuth2 Proxy need?
The catalog lists about 64 MiB of memory for OAuth2 Proxy.
Does OAuth2 Proxy run on arm64?
For OAuth2 Proxy, arm64 support is not confirmed; amd64 is unknown.
What licence is OAuth2 Proxy under?
OAuth2 Proxy is licensed under MIT, which is permissive, with few conditions on reuse.
Does OAuth2 Proxy need configuration before it starts?
No. The template fills in its own defaults.
Which ports does OAuth2 Proxy use?
OAuth2 Proxy listens on port 4180 inside the stack.
Can I deploy OAuth2 Proxy on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for OAuth2 Proxy, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image quay.io/oauth2-proxy/oauth2-proxy:v7.15.6 is what you deploy there.