Copied successfully!The link has been copied to clipboard
n8n Security Checklist for Self-Hosted Servers
A self-hosted n8n holds API keys, database passwords and access tokens. If someone gets into it, they get into everything it connects to. Go through this checklist once when you set up, and again every few months.
Server and network
Use SSH keys and turn off password login for SSH.
Enable a firewall. Allow only SSH, 80 and 443. Keep the n8n port (5678) and the database port closed to the internet.
Bind n8n to 127.0.0.1 and let a reverse proxy handle public traffic.
Install fail2ban or similar to slow down repeated login attempts.
Is self-hosted n8n secure? It can be, if you use HTTPS, a firewall, strong access control, a protected encryption key, regular updates and backups.
Should I expose port 5678 to the internet? No. Bind n8n to localhost and put a reverse proxy with HTTPS in front of it.
What happens if my encryption key leaks? Someone with both the key and your database could decrypt stored credentials. Rotate the credentials in your connected services and restrict access to the key.