Skip to content

Cloudflare Worker Deployment (Recommended)

This is the most convenient and fastest way to deploy. You don't need to purchase a server, as Cloudflare's global acceleration network will host it for free, truly achieving zero cost and zero maintenance.


🛠️ Deployment Steps

1. Preparation

  1. Fork this repository to your GitHub account.
  2. Give this project a Star ⭐ (this will help you stay notified about future updates).

2. One-click Automated Deployment

  1. Click the Deploy Button: Deploy to Cloudflare Workers
  2. On the page that opens, click "Continue with GitHub".
  3. Authorize Cloudflare to read your repositories and select the nodeauth project you just forked.
Click to view: Authorization Guide Screenshot
  1. Click "Deploy", wait for the progress bar to complete, and then click "Continue to project".
Click to view: Detailed Deployment Steps Screenshot


3. Configure Core Variables

After a successful deployment, the app won't run yet. You need to inject security keys:

  1. Enter the project dashboard, click "Settings" -> "Variables & Secrets".
  2. Click "Add" and enter the following required items (refer to the Environment Variables Guide for details):
  • ENCRYPTION_KEY: A random key of at least 32 characters.
  • JWT_SECRET: A random JWT secret of at least 32 characters.
  • OAUTH_ALLOWED_USERS: your-email@example.com
  1. Don't forget the login channels: If you want to use GitHub login, you also need to add:
  • OAUTH_GITHUB_CLIENT_ID: Your CLIENT_ID
  • OAUTH_GITHUB_CLIENT_SECRET: Your CLIENT_SECRET
  • OAUTH_GITHUB_REDIRECT_URI: Your callback URI (e.g., https://your-domain.com/oauth/callback)
Click to view: Adding Variables & Secrets Screenshot
  1. Finally, click "Deploy" to save your changes.

🌐 Custom Domain

By default, Cloudflare assigns a xxx.workers.dev subdomain. If you have your own domain:

  1. In the project dashboard, click "Settings".
  2. Find "Custom Domains" -> "Add Custom Domain".
  3. Enter the domain you want to bind (e.g., 2fa.example.com). Cloudflare will automatically configure the DNS for you.
Click to view: Adding a Custom Domain

Open sourced under GNU AGPL v3 License