selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

OAuth2 Proxy logo

Self-host OAuth2 Proxy

v7.15.6

Reverse proxy that fronts apps with OAuth2/OIDC sign-in

ReleaseOpen SourceMIT
Updatedlast week
LanguageGo
Setup difficultyModerate
Stars
15 381
Ports
4180 (HTTP listener, default bind 127.0.0.1:4180), 443 (HTTPS listener when the proxy terminates TLS itself)
Docker
quay.io/oauth2-proxy/oauth2-proxy
Install with Docker
The OAuth2 Proxy sign-in page shown before authentication

What is OAuth2 Proxy?

OAuth2 Proxy alternatives

Should you self-host OAuth2 Proxy?

OAuth2 Proxy scores 75/100 on selfhost.directory (how scoring works) and ranks #3 of 19 in Identity & Auth. It has 15 381 GitHub stars, +223 in the last 30 days.

It shipped 11 stable releases in the past year. The latest, v7.15.6, came out on 5 November 2026. New versions land roughly every 4 weeks.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is jumpserver (77/100, 31 970 stars). It scores higher overall, so compare the two before you pick. See OAuth2 Proxy vs jumpserver side by side.

Features

  • Configuration validation
  • Custom Templates
  • Email and group access control
  • Health check endpoints
  • Many identity providers
  • Middleware / auth_request mode
  • OAuth2/OIDC authentication gate
  • Prometheus metrics endpoint
  • Sign-in and sign-out handling
  • TLS Termination
  • Upstream proxying and static files
  • User info header forwarding
  • WebSocket proxying

OAuth2 Proxy README

Continuous Integration Go Report Card GoDoc MIT licensed Maintainability Code Coverage OpenSSF Scorecard OpenSSF Best Practices FOSSA Status

OAuth2 Proxy

OAuth2 Proxy is a flexible, open-source tool that can act as either a standalone reverse proxy or a middleware component integrated into existing reverse proxy or load balancer setups. It provides a simple and secure way to protect your web applications with OAuth2 / OIDC authentication. As a reverse proxy, it intercepts requests to your application and redirects users to an OAuth2 provider for authentication. As a middleware, it can be seamlessly integrated into your existing infrastructure to handle authentication for multiple applications.

How to install OAuth2 Proxy

Install OAuth2 Proxy with Docker

Environment variables
OAUTH2_PROXY_COOKIE_SECRET

c. Using a Prebuilt Docker Image (AMD64, PPC64LE, S390x, ARMv6, ARMv7, and ARM64 available)

Distroless base image from v7.6.0; Alpine-based images remain available with tags suffixed -alpine.

How to configure OAuth2 Proxy

  • http_address127.0.0.1:4180Config key for the HTTP listen address in oauth2-proxy.cfg
  • reverse_proxyConfig key for running behind a reverse proxy

    values: true/false

  • flag""optional, see docs

    values: string

  • --configPath to the TOML config file, e.g. /etc/oauth2-proxy.cfg
  • --config-testValidate the configuration and exit without starting the proxy (CI/CD checks)

OAuth2 Proxy releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Identity & Auth

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…