// troubleshooting guide · apache superset
Superset Refusing to Start Due to Insecure SECRET_KEY
- Status
- Workaround available
- platforms:
- Self-hosted, Docker, Kubernetes
- updated:
- November 16, 2026
- reports:
- 4
- Method
- how we research
RUNBOOK · apache-superset/insecure-secret-key4 FIXES
// quick answer
Since 2.1, Superset will not start in non-debug mode with the default SECRET_KEY. Generate a random key (openssl rand -base64 42) and set it as SECRET_KEY in superset_config.py or the SUPERSET_SECRET_KEY environment variable.
Most likely fix: Generate and set a strong key
How to fix it
// try these in order, the most common fix is first
FIX 1Generate and set a strong key
- 01Run openssl rand -base64 42
- 02Add SECRET_KEY = '<value>' to superset_config.py, or export SUPERSET_SECRET_KEY=<value>
- 03Restart Superset
Did this fix it?FIX 2Override the Docker default
- 01Set SUPERSET_SECRET_KEY in docker/.env-local or your compose environment
- 02Recreate the containers with docker compose up -d --force-recreate
Did this fix it?FIX 3Rotate the key without losing connections
- 01Set PREVIOUS_SECRET_KEY to the old key and SECRET_KEY to the new one
- 02Run superset re_encrypt_secrets
- 03Remove PREVIOUS_SECRET_KEY afterwards
Did this fix it?FIX 4Confirm the config is loaded
- 01Check SUPERSET_CONFIG_PATH points to your superset_config.py
- 02Run the CLI with the same environment as the web service
Did this fix it?
SANDBOX · apache-superset RUNS IN YOUR BROWSER
Try it: browse a sample shop and watch visitors, funnels and live data arrive
A hands-on Apache Superset-style sandbox, including the spots where users get stuck. See where problems like this one start. 1-2 minutes, nothing is saved.
Symptoms
The web server or 'superset db upgrade' exits with 'Refusing to start due to insecure SECRET_KEY'.
Why it happens
- C-01SECRET_KEY still the shipped default
- C-02Docker Compose using the bundled TEST_NON_DEV_SECRET
- C-03superset_config.py not loaded (SUPERSET_CONFIG_PATH not set)
// this guide also covers
- refusing to start due to insecure secret_key
- superset secret key error
- superset SUPERSET_SECRET_KEY
- superset won't start
Still not working?
If Apache Superset keeps failing, you're not alone. See every Apache Superset problem users report or the alternatives people switch to.
Done fighting Apache Superset? Our small team builds your own Apache Superset alternative, or any software you need: web, mobile, games, desktop. Price agreed together.
Talk to usOther Apache Superset errors
- Superset CSRF Session Token Is Missing Error
- Superset Dashboard Slow or Charts Timing Out
- Superset Alerts and Reports Not Sending Emails
- Superset Embedded Dashboard Not Loading (403 or Refused to Connect)
- Superset Could Not Load Database Driver
- Superset CSV Upload Option Missing
- Superset Forgot Admin Password (How to Reset Login)
- Superset Dashboards Broken After Upgrade