How to Install n8n v1.85 via Docker Compose vs Low Cost n8n Hosting
Learning how to install n8n on your own server requires configuring Docker containers, environment variables, reverse proxies like Traefik or Caddy, and persistent storage volumes. While building a self hosted n8n environment grants full control over your server configuration, managing database backups, SSL renewal, and core software updates adds substantial overhead. In this guide, we break down the step-by-step process of deploying n8n Community Edition v1.85 on Ubuntu 24.04 using Docker Compose v2.29, and compare it directly against managed n8n hosting solutions that remove administrative burden while keeping costs down.
Understanding How to Install n8n on Docker Compose v2.29
To run n8n on a Linux virtual private server, you need Docker Engine and Docker Compose installed. The core application runs as a Node.js process inside a container, utilizing PostgreSQL or SQLite to store workflow definitions, execution histories, and credential records. For production deployments, SQLite should be avoided because concurrent execution logging quickly causes file locking errors.
Start by updating your apt repository and installing Docker. Execute the following commands on a clean Ubuntu 24.04 instance:
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
Create a dedicated directory structure on your filesystem to store your docker-compose configuration file and persistent n8n volume data:
mkdir -p ~/n8n-docker/n8n_data ~/n8n-docker/postgres_data
cd ~/n8n-docker
Create a file named docker-compose.yml inside your ~/n8n-docker folder. Paste the following configuration to bring up PostgreSQL 16 along with n8n v1.85:
version: '3.8'
services:
postgres:
image: postgres:16-alpine
restart: always
environment:
- POSTGRES_USER=n8n_user
- POSTGRES_PASSWORD=DB_PASSWORD_CHANGE_ME
- POSTGRES_DB=n8n_db
volumes:
- ./postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U n8n_user -d n8n_db"]
interval: 5s
timeout: 5s
retries: 5
n8n:
image: docker.n8n.io/n8nio/n8n:1.85.0
restart: always
ports:
- "5678:5678"
environment:
- N8N_HOST=automation.yourdomain.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- NODE_ENV=production
- WEBHOOK_URL=https://automation.yourdomain.com/
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=n8n_db
- DB_POSTGRESDB_USER=n8n_user
- DB_POSTGRESDB_PASSWORD=DB_PASSWORD_CHANGE_ME
- EXECUTIONS_DATA_PRUNE=true
- EXECUTIONS_DATA_MAX_AGE=168
volumes:
- ./n8n_data:/home/node/.n8n
depends_on:
postgres:
condition: service_healthy
Launch the containers in detached mode using Docker Compose:
docker compose up -d
Verify that both containers are running properly by checking container status:
docker compose ps
Tip: Always set EXECUTIONS_DATA_PRUNE=true in your environment configuration. Without pruning enabled, successful workflow logs accumulate inside your PostgreSQL database, consuming tens of gigabytes of disk space within weeks.
Self Hosted n8n Maintenance: Backups, SSL, and Node Updates
Setting up the containers is only the first phase. Running a self hosted n8n instance in production means taking on full responsibility for system updates, security patches, reverse proxy routing, SSL certificate lifecycle management, and disaster recovery planning.
When hosting on your own server, you must set up Nginx, Caddy, or Traefik to handle incoming HTTPS requests on port 443 and forward them to port 5678. A basic Caddy configuration requires installing Caddy and pointing a DNS A record to your server IP address:
automation.yourdomain.com {
reverse_proxy localhost:5678
}
Beyond network routing, ongoing maintenance steps include:
- Database Backups: Scheduling daily
pg_dumpcron jobs to store relational tables, encryption keys, and workflow history on external storage like AWS S3 or Backblaze B2. - Core Application Upgrades: Regularly pulling new docker images, stopping containers, running migrations, and rolling back if a release breaks node compatibility or custom JavaScript scripts inside Code Node v2.
- Memory Monitoring: Setting up alert thresholds for Node.js memory limits. Large payload transformations in the JSON Parse or Item Lists node can cause V8 heap exhaustion and trigger fatal
ERR_OUT_OF_MEMORYcrashes. - SSL Maintenance: Keeping Certbot or Caddy automatic renewal daemons alive so webhooks don't suddenly fail with SSL handshake errors.
If your VPS runs out of storage space or experiences unexpected kernel panics, incoming webhook events from services like GitHub, Stripe, or WooCommerce fail without retry mechanisms unless handled externally. Managing these operational edge cases takes hours of administration every month.
Evaluating n8n Managed Hosting Features and Pricing Breakdown
For teams and freelancers who prefer building visual workflows rather than maintaining Linux servers, choosing n8n managed hosting eliminates infrastructural headaches completely. Instead of tuning Linux kernel parameters, configuring Docker bridge networks, or troubleshooting PostgreSQL connections, managed solutions provide a fully provisioned instance out of the box.
Using n8nautomation.cloud gives you access to a dedicated, high-performance environment running n8n Community Edition starting at just $4 per month. This pricing model provides significant savings compared to typical cloud VPS configurations, where server resources, block storage, bandwidth, and backup services add up quickly.
Key features provided by dedicated managed environments include:
- Instant Provisioning: Your dedicated instance starts up automatically with custom subdomain access like
yourname.n8nautomation.cloud. - Automatic Backups: Server-side backup snapshots run automatically, keeping your workflow configurations and instance data safe without manual cron scripts.
- Zero Server Management: System dependencies, Node.js runtime updates, and database maintenance are managed behind the scenes with guaranteed 24/7 uptime.
- Unrestricted Community Nodes: Run all 400+ default integrations alongside any custom community nodes installed directly through the n8n interface.
Low Cost n8n Hosting: Workflow Migration via API in Seconds
Switching from a local environment or self-managed VPS to a low cost n8n hosting provider used to involve manually exporting dozens of JSON files and re-uploading them item by item. Modern platforms simplify this process by providing dedicated migration utilities.
The built-in migration tool on n8nautomation.cloud transfers all your workflow structures from any existing n8n setup in seconds. The process works by making API calls between your old instance and your target instance:
- Generate a Public API key on your existing n8n server by navigating to Settings > n8n API.
- Copy your old instance URL (e.g.,
https://n8n.oldserver.com) and API key into the migration dashboard interface. - Enter your destination
n8nautomation.cloudinstance URL and target API key. - Trigger the automated transfer script to fetch, parse, and upload all active and inactive workflows.
For strict security and isolation standards, the migration tool deliberately migrates workflow node layouts and code logic while ignoring secret credentials. Once the workflow transfer completes, you simply reconnect your OAuth tokens, API keys, or database credentials directly inside the destination node parameters.
Additionally, users retain complete flexibility over custom branding and domains. You can update your instance domain anytime from the control dashboard, switching from your default yourname.n8nautomation.cloud address to a custom root domain or corporate subdomain with automated TLS certificate issuance.
Choosing the Best n8n Hosting Setup for Production Workflows
Selecting the best n8n hosting infrastructure depends heavily on your team's technical capacity, budget constraints, and debugging requirements. When complex workflows process thousands of payload items per hour using Webhook Node v1, Schedule Trigger Node, or OpenAI Code Node integrations, visibility into execution logs becomes essential.
When running self-hosted containers, inspecting real-time execution logs requires SSH access and executing Docker logs commands:
docker logs -f --tail 100 n8n-docker-n8n-1
In contrast, managed environments on n8nautomation.cloud include an integrated log viewer directly inside your cloud user dashboard. Advanced users can view application outputs, check memory usage trends, identify failing node executions, and review system-level log messages without leaving their browser.
Consider the functional comparison between hosting options:
- Setup Complexity: Self-hosting requires manual Docker installation, reverse proxy configuration, firewall setup, and domain DNS mapping. Managed hosting provisions dedicated instances immediately with pre-configured subdomains.
- Price Stability: VPS servers incur variable cloud provider costs, additional storage volume fees, and public IPv4 charges. Managed plans start at a flat $4/month with renewal prices locked in.
- Maintenance Overhead: Self-hosted instances demand continuous OS patching, SSL renewal checks, and database index maintenance. Managed hosting handles backend infrastructure automatically.
- Debugging Tools: Self-hosted installations require CLI log scraping. Dedicated cloud dashboards provide web-accessible real-time log streaming.
Whether you choose to maintain your own Docker installation on Linux or rely on dedicated managed hosting, n8n provides a versatile automation framework. For teams aiming to eliminate server operations while keeping costs predictable, managed cloud hosting provides the optimal path forward.
Related Posts
How to Install n8n with Docker Compose v2.29 on Ubuntu 24.04
Learn how to install n8n using Docker Compose v2.29 on Ubuntu 24.04, configure PostgreSQL 16, and evaluate self hosted n8n against low cost n8n hosting.
Solving n8n ERR_OUT_OF_MEMORY Crashes in v1.82 Data Pipelines
Learn how to fix n8n ERR_OUT_OF_MEMORY crashes in v1.82 pipelines using proper memory tuning, stream batching, and low cost n8n hosting options.
Automating Shopify Order Fulfillment with n8n Code Node v2
Learn how to process Shopify webhooks, verify HMAC signatures, and route order fulfillments using n8n Code Node v2 and managed n8n hosting options.