{"id":130730,"date":"2025-07-30T18:13:21","date_gmt":"2025-07-30T22:13:21","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=130730"},"modified":"2025-07-30T18:35:54","modified_gmt":"2025-07-30T22:35:54","slug":"how-to-self-host-n8n","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/","title":{"rendered":"How to Self-Host n8n with Docker on VPS"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS-1024x538.png\" alt=\"How to Self-Host n8n with Docker on InMotion Hosting VPS\" class=\"wp-image-130737\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS-1024x538.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS-300x158.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS-768x403.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS.png 1200w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>Automation is transforming how you run your business, and platforms like n8n are at the forefront of this shift. Whether you\u2019re prototyping a new idea, building a minimum viable product (MVP), or connecting services for large-scale, mission-critical workflows, n8n\u2019s open-source, no-code platform empowers you to create seamless automation. From crafting viral video content to managing massive outbound messaging campaigns, n8n\u2019s flexibility makes it a go-to tool for solutions engineers and vibe coders alike. By self-hosting n8n on InMotion Hosting\u2019s Virtual Private Server (VPS) plans, which support Docker, you gain full control over your workflows, data privacy, and customization without the recurring costs of cloud-based alternatives.<\/p>\n\n\n\n<p>In this guide, you\u2019ll learn how to self-host n8n using <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/working-with-docker-ultimate-guide\/\">Docker<\/a> on InMotion Hosting\u2019s VPS plans. We\u2019ll walk you through the setup process step-by-step, highlight common issues users face when self-hosting n8n, and provide practical workarounds tailored to InMotion Hosting\u2019s infrastructure. By the end, you\u2019ll have a secure, fully functional n8n instance ready to automate your workflows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Self-Host n8n Instead of Using Cloud Solutions<\/h2>\n\n\n\n<p>n8n Cloud imposes significant limitations that can stunt your automation growth. Their Starter plan restricts you to just 2,500 workflow executions per month with only 5 active workflows, while their Pro plan caps you at 10,000 executions with 15 active workflows. For businesses running complex automation campaigns, these limits become bottlenecks quickly.<\/p>\n\n\n\n<p>InMotion Hosting\u2019s <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\">VPS Hosting<\/a> plans eliminate these artificial constraints entirely. Your only limits are the server resources you choose, giving you the freedom to run unlimited workflows with unlimited executions. This translates to substantial cost savings for high-volume operations.<\/p>\n\n\n\n<p>Consider a business running automated outbound messaging campaigns. With n8n Cloud\u2019s Pro plan at $50 monthly, you\u2019re capped at 10,000 executions. If your campaign generates 15,000 message sends per month, you\u2019d need to upgrade to Enterprise pricing. With InMotion\u2019s VPS plans starting at competitive rates, you get unlimited executions plus full control over your data and infrastructure.<\/p>\n\n\n\n<p>The technical advantages extend beyond cost. Self-hosting provides complete customization freedom, allowing you to install custom nodes, modify configurations, and integrate with internal systems that cloud solutions can\u2019t access. You maintain data sovereignty, crucial for businesses handling sensitive information or operating under strict compliance requirements.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"870\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/n8n-pricing-2025-07-30-1024x870.jpg\" alt=\"n8n Cloud Pricing\" class=\"wp-image-130746\" style=\"width:531px;height:auto\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/n8n-pricing-2025-07-30-1024x870.jpg 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/n8n-pricing-2025-07-30-300x255.jpg 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/n8n-pricing-2025-07-30-768x652.jpg 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/n8n-pricing-2025-07-30.jpg 1200w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><figcaption class=\"wp-element-caption\">n8n Cloud Pricing<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Pre-Installation Planning and Requirements<\/h2>\n\n\n\n<p>Before diving into the technical setup, proper planning prevents the common pitfalls that derail many n8n self-hosting attempts. Based on community feedback and our experience supporting customers, most deployment failures stem from inadequate preparation rather than technical complexity.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites for Self-Hosting n8n<\/h3>\n\n\n\n<p>Before you begin, ensure your InMotion Hosting VPS meets the minimum requirements for running n8n:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Operating System<\/strong>: Ubuntu 20.04 or 22.04<\/li>\n\n\n\n<li><strong>Hardware<\/strong>: At least 4 vCPU and 8GB RAM for basic setups; 8 vCPU and 16GB RAM recommended for production environments.<\/li>\n\n\n\n<li><strong>Docker<\/strong>: Pre-installed on InMotion Hosting\u2019s VPS plans, but you\u2019ll need to verify it\u2019s active.<\/li>\n\n\n\n<li><strong>Domain Name (Optional)<\/strong>: A domain (e.g., n8n.yourdomain.com) for easier access and SSL setup.<\/li>\n\n\n\n<li><strong>SSH Access<\/strong>: Access to your VPS via SSH (default port 22 on InMotion Hosting servers).<\/li>\n\n\n\n<li><strong>Basic Tools<\/strong>: Familiarity with SSH (via Terminal on Mac\/Linux or PuTTY on Windows) and basic Linux commands.<\/li>\n<\/ul>\n\n\n\n<p>InMotion Hosting\u2019s VPS plans are <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/working-with-docker-ultimate-guide\/\">Docker compatible<\/a>, eliminating one of the most common setup hurdles. The minimum requirements for a stable n8n deployment include 2GB RAM, though we recommend starting with 4GB. CPU requirements are modest \u2013 even a single-core VPS can handle moderate automation loads, but multi-core configurations provide better performance for concurrent workflow executions.<\/p>\n\n\n\n<p>Storage needs vary dramatically based on your workflow complexity and data retention requirements. Plan for at least 10GB for the base installation, but factor in database growth if you\u2019re storing execution history or handling file operations. InMotion\u2019s VPS plans offer scalable storage options, allowing you to expand as your automation needs grow.<\/p>\n\n\n\n<p>Network considerations matter more than most realize. n8n workflows often involve API calls, webhook receivers, and file transfers. Ensure your VPS plan includes sufficient bandwidth for your expected traffic patterns. InMotion\u2019s network infrastructure provides reliable connectivity essential for webhook-dependent workflows.<\/p>\n\n\n\n<p>If you don\u2019t yet have a VPS, InMotion Hosting offers plans starting with 4 vCPU for small projects, with higher-tier options available for more demanding workflows. Dedicated Servers are also available with Docker support for enterprise-scale deployments.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Security Planning and SSH Configuration<\/h3>\n\n\n\n<p>InMotion Hosting VPS servers use port 22 as the default SSH port, which is open by default. While this simplifies initial access, security best practices recommend changing to a non-standard port to mitigate automated attacks. This change requires opening the new port in your firewall (such as APF or CSF), editing <code>\/etc\/ssh\/sshd_config<\/code> to specify the new port, and restarting the SSH service for changes to take effect.<\/p>\n\n\n\n<p>Document your security configurations during setup. Many users struggle later when they forget custom SSH ports or firewall rules, leading to lockouts during maintenance windows. Create a secure note with your server access details, custom ports, and emergency access procedures.<\/p>\n\n\n\n<p>Plan your SSL certificate strategy early. n8n requires HTTPS for production use, and webhook integrations demand valid certificates. Whether you choose Let\u2019s Encrypt automated certificates or custom SSL implementations, factor this into your initial setup timeline.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-Step Guide to Self-Hosting n8n with Docker<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"540\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/n8n-demo.gif\" alt=\"Animated gif showing the terminal and n8n web interface\" class=\"wp-image-130740\"><figcaption class=\"wp-element-caption\">Source: <a href=\"https:\/\/github.com\/n8n-io\/self-hosted-ai-starter-kit\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">n8n github<\/a><\/figcaption><\/figure>\n\n\n\n<p>Follow these detailed steps to set up n8n on your InMotion Hosting VPS using Docker. This guide assumes you\u2019re using an Ubuntu-based VPS with Docker pre-installed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Connect to Your VPS<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Access Your VPS via SSH<\/strong>: Log in to your InMotion Hosting account and navigate to the VPS dashboard in cPanel or AMP. Find your server\u2019s IP address and SSH credentials.\n<ul class=\"wp-block-list\">\n<li>Open a terminal (Mac\/Linux) or PuTTY (Windows).<\/li>\n\n\n\n<li>Run: <code>ssh root@your_server_ip<\/code> (replace <code>your_server_ip<\/code> with your VPS IP).<\/li>\n\n\n\n<li>Enter your root password when prompted.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Update Your System<\/strong>: Ensure your server is up to date to avoid compatibility issues.\n<ul class=\"wp-block-list\">\n<li>Run: <code>apt update &amp;&amp; apt upgrade -y<\/code><\/li>\n\n\n\n<li>This updates package lists and installs the latest security patches.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Verify Docker Installation<\/h3>\n\n\n\n<p>InMotion Hosting\u2019s VPS plans come with Docker pre-installed, but you should confirm it\u2019s active.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Check Docker Version<\/strong>: Run <code>docker --version<\/code> to verify Docker is installed.\n<ul class=\"wp-block-list\">\n<li>Expected output: <code>Docker version 20.x.x<\/code> or similar.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Start Docker Service<\/strong>: If Docker isn\u2019t running, start it with:\n<ul class=\"wp-block-list\">\n<li><code>systemctl start docker<\/code><\/li>\n\n\n\n<li>Enable it to run on boot: <code>systemctl enable docker<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Test Docker<\/strong>: Run <code>docker run hello-world<\/code> to confirm Docker is functioning. You should see a confirmation message.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Install n8n Using Docker<\/h3>\n\n\n\n<p>n8n recommends using Docker for self-hosted deployments due to its simplicity and portability. We\u2019ll use Docker Compose for persistent data storage and easier configuration.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Install Docker Compose<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Check if Docker Compose is installed: <code>docker-compose --version<\/code><\/li>\n\n\n\n<li>If not installed, install it: <code>apt install docker-compose -y<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Create a Docker Compose File<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Create a directory for n8n: <code>mkdir ~\/n8n &amp;&amp; cd ~\/n8n<\/code><\/li>\n\n\n\n<li>Create a file named <code>docker-compose.yml<\/code>: <code>nano docker-compose.yml<\/code><\/li>\n\n\n\n<li>Paste the following configuration (from n8n\u2019s official documentation):<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>version: \"3\"\nservices:\n  n8n:\n    image: n8nio\/n8n\n    ports:\n      - \"5678:5678\"\n    environment:\n      - N8N_BASIC_AUTH_ACTIVE=true\n      - N8N_BASIC_AUTH_USER=your_username\n      - N8N_BASIC_AUTH_PASSWORD=your_password\n      - N8N_HOST=yourdomain.com\n      - N8N_PORT=5678\n      - WEBHOOK_URL=https:\/\/yourdomain.com\/\n      - GENERIC_TIMEZONE=UTC\n    volumes:\n      - ~\/.n8n:\/home\/node\/.n8n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #85E89D\">version<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">\"3\"<\/span><\/span>\n<span class=\"line\"><span style=\"color: #85E89D\">services<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">n8n<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">n8nio\/n8n<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">ports<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">\"5678:5678\"<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">environment<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_BASIC_AUTH_ACTIVE=true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_BASIC_AUTH_USER=your_username<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_BASIC_AUTH_PASSWORD=your_password<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_HOST=yourdomain.com<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_PORT=5678<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">WEBHOOK_URL=https:\/\/yourdomain.com\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GENERIC_TIMEZONE=UTC<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">~\/.n8n:\/home\/node\/.n8n<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace <code>your_username<\/code>,<code> your_password<\/code>, and <code>yourdomain.com<\/code> with your desired credentials and domain (or server IP if no domain is used).<\/li>\n\n\n\n<li>Save and exit: Press <strong>Ctrl+O<\/strong>, <strong>Enter<\/strong>, then <strong>Ctrl+X<\/strong>.<\/li>\n<\/ul>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Set File Permissions<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Ensure the <code>.n8n<\/code> directory has correct permissions: <code>chown -R 1000:1000 ~\/.n8n &amp;&amp; chmod -R 755 ~\/.n8n<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Start n8n<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Run: <code>docker-compose up -d<\/code><\/li>\n\n\n\n<li>This starts n8n in detached mode. Verify it\u2019s running: <code>docker ps<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Access the n8n Dashboard<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Open n8n in Your Browser<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Navigate to <strong>http:\/\/your_server_ip:5678<\/strong> or <strong>https:\/\/yourdomain.com<\/strong> if you\u2019ve set up a domain and SSL.<\/li>\n\n\n\n<li>Log in with the <strong>username<\/strong> and <strong>password<\/strong> defined in the <code>docker-compose.yml<\/code> file.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Complete Setup<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Follow the on-screen instructions to create an n8n owner account.<\/li>\n\n\n\n<li>You\u2019ll land on the n8n dashboard, where you can start building workflows.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Secure Your n8n Instance<\/h3>\n\n\n\n<p>Security is critical when self-hosting n8n, as misconfigurations can expose your workflows to the internet. InMotion Hosting\u2019s VPS servers use port 22 for SSH by default, but you\u2019ll need to secure both SSH and n8n.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Change the Default SSH Port<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Open the SSH configuration file: <code>nano \/etc\/ssh\/sshd_config<\/code><\/li>\n\n\n\n<li>Find the line <code>#Port 22<\/code> and change it to a non-standard port (e.g., <code>Port 2222<\/code>).<\/li>\n\n\n\n<li>Save and exit.<\/li>\n\n\n\n<li>Open the new port in the firewall: <br><code>ufw allow 2222\/tcp <\/code><br><code>ufw deny 22 <\/code><br><code>ufw enable<\/code><\/li>\n\n\n\n<li>Restart the SSH service: <code>systemctl restart sshd<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Set Up SSL for n8n<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Obtain an SSL certificate using Let\u2019s Encrypt:<br><code>apt install certbot python3-certbot-nginx -y <\/code><br><code>certbot --nginx -d yourdomain.com<\/code><\/li>\n\n\n\n<li>Update the <code>docker-compose.yml<\/code> file to use HTTPS by setting <code>WEBHOOK_URL=https:\/\/yourdomain.com\/<\/code>.<\/li>\n\n\n\n<li>Restart n8n: <code>docker-compose down &amp;&amp; docker-compose up -d<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Restrict n8n Access<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Limit access to n8n by binding it to a private network or specific IP:\n<ul class=\"wp-block-list\">\n<li>Edit <code>docker-compose.yml<\/code> to add <code>network_mode: host<\/code> and bind to <code>127.0.0.1:5678<\/code>.<\/li>\n\n\n\n<li>Use a reverse proxy like Nginx to manage external access securely.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Complete Docker Compose Configuration<\/h2>\n\n\n\n<p>Create your <code>docker-compose.yml<\/code> file with the following production-ready configuration.<\/p>\n\n\n\n<p>This configuration addresses several common deployment failures. The health check ensures PostgreSQL is ready before n8n attempts connections. Traefik handles SSL certificate automation, eliminating manual certificate management. Volume mounts provide data persistence across container restarts.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>version: '3.8'\n\nservices:\n  traefik:\n    image: traefik:v2.9\n    restart: unless-stopped\n    command:\n      - --api=true\n      - --api.insecure=true\n      - --providers.docker=true\n      - --providers.docker.exposedbydefault=false\n      - --entrypoints.websecure.address=:443\n      - --certificatesresolvers.mytlschallenge.acme.tlschallenge=true\n      - --certificatesresolvers.mytlschallenge.acme.email=${EMAIL}\n      - --certificatesresolvers.mytlschallenge.acme.storage=\/letsencrypt\/acme.json\n    ports:\n      - 443:443\n      - 80:80\n    volumes:\n      - traefik_data:\/letsencrypt\n      - \/var\/run\/docker.sock:\/var\/run\/docker.sock:ro\n\n  n8n:\n    image: n8nio\/n8n:latest\n    restart: unless-stopped\n    environment:\n      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}\n      - TZ=${GENERIC_TIMEZONE}\n      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}\n      - N8N_PORT=443\n      - N8N_PROTOCOL=https\n      - NODE_ENV=production\n      - WEBHOOK_URL=https:\/\/${SUBDOMAIN}.${DOMAIN_NAME}\/\n      - N8N_BASIC_AUTH_ACTIVE=${N8N_BASIC_AUTH_ACTIVE}\n      - N8N_BASIC_AUTH_USER=${N8N_BASIC_AUTH_USER}\n      - N8N_BASIC_AUTH_PASSWORD=${N8N_BASIC_AUTH_PASSWORD}\n      - DB_TYPE=${DB_TYPE}\n      - DB_POSTGRESDB_DATABASE=${DB_POSTGRESDB_DATABASE}\n      - DB_POSTGRESDB_HOST=${DB_POSTGRESDB_HOST}\n      - DB_POSTGRESDB_PORT=${DB_POSTGRESDB_PORT}\n      - DB_POSTGRESDB_USER=${DB_POSTGRESDB_USER}\n      - DB_POSTGRESDB_PASSWORD=${DB_POSTGRESDB_PASSWORD}\n    volumes:\n      - n8n_data:\/home\/node\/.n8n\n      - .\/local-files:\/files\n    labels:\n      - traefik.enable=true\n      - traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)\n      - traefik.http.routers.n8n.tls=true\n      - traefik.http.routers.n8n.entrypoints=websecure\n      - traefik.http.routers.n8n.tls.certresolver=mytlschallenge\n    depends_on:\n      - db\n      - traefik\n\n  db:\n    image: postgres:13\n    restart: unless-stopped\n    environment:\n      - POSTGRES_USER=${DB_POSTGRESDB_USER}\n      - POSTGRES_PASSWORD=${DB_POSTGRESDB_PASSWORD}\n      - POSTGRES_DB=${DB_POSTGRESDB_DATABASE}\n    volumes:\n      - db_data:\/var\/lib\/postgresql\/data\n    healthcheck:\n      test: [\"CMD-SHELL\", \"pg_isready -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE}\"]\n      interval: 10s\n      timeout: 5s\n      retries: 5\n\nvolumes:\n  traefik_data:\n  n8n_data:\n  db_data:<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #85E89D\">version<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">'3.8'<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #85E89D\">services<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">traefik<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">traefik:v2.9<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">restart<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">unless-stopped<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">command<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">--api=true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">--api.insecure=true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">--providers.docker=true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">--providers.docker.exposedbydefault=false<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">--entrypoints.websecure.address=:443<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">--certificatesresolvers.mytlschallenge.acme.tlschallenge=true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">--certificatesresolvers.mytlschallenge.acme.email=${EMAIL}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">--certificatesresolvers.mytlschallenge.acme.storage=\/letsencrypt\/acme.json<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">ports<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">443:443<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">80:80<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">traefik_data:\/letsencrypt<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">\/var\/run\/docker.sock:\/var\/run\/docker.sock:ro<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">n8n<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">n8nio\/n8n:latest<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">restart<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">unless-stopped<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">environment<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GENERIC_TIMEZONE=${GENERIC_TIMEZONE}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">TZ=${GENERIC_TIMEZONE}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_PORT=443<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_PROTOCOL=https<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">NODE_ENV=production<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">WEBHOOK_URL=https:\/\/${SUBDOMAIN}.${DOMAIN_NAME}\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_BASIC_AUTH_ACTIVE=${N8N_BASIC_AUTH_ACTIVE}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_BASIC_AUTH_USER=${N8N_BASIC_AUTH_USER}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">N8N_BASIC_AUTH_PASSWORD=${N8N_BASIC_AUTH_PASSWORD}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">DB_TYPE=${DB_TYPE}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">DB_POSTGRESDB_DATABASE=${DB_POSTGRESDB_DATABASE}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">DB_POSTGRESDB_HOST=${DB_POSTGRESDB_HOST}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">DB_POSTGRESDB_PORT=${DB_POSTGRESDB_PORT}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">DB_POSTGRESDB_USER=${DB_POSTGRESDB_USER}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">DB_POSTGRESDB_PASSWORD=${DB_POSTGRESDB_PASSWORD}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">n8n_data:\/home\/node\/.n8n<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">.\/local-files:\/files<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">labels<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">traefik.enable=true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">traefik.http.routers.n8n.tls=true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">traefik.http.routers.n8n.entrypoints=websecure<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">traefik.http.routers.n8n.tls.certresolver=mytlschallenge<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">depends_on<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">db<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">traefik<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">db<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">postgres:13<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">restart<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">unless-stopped<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">environment<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">POSTGRES_USER=${DB_POSTGRESDB_USER}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">POSTGRES_PASSWORD=${DB_POSTGRESDB_PASSWORD}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">POSTGRES_DB=${DB_POSTGRESDB_DATABASE}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">db_data:\/var\/lib\/postgresql\/data<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">healthcheck<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #85E89D\">test<\/span><span style=\"color: #E1E4E8\">: [<\/span><span style=\"color: #9ECBFF\">\"CMD-SHELL\"<\/span><span style=\"color: #E1E4E8\">, <\/span><span style=\"color: #9ECBFF\">\"pg_isready -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE}\"<\/span><span style=\"color: #E1E4E8\">]<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #85E89D\">interval<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">10s<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #85E89D\">timeout<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">5s<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #85E89D\">retries<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #79B8FF\">5<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">traefik_data<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">n8n_data<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">db_data<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Common Issues and Workarounds<\/h2>\n\n\n\n<p>Self-hosting n8n can present challenges, especially for users new to server management. Based on community feedback and web research, here are common issues and workarounds tailored to InMotion Hosting\u2019s VPS plans:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Steep Learning Curve for Server Setup<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>Issue<\/strong>: Users often struggle with command-line interfaces, Docker setup, and server configuration due to limited technical expertise.<\/li>\n\n\n\n<li><strong>Workaround<\/strong>: InMotion Hosting\u2019s VPS plans simplify this with pre-installed Docker. Use the one-click Docker Compose setup above to avoid manual Node.js installations. InMotion Hosting\u2019s support team can assist with basic VPS troubleshooting, reducing the learning curve.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Security Risks from Exposed Ports<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>Issue<\/strong>: By default, n8n runs on port 5678 without authentication, potentially exposing your instance to attackers if your VPS has a public IP.<\/li>\n\n\n\n<li><strong>Workaround<\/strong>: Enable basic authentication in the <code>docker-compose.yml<\/code> file as shown above. Change the SSH port and use InMotion Hosting\u2019s firewall (via ufw) to restrict access to trusted IPs. Set up a reverse proxy with NGINX and SSL to encrypt traffic.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Performance Bottlenecks with Growing Workflows<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>Issue<\/strong>: As workflows scale, a basic VPS may struggle with CPU or memory limitations, causing slowdowns or crashes.<\/li>\n\n\n\n<li><strong>Workaround<\/strong>: Start with InMotion Hosting\u2019s 4 vCPU plan. You can also configure PostgreSQL for increased connection pooling and memory allocation. Add these parameters to your database configuration:<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>db:\n  image: postgres:13\n  command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all -c max_connections=200\n  environment:\n    - POSTGRES_USER=${DB_POSTGRESDB_USER}\n    - POSTGRES_PASSWORD=${DB_POSTGRESDB_PASSWORD}\n    - POSTGRES_DB=${DB_POSTGRESDB_DATABASE}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #85E89D\">db<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">postgres:13<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">command<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all -c max_connections=200<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">environment<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    - <\/span><span style=\"color: #9ECBFF\">POSTGRES_USER=${DB_POSTGRESDB_USER}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    - <\/span><span style=\"color: #9ECBFF\">POSTGRES_PASSWORD=${DB_POSTGRESDB_PASSWORD}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    - <\/span><span style=\"color: #9ECBFF\">POSTGRES_DB=${DB_POSTGRESDB_DATABASE}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Lack of Collaboration Features<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>Issue<\/strong>: The n8n Community Edition lacks built-in collaboration tools, making it hard for teams to co-edit workflows.<\/li>\n\n\n\n<li><strong>Workaround<\/strong>: Use InMotion Hosting\u2019s VPS to host a Git repository for manual version control. Share workflow JSON files among team members via secure channels. For advanced features, consider n8n\u2019s Enterprise Edition on a Dedicated Server.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Maintenance Overhead<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>Issue<\/strong>: Keeping n8n, Docker, and the OS updated requires ongoing effort, which can be time-consuming.<\/li>\n\n\n\n<li><strong>Workaround<\/strong>: Automate updates using a cron job:<br><code>crontab -e 0 2 * * * apt update &amp;&amp; apt upgrade -y &amp;&amp; docker-compose -f ~\/n8n\/docker-compose.yml pull &amp;&amp; docker-compose -f ~\/n8n\/docker-compose.yml up -d<\/code><br>This runs daily updates at 2 AM. InMotion Hosting\u2019s 99.9% uptime guarantee ensures minimal disruption during maintenance.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Benefits of Self-Hosting n8n with InMotion Hosting<\/h2>\n\n\n\n<p>By self-hosting n8n on InMotion Hosting\u2019s VPS, you unlock several advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cost Savings<\/strong>: Pay for powerful yet flexible VPS hosting and run unlimited workflows, unlike cloud plans with per-execution fees.<\/li>\n\n\n\n<li><strong>Data Control<\/strong>: Keep sensitive data on your server, meeting compliance needs for industries like healthcare or finance.<\/li>\n\n\n\n<li><strong>Customization<\/strong>: Build custom nodes to integrate with internal systems or APIs, leveraging n8n\u2019s extensibility.<\/li>\n\n\n\n<li><strong>Performance<\/strong>: InMotion Hosting\u2019s high-performance CPUs and SSD storage ensure smooth workflow execution, even for complex tasks like AI-driven content creation or messaging campaigns.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Wrap Up<\/h2>\n\n\n\n<p>With n8n running on your InMotion Hosting VPS, you\u2019re ready to automate tasks like syncing databases, managing social media, or building AI-powered workflows. Explore n8n\u2019s node-based interface to connect over 400 applications, from Google Sheets to Slack. If you hit roadblocks, InMotion Hosting\u2019s support team and <a href=\"https:\/\/community.n8n.io\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">n8n\u2019s community forums<\/a> are valuable resources.<\/p>\n\n\n\n<p>To get started, sign up for an InMotion Hosting <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\">VPS Hosting<\/a> plan, follow the steps above, and begin automating your workflows today. See how InMotion\u2019s infrastructure provides the flexibility and performance your organization needs to automate efficiently and scale effectively.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\">\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">How much does it cost to self-host n8n compared to n8n Cloud?<\/h3>\n\n\n\n<p>Self-hosting n8n on InMotion\u2019s VPS plans typically costs significantly less for high-volume operations. n8n Cloud\u2019s Pro plan costs $50 monthly for 10,000 executions and 15 active workflows. With unlimited executions on a VPS, businesses running 20,000+ monthly executions can save hundreds of dollars while gaining complete control over their infrastructure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I run multiple n8n instances on one VPS?<\/h3>\n\n\n\n<p>Yes, you can run multiple n8n instances on a single InMotion Hosting VPS by using different ports or domains for each instance. Create separate Docker Compose files (e.g., <code>docker-compose-instance1.yml<\/code>, <code>docker-compose-instance2.yml<\/code>) with unique port mappings (e.g., <code>5678:5678<\/code> for one, <code>5679:5679<\/code> for another). Ensure your VPS has enough resources. InMotion Hosting\u2019s support can help verify resource allocation to prevent conflicts.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What if I encounter Docker-related errors during setup?<\/h3>\n\n\n\n<p>If Docker fails to start or n8n doesn\u2019t run, check the Docker service status: <code>systemctl status docker.<\/code> Ensure Docker Compose is installed (<code>docker-compose --version<\/code>). If the n8n container crashes, view logs with docker logs <code>&lt;container_id&gt;<\/code> (find the container ID with <code>docker ps -a<\/code>). Common issues include incorrect permissions on the <code>~\/.n8n<\/code> directory or port conflicts. Fix permissions with <code>chown -R 1000:1000 ~\/.n8n<\/code> and verify port 5678 is free with <code>netstat -tuln | grep 5678<\/code>. InMotion Hosting\u2019s support team can assist with Docker troubleshooting.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I back up my n8n workflows?<\/h3>\n\n\n\n<p>To back up your n8n workflows, export them as JSON files from the n8n dashboard (Workflows &gt; Download). Store these files securely on your InMotion Hosting VPS or an external service like Google Drive. For persistent data, the <code>~\/.n8n <\/code>directory (mapped in the Docker Compose file) contains your database and configurations. Back it up regularly with:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>tar -czf n8n_backup_$(date +%F).tar.gz ~\/.n8n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">tar<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-czf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">n8n_backup_$(<\/span><span style=\"color: #B392F0\">date<\/span><span style=\"color: #9ECBFF\"> +%F).tar.gz<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">~\/.n8n<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Copy the backup to a secure location using <code>scp<\/code> or InMotion Hosting\u2019s file manager. Automate backups with a cron job for consistency.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How often should I update my self-hosted n8n installation?<\/h3>\n\n\n\n<p>n8n releases new versions weekly, but you don\u2019t need to update immediately. Establish a monthly update schedule for minor versions and test updates in a staging environment before applying to production. Monitor the n8n community forums and GitHub releases for security updates that require immediate attention.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I scale my n8n deployment as my automation needs grow?<\/h3>\n\n\n\n<p>InMotion\u2019s VPS plans support vertical scaling by adding CPU, RAM, and storage resources without service interruption. For extreme scale requirements, implement n8n\u2019s queue mode with multiple worker containers. This horizontal scaling approach distributes workflow execution across multiple processes, supporting virtually unlimited automation capacity.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to automate workflows with n8n without cloud costs? Discover how to self-host n8n using Docker on InMotion Hosting\u2019s VPS plans. This guide walks you through setup, security, and troubleshooting, empowering you to build everything from MVPs to mission-critical automation with full control.<\/p>\n","protected":false},"author":56983,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4611],"tags":[],"class_list":["post-130730","post","type-post","status-publish","format-standard","hentry","category-ai-tools"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Self-Host n8n with Docker on InMotion Hosting VPS<\/title>\n<meta name=\"description\" content=\"Learn to self-host n8n on InMotion Hosting\u2019s VPS with Docker. Follow our step-by-step guide to set up secure, scalable workflows for automation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Self-Host n8n with Docker on InMotion Hosting VPS\" \/>\n<meta property=\"og:description\" content=\"Learn to self-host n8n on InMotion Hosting\u2019s VPS with Docker. Follow our step-by-step guide to set up secure, scalable workflows for automation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-30T22:13:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-30T22:35:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Carrie Smaha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@carriesmaha\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Carrie Smaha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/\"},\"author\":{\"name\":\"Carrie Smaha\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8\"},\"headline\":\"How to Self-Host n8n with Docker on VPS\",\"datePublished\":\"2025-07-30T22:13:21+00:00\",\"dateModified\":\"2025-07-30T22:35:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/\"},\"wordCount\":2380,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS-1024x538.png\",\"articleSection\":[\"AI Tools\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/\",\"name\":\"How to Self-Host n8n with Docker on InMotion Hosting VPS\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS-1024x538.png\",\"datePublished\":\"2025-07-30T22:13:21+00:00\",\"dateModified\":\"2025-07-30T22:35:54+00:00\",\"description\":\"Learn to self-host n8n on InMotion Hosting\u2019s VPS with Docker. Follow our step-by-step guide to set up secure, scalable workflows for automation.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS.png\",\"width\":1200,\"height\":630,\"caption\":\"How to Self-Host n8n with Docker on InMotion Hosting VPS\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Self-Host n8n with Docker on VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8\",\"name\":\"Carrie Smaha\",\"description\":\"Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/carriesmaha\/\",\"https:\/\/x.com\/carriesmaha\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/carries\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Self-Host n8n with Docker on InMotion Hosting VPS","description":"Learn to self-host n8n on InMotion Hosting\u2019s VPS with Docker. Follow our step-by-step guide to set up secure, scalable workflows for automation.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/","og_locale":"en_US","og_type":"article","og_title":"How to Self-Host n8n with Docker on InMotion Hosting VPS","og_description":"Learn to self-host n8n on InMotion Hosting\u2019s VPS with Docker. Follow our step-by-step guide to set up secure, scalable workflows for automation.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2025-07-30T22:13:21+00:00","article_modified_time":"2025-07-30T22:35:54+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS.png","type":"image\/png"}],"author":"Carrie Smaha","twitter_card":"summary_large_image","twitter_creator":"@carriesmaha","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Carrie Smaha","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/"},"author":{"name":"Carrie Smaha","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8"},"headline":"How to Self-Host n8n with Docker on VPS","datePublished":"2025-07-30T22:13:21+00:00","dateModified":"2025-07-30T22:35:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/"},"wordCount":2380,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS-1024x538.png","articleSection":["AI Tools"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/","name":"How to Self-Host n8n with Docker on InMotion Hosting VPS","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS-1024x538.png","datePublished":"2025-07-30T22:13:21+00:00","dateModified":"2025-07-30T22:35:54+00:00","description":"Learn to self-host n8n on InMotion Hosting\u2019s VPS with Docker. Follow our step-by-step guide to set up secure, scalable workflows for automation.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2025\/07\/How-to-Self-Host-n8n-with-Docker-on-InMotion-Hosting-VPS.png","width":1200,"height":630,"caption":"How to Self-Host n8n with Docker on InMotion Hosting VPS"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/how-to-self-host-n8n\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Self-Host n8n with Docker on VPS"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8","name":"Carrie Smaha","description":"Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth.","sameAs":["https:\/\/www.linkedin.com\/in\/carriesmaha\/","https:\/\/x.com\/carriesmaha"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/carries\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4611,"name":"AI Tools","slug":"ai-tools","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/ai-tools\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/130730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/56983"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=130730"}],"version-history":[{"count":11,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/130730\/revisions"}],"predecessor-version":[{"id":130749,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/130730\/revisions\/130749"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=130730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=130730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=130730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}