Block 1 - Sticky Note1
- Type / Role
- n8n-nodes-base.stickyNote - stickyNote
- Config choices
- Version 1
This workflow is provided as-is. Please review and test before using in production.
n8n Restore workflows & credentials from Disk Self Hosted Solution This n8n template provides a safe and intelligent restore solution for self hosted n8n instances, allowing you to restore workflow...
n8n-nodes-base.stickynote, n8n-nodes-base.manualtrigger, n8n-nodes-base.emailsend, n8n-nodes-base.executecommand, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.stopanderror
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Florent.
Original n8n.io sourcePerfect for disaster recovery or migrating between environments, this workflow automatically identifies your most recent backup and provides a manual restore capability that intelligently excludes the current workflow to prevent conflicts. Works seamlessly with date-organized backup folders.
Good to know
n8n import:workflow and n8n import:credentials)Restore Process (Manual)
Prerequisites
/backup-folder/YYYY-MM-DD/)/backup-folder/YYYY-MM-DD/n8n-credentials/N8N_ENCRYPTION_KEY from source environment (see dedicated section below)Initial Setup
Configure your environment variables:
N8N_ADMIN_EMAIL: Your email for notifications (optional)N8N_BACKUP_FOLDER: Location where your backups are stored (e.g., /files/n8n-backups)N8N_PROJECTS_DIR: Projects root directoryGENERIC_TIMEZONE: Your local timezoneN8N_ENCRYPTION_KEY: Required if restoring credentials to a new environment (see dedicated section below)Update the Init node:
const N8N_ADMIN_EMAIL = $env.N8N_ADMIN_EMAIL || '[email protected]';PROJECT_FOLDER_NAME to "Workflow-backups" (or your preferred name)credentials to "n8n-credentials" (or your backup credentials folder name)BACKUP_FOLDER path matches where your backups are storedEnsure your Docker setup has:
/local-files:/files)Performing a Restore
credentials: true - Restore credentialsworkflows: true - Restore workflowstrue to restore everythingImportant Notes
N8N_ENCRYPTION_KEY from the source environment (see dedicated section below)Why this is critical: n8n generates an encryption key automatically on first launch and saves it in the ~/.n8n/config file. However, if this file is lost (for example, due to missing Docker volume persistence), n8n will generate a NEW key, making all previously encrypted credentials inaccessible.
When you need to configure N8N_ENCRYPTION_KEY:
How credentials encryption works:
/home/node/.n8n/configN8N_ENCRYPTION_KEY explicitly ensures the key remains consistentSolution: Retrieve and configure the encryption key
Step 1: Get the key from your source environment
# Check if the key is defined in environment variables
docker-compose exec n8n printenv N8N_ENCRYPTION_KEY
If this command returns nothing, the key is auto-generated and stored in n8n's data volume:
# Enter the container
docker-compose exec n8n sh
# Check configuration file
cat /home/node/.n8n/config
# Exit container
exit
Step 2: Configure the key in your target environment
Option A: Using .env file (recommended for security)
# Add to your .env file
N8N_ENCRYPTION_KEY=your_retrieved_key_here
Then reference it in docker-compose.yml:
services:
n8n:
environment:
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
Option B: Directly in docker-compose.yml (less secure)
services:
n8n:
environment:
- N8N_ENCRYPTION_KEY=your_retrieved_key_here
Step 3: Restart n8n
docker-compose restart n8n
Step 4: Now restore your credentials
Only after configuring the encryption key, run the restore workflow with credentials: true.
Best practice for future backups:
N8N_ENCRYPTION_KEY in a secure location alongside your backupsExisting Backups
Environment
Credentials (Optional)
Smart Workflow Exclusion
Timezone Handling
Security
Common Issues
N8N_BACKUP_FOLDER path is correct and contains date-formatted foldersdocker-compose.yml match your backup locationn8n-credentials folder with credential filesN8N_ENCRYPTION_KEY matches the source environmentThis workflow is designed for self-hosted server backup restoration. For FTP/SFTP remote backups, see the companion workflow "n8n Restore from FTP".
Works best with backups from: "Automated n8n Workflows & Credentials Backup to Local/Server Disk & FTP"
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Automated workflow & credential restoration system for self-hosted environments |
|---|---|
| Complexity | advanced |
| Nodes | 17 |
| Categories | DevOps |
| Author | Florent |
| Published | 01 Oct 2025 |
Use the JSON export at /data/workflows/9154/9154.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
n8n Restore workflows & credentials from Disk Self Hosted Solution This n8n template provides a safe and intelligent restore solution for self hosted n8n instances, allowing you to restore workflow...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps use case.