Self-hosting n8n gives you control over workflows, credentials and execution data. That control matters only when the service is secured, backed up and observable.
Recommended architecture
1. Use a dedicated subdomain
Point a subdomain to the VPS, put Nginx in front of n8n and issue a valid TLS certificate. Do not expose the internal container port publicly.
2. Persist the right data
Use PostgreSQL for workflow data. Persist the n8n directory and protect the encryption key: without the same key, restored credentials cannot be decrypted.
3. Restrict access
- Use a strong owner account and multi-factor authentication.
- Allow only required firewall ports.
- Keep the editor private when possible.
- Store secrets outside workflow code.
4. Back up for restore
Back up the database, n8n data and configuration. Encrypt off-server copies and regularly perform a restore test.
5. Monitor operations
Availability
Check the HTTPS endpoint and alert when unreachable.
Executions
Track failed workflows, queue delays and repeated retries.
Capacity
Watch disk, memory and database growth before they cause outages.
Update strategy
Read release notes, make a backup, update during a maintenance window and verify critical workflows. Pin versions instead of following latest blindly.
Subscribe for a complete VPS installation and recovery test.
Follow on YouTube ↗