Self-hosting n8n on Hostinger is a practical way to run automation workflows under your own control, with predictable server resources and direct access to configuration, backups, and security settings. This guide explains a reliable deployment path using a Hostinger VPS, Docker, Nginx, and HTTPS, which is suitable for small businesses, technical teams, freelancers, and serious personal projects.
TLDR: The most dependable way to self-host n8n on Hostinger is to use a VPS, install Docker, run n8n in a container, and place it behind Nginx with an SSL certificate. You should connect it to a domain or subdomain, enable basic security settings, and configure persistent storage so workflows are not lost. For production use, add regular backups, updates, and monitoring from the beginning.
Why Hostinger Is a Suitable Option for n8n
Hostinger offers VPS plans that are affordable and flexible enough for self-hosted automation. Since n8n can become resource-intensive depending on workflow volume, API calls, and scheduled executions, a VPS gives you more control than shared hosting. You can install system packages, configure Docker, manage firewall rules, and scale resources when needed.
For light usage, a VPS with 1–2 CPU cores and 2 GB RAM may be enough. For business workflows, frequent executions, webhook traffic, or multiple users, consider starting with 4 GB RAM or more. It is better to leave extra capacity than to troubleshoot failed automations caused by memory pressure.
Prerequisites Before You Begin
Before installing n8n, prepare the following:
- A Hostinger VPS running Ubuntu 22.04 or 24.04 LTS.
- Root or sudo SSH access to your server.
- A domain or subdomain, such as n8n.example.com.
- Basic command-line knowledge for editing files and running services.
- A plan for backups, especially if your workflows handle business-critical data.
After purchasing or activating your VPS, note the server IP address in the Hostinger control panel. You will use it to connect through SSH and to configure DNS.
Step 1: Point Your Domain to the VPS
In your DNS settings, create an A record for the subdomain you want to use. For example:
- Type: A
- Name: n8n
- Value: your VPS IP address
- TTL: default or automatic
DNS changes may take a few minutes, and sometimes longer, to propagate. You can continue with the server setup while waiting, but SSL configuration will only work once the domain resolves correctly.
Step 2: Connect to Your VPS
Open a terminal on your computer and connect to the server:
ssh root@your_server_ip
If Hostinger provided a different username, use that instead. Once connected, update the server packages:
apt update && apt upgrade -y
It is also sensible to create a non-root user for routine administration, but for a concise setup, the following commands can be run as root.
Step 3: Install Docker and Docker Compose
Docker is the recommended approach because it keeps n8n isolated and makes updates easier. Install the required packages:
apt install ca-certificates curl gnupg -y
Add Docker’s official repository and install Docker:
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
> /etc/apt/sources.list.d/docker.list
apt update
apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
Confirm the installation:
docker --version
docker compose version
Step 4: Create the n8n Docker Compose File
Create a directory for your n8n deployment:
mkdir -p /opt/n8n
cd /opt/n8n
Now create a docker-compose.yml file:
nano docker-compose.yml
Paste the following configuration, replacing the domain and secrets with your own values:
services:
n8n:
image: n8nio/n8n:latest
restart: always
ports:
- "5678:5678"
environment:
- N8N_HOST=n8n.example.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://n8n.example.com/
- GENERIC_TIMEZONE=UTC
- N8N_ENCRYPTION_KEY=replace_with_a_long_random_secret
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
The N8N_ENCRYPTION_KEY is important because n8n uses it to encrypt credentials. Store this key securely. If you lose it, connected credentials may become unusable after restoration or migration.
Start n8n:
docker compose up -d
Check that the container is running:
docker ps
Step 5: Install and Configure Nginx
Although n8n runs on port 5678, public production access should go through a reverse proxy. Install Nginx:
apt install nginx -y
Create a new Nginx configuration file:
nano /etc/nginx/sites-available/n8n
Add this configuration:
server {
listen 80;
server_name n8n.example.com;
location / {
proxy_pass http://127.0.0.1:5678;
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
chunked_transfer_encoding off;
}
}
Enable the site and test Nginx:
ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
nginx -t
systemctl reload nginx
Step 6: Add HTTPS with Let’s Encrypt
Install Certbot:
apt install certbot python3-certbot-nginx -y
Request an SSL certificate:
certbot --nginx -d n8n.example.com
Follow the prompts and choose the option to redirect HTTP to HTTPS if offered. Certbot usually configures automatic renewal, but you should confirm it:
systemctl status certbot.timer
Now visit https://n8n.example.com. You should see the n8n setup screen, where you can create the owner account.
Step 7: Secure the Installation
n8n stores sensitive credentials for services such as email, CRMs, databases, spreadsheets, and APIs. Treat it as a critical system, not a casual web app. At minimum, you should:
- Use a strong owner account password.
- Keep your N8N_ENCRYPTION_KEY private and backed up.
- Enable the Hostinger firewall or configure ufw to allow only necessary ports.
- Keep Docker images and system packages updated.
- Use HTTPS only for browser access and webhooks.
A simple firewall setup may look like this:
apt install ufw -y
ufw allow OpenSSH
ufw allow 'Nginx Full'
ufw enable
This exposes SSH and web traffic while keeping direct n8n container access unavailable from the public internet, assuming your Docker port is not otherwise exposed externally.
Step 8: Backups and Maintenance
Backups are not optional for a production n8n instance. Your workflows, execution history, credentials, and settings are stored in the Docker volume. Back up the volume regularly and keep copies outside the VPS.
To update n8n, go to the deployment directory and run:
cd /opt/n8n
docker compose pull
docker compose up -d
Before major updates, review n8n release notes and create a backup. This is especially important if you rely on complex workflows or community nodes.
Common Issues to Check
- Domain does not load: verify the DNS A record and confirm that Nginx is running.
- SSL certificate fails: make sure the domain points to the VPS before running Certbot.
- Webhook URLs are wrong: check WEBHOOK_URL, N8N_HOST, and N8N_PROTOCOL.
- Credentials stop working after migration: confirm that the same encryption key is used.
- Slow performance: inspect CPU, memory, workflow frequency, and execution history size.
Final Recommendations
Self-hosting n8n on Hostinger is straightforward if you approach it as a server deployment rather than a one-click experiment. Use Docker for consistency, Nginx for reverse proxying, Let’s Encrypt for SSL, and persistent volumes for data. For serious use, document your configuration, protect credentials, and test restores from backup before you actually need them.
Once the foundation is stable, n8n can become a dependable automation layer for lead handling, reporting, notifications, data synchronization, internal tools, and API-driven processes. A careful setup today will save substantial time and risk as your workflows grow.
yehiweb
Related posts
New Articles
AFDesign File Format Explained: How to Open, Edit, and Convert .afdesign Files
If you’ve ever downloaded a design template, collaborated with a designer, or archived a branding project, you may have come…