Step-by-Step Guide: Installing and Hosting n8n on Ubuntu 22.04

Looking to streamline your workflows with n8n while keeping full control over your data and infrastructure? By self-hosting n8n on an Ubuntu Linux server, you not only reduce costs but also gain complete ownership of your automation environment.

In this step-by-step guide, we’ll walk you through deploying your own n8n instance using Docker along with Caddy web server for automatic HTTPS, making your setup secure and production-ready.

Before you begin, ensure that you have:

  • A running Ubuntu Linux server (OVH is a great choice, but any VPS with a public IP will work).
  • Basic familiarity with SSH commands to access your server.
Step 1: Update Your Server

hostnamectl set-hostname n8n.inboxlines.com

# sudo apt-get update

Step 2: Docker Installation

# sudo apt-get install ca-certificates curl gnupg

#sudo install -m 0755 -d /etc/apt/keyrings

#curl -fsSL https://download.docker.com/linux/ubuntu/gpg \