How to Install n8n on a VPS: The 5-Minute Guide (2025)
Follow our simple, step-by-step guide to install the powerful open-source tool n8n on an incredibly affordable VPS.
Get Started NowWhat You'll Need (Just Two Things)
A Cheap VPS Server
To run n8n, you need a server. The good news is, you don't need anything expensive. For this guide, we'll use RackNerd's $22.99/year KVM VPS because it's the most affordable and reliable option to get started (it has plenty of power for hundreds of workflows).
After you sign up, you'll receive an email with your server's IP address, username (root), and password. Keep it handy for the next step.
An SSH Client
This is the tool you'll use to connect to your server. Your computer already has one!
If you're on Windows, open the app called PowerShell. If you're on Mac or Linux, open the Terminal app.
The 5-Minute Installation: Just Copy & Paste
Connect to Your Server
Open your SSH client (PowerShell or Terminal) and paste the following command. Replace YOUR_SERVER_IP with the IP address from the email RackNerd sent you, then press Enter.
ssh root@YOUR_SERVER_IP
Screenshot: Terminal showing successful login
Run the One-Command Installer
Now for the magic. We'll use Docker to install n8n, which is the easiest and most stable method. Just copy this entire command below, paste it into your terminal, and press Enter.
docker run -d --restart unless-stopped --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n
This command automatically downloads n8n, sets it to run in the background, and makes sure it restarts if the server ever reboots. It might take a minute or two to complete.
Screenshot: Docker command successfully completed
Access Your n8n Dashboard
That's it! Open your web browser and go to the following address, replacing YOUR_SERVER_IP with your server's IP:
Welcome to n8n
Set up your admin account to get started
Screenshot: n8n welcome screen with admin setup
Congratulations! Here's What to Do Next...
You now have a powerful, private automation hub ready to connect your favorite apps. Try creating your first workflow, like getting a Discord notification every time a new YouTube video is posted.
Love the Power but Hate the Maintenance?
Self-hosting is powerful, but it does mean you're responsible for server updates and security. If you find you'd rather have an expert team handle all of that for you, we recommend Hostinger for the easiest 1-click setup or Cloudways for advanced managed hosting. Both offer hassle-free environments where you can focus purely on building.
Frequently Asked Questions
Absolutely. We've found the 1GB RAM plan is a fantastic starting point and can easily handle dozens of active workflows. The beauty of a VPS is scalability; if you become a power user and your needs grow, you can either upgrade your RackNerd plan in a few clicks or migrate to a more powerful managed platform like Hostinger or Cloudways for even better performance.
This is an excellent and important question. The basics of security include using a very strong root password and keeping your server updated (just run apt update && apt upgrade occasionally). For a strong security boost, you should set up a firewall. The easiest way is using UFW (Uncomplicated Firewall) with the command ufw allow 5678 to only allow access to n8n.
That's the beauty of using Docker! Updating is just two simple commands. First, pull the latest image: docker pull n8nio/n8n:latest. Second, stop and remove your old container, then re-run the original installation command from Step 2 of our guide. Your data is safely stored in the ~/.n8n volume and will be reconnected automatically.
Yes! This is one of the biggest advantages of having your own VPS. You can easily run multiple websites (like a WordPress blog) alongside your n8n instance. This usually involves setting up a reverse proxy like Nginx Proxy Manager, which is a great next step in your self-hosting journey.
This usually means your VPS is still being set up. Most VPS providers take 5-10 minutes to provision your server. Check your email for the "Server Ready" notification, or wait a bit longer and try again. If the problem persists after 15 minutes, contact your VPS provider's support.
n8n itself is quite lightweight - the Docker image is only about 200MB. However, you'll want at least 10GB of storage for your VPS to accommodate the operating system, n8n data, and room for future growth. Most VPS plans come with 20GB+ which is more than sufficient.
Yes! Once n8n is running, you can access it from any device with a web browser by going to http://YOUR_SERVER_IP:5678. However, for better security and professional access, you should set up a domain name and HTTPS. Check out our guide on securing n8n with a domain and HTTPS.
Most modern VPS providers come with Docker pre-installed. If yours doesn't, you can install it with these commands: curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh. Then restart your SSH session and try the n8n installation again.
Your n8n data is stored in the Docker volume ~/.n8n. To backup, you can copy this folder: cp -r ~/.n8n ~/n8n-backup. For automated backups, consider setting up a cron job or using your VPS provider's backup service if available.
This happens because Docker containers don't automatically restart by default. To fix this, you can either manually restart n8n with the Docker command from Step 2, or set up auto-restart by adding --restart unless-stopped to your Docker run command.
Yes, but you'll need to use different ports for each instance. For example, run the first on port 5678 and the second on port 5679. Just make sure to change the port in the Docker command and use different volume names to keep the data separate.
n8n Cloud is the official hosted service - you pay monthly and everything is managed for you. Self-hosting gives you complete control, no monthly fees (just VPS costs), and unlimited workflows, but you're responsible for maintenance and security. For most users, self-hosting is more cost-effective and flexible.
You can monitor your server's resource usage with commands like htop (CPU/RAM) or df -h (disk space). n8n typically uses 200-500MB of RAM depending on your workflows. If you see high usage, consider upgrading your VPS plan or optimizing your workflows.