Deploy on Heroku
Create Instance
Deploy Authorizer with PostgreSQL on Heroku:
After clicking the button:
Step 1: Enter the App name
The app name becomes your URL. For example, authorizer-demo gives you authorizer-demo.herokuapp.com.
Step 2: Choose the Region and deploy
Select your deployment region (United States or Europe).
Step 3: Configure for v2
For Authorizer v2, configure the following required variables in your Heroku app settings under Config Vars:
| Variable | Example Value |
|---|---|
DATABASE_TYPE | postgres |
DATABASE_URL | (auto-configured by Heroku add-on) |
JWT_TYPE | HS256 |
JWT_SECRET | test |
ADMIN_SECRET | admin |
CLIENT_ID | 123456 |
CLIENT_SECRET | secret |
Optional: metrics bind address and rate limits
The authorizer-heroku Dockerfile passes these Config Vars through to the binary (shell defaults match Authorizer):
| Variable | Maps to | Default | Notes |
|---|---|---|---|
METRICS_HOST | --metrics-host | 127.0.0.1 | 0.0.0.0 only if an internal scraper must reach METRICS_PORT; do not publish metrics publicly. |
METRICS_PORT | --metrics-port | 8081 | |
RATE_LIMIT_RPS | --rate-limit-rps | 30 | 0 disables per-IP limiting. |
RATE_LIMIT_BURST | --rate-limit-burst | 20 | |
RATE_LIMIT_FAIL_CLOSED | --rate-limit-fail-closed | false | true → 503 on rate-limit backend errors. |
Use REDIS_URL for shared sessions and rate limits across dynos (rate limiting).
Update the Procfile or startup command to pass CLI flags:
web: ./build/server --database-type=$DATABASE_TYPE --database-url=$DATABASE_URL --jwt-type=$JWT_TYPE --jwt-secret=$JWT_SECRET --admin-secret=$ADMIN_SECRET --client-id=$CLIENT_ID --client-secret=$CLIENT_SECRET
Updating Instance
Prerequisites
Step 1: Clone Authorizer Heroku App
git clone https://github.com/authorizerdev/authorizer-heroku
cd authorizer-heroku
Step 2: Attach Heroku app
# Replace authorizer-heroku with your Heroku app's name
heroku git:remote -a authorizer-heroku
heroku stack:set container -a authorizer-heroku
Step 3: Deploy the latest version
git push heroku main