Skip to main content
LibreChat is joining ClickHouse to power the open-source Agentic Data Stack 🎉 Learn more
LibreChat

GitHub

Learn how to configure LibreChat to use GitHub for user authentication.

Archived documentation

You are reading the frozen documentation for v0.8.7, which is no longer maintained. Go to the latest docs.

Create a GitHub Application

image

GitHub Application Configuration

  • Give it a GitHub App name and set your Homepage URL
    • Example for localhost: http://localhost:3080
    • Example for a domain: https://example.com

image

  • Add a valid Callback URL:
    • Example for localhost: http://localhost:3080/oauth/github/callback
    • Example for a domain: https://example.com/oauth/github/callback

image

  • Uncheck the box labeled Active in the Webhook section

image

  • Scroll down to Account permissions and set Email addresses to Access: Read-only

image

image

  • Click on Create GitHub App

image

.env Configuration

  • Click Generate a new client secret

image

  • Copy the Client ID and Client Secret in the .env file

image

DOMAIN_CLIENT=https://your-domain.com # use http://localhost:3080 if not using a custom domain
DOMAIN_SERVER=https://your-domain.com # use http://localhost:3080 if not using a custom domain

GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret
GITHUB_CALLBACK_URL=/oauth/github/callback

# GitHub Enterprise (optional)
# Uncomment and configure the following if you are using GitHub Enterprise for authentication
# GITHUB_ENTERPRISE_BASE_URL=https://your-ghe-instance.com
# GITHUB_ENTERPRISE_USER_AGENT=YourEnterpriseAppName
  • Save the .env file

Note: If using Docker, run docker compose up -d to apply the .env configuration changes