How to Fix n8n Schedule Triggers Not Running After Docker Restart
n8n is a powerful open-source workflow automation tool, perfect for teams looking to self-host and integrate AI-powered workflows. But if you’re running n8n inside Docker and notice that your scheduled workflows stop executing after a restart, you’re not alone.
In this guide, we’ll walk you through exactly why this happens and how to fix it — permanently.
🧠 The Problem: Schedule Triggers Don’t Auto-Run After Docker Restart
You’ve set up a workflow in n8n with a Schedule Trigger
. It runs perfectly when manually executed. You’ve even marked it Active.
But after restarting your Docker container:
- The workflow still shows “Active”
- Yet scheduled runs never fire
- And you’re forced to hit Execute Workflow manually
🔍 Why?
Your workflow state and schedule trigger configuration are stored inside a file called database.sqlite
. If this file isn’t saved persistently across container restarts, your triggers won’t be registered on reboot — even if the UI suggests they are.
✅ The Fix: Use Proper Volume Mounting + File Permissions
To make n8n schedule triggers survive a Docker restart, you must:
- Persist the n8n database using a Docker volume
- Ensure the internal
node
user has permission to write to that volume
🔧 Step-by-Step Instructions
✅ Step 1: Locate Your Docker Setup
Make sure you’re in the folder where your docker-compose.yml
lives:
bashCopyEditcd ~/docker/n8n
If you’re using a bind mount like this:
yamlCopyEditvolumes:
- ./n8n-data:/home/node/.n8n
Make sure the folder exists:
bashCopyEditls ./n8n-data
✅ Step 2: Fix Permissions for the n8n-data Folder
n8n runs as the node
user inside the container (UID 1000
). Your folder might be owned by root
or another user like debian
, causing silent write failures.
Run this to fix it:
bashCopyEditsudo chown -R 1000:1000 ./n8n-data
Optionally tighten up permissions:
bashCopyEditsudo chmod -R 755 ./n8n-data
✅ Step 3: Restart Docker Compose
This will shut down and relaunch n8n with proper access:
bashCopyEditdocker-compose down
docker-compose up -d
✅ Step 4: Test It
- Open the n8n editor:
https://your-n8n-domain.com
- Create a workflow with a Schedule Trigger (e.g., every 1 minute)
- Add a Set Node that sets
{"status":"working"}
- Activate and save the workflow
- Wait 1–2 minutes — it should execute
- Now restart n8n:
bashCopyEditdocker-compose restart n8n
- Wait again. The schedule should still fire. ✅
💡 Pro Tip: Use Named Volumes Instead
For better stability across environments, consider switching from a host bind mount to a Docker-managed named volume:
Replace:
yamlCopyEdit- ./n8n-data:/home/node/.n8n
With:
yamlCopyEdit- n8n_data:/home/node/.n8n
Then add this to the bottom of your docker-compose.yml
:
yamlCopyEditvolumes:
n8n_data:
This avoids file permission issues entirely.
🛡️ Bonus: Export Workflows for Backup
Before making any big changes, always back up:
bashCopyEditdocker exec -it n8n n8n export:workflow --backup
This will export all workflows into the container’s .n8n/backup
folder.
🧬 Wrapping Up
When n8n schedule triggers don’t run after reboot, it’s usually a persistence or permission issue. With the steps above, you’ll be able to:
- Fix schedule trigger failures
- Make your workflows reliable after reboot
- Avoid silent data loss caused by permission mismatches
For advanced automation, AI-powered lead gen, and n8n integration consulting — Xtream Solutions is here to help. 💡
📩 Need Help?
If you’d like us to audit your automation stack or set up AI-enhanced workflows for your law firm, business, or agency, contact us today.
Leave a Reply