Self-hosting Flowise on a Hetzner Ubuntu Server

Self-hosting Flowise on a Hetzner Ubuntu Server

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
8 min

Want to build AI agents using Flowise but prefer to fully control your infrastructure? By self-hosting Flowise on a Ubuntu server, you can cut down costs and manage your data yourself!

Looking for something simpler? If you'd rather skip server management and deploy Flowise in just 1 minute for €9/month, check out our guide on how to deploy Flowise using Sliplane.

Follow along this easy-to-understand guide to learn how you can deploy your own Flowise instance using Docker and Caddy Web server for automatic HTTPS.

For this post, we're using an affordable server from Hetzner. Hetzner is known to provide great service at an exceptional price/performance ratio, making it an excellent choice for hosting AI applications like Flowise.

Prerequisites

Before we start, make sure you have a Hetzner Cloud account (or be ready to create one).

Step 1: Setup Your Hetzner Server

If you don't have a Hetzner server yet, follow these steps to create one (the video tutorial is attached below):

  1. Go to the Hetzner Cloud Console, choose a project or create a new one, then navigate to ServersAdd Server
  2. Follow Hetzner's guidelines to choose:
    • Server type: Select a server type that fits your needs.
    • Location: Choose a data center location closest to you or your users.
    • Image: Select Ubuntu (latest LTS version recommended).
  3. Add SSH key: Add your SSH public key for secure access. If you don't have an SSH key yet, you can generate one using ssh-keygen:
    ssh-keygen -t ed25519 -C "your_email@example.com"
    
  4. Click Create & Pay to provision your server

Once your server is created, note down its IP address. You'll use this to connect via SSH in the next step.

Step 2: Update Your Server

Open your terminal and log into your Ubuntu server via SSH:

ssh root@[your-IP-address]

and update the system to ensure it has the latest security patches and updates:

sudo apt-get update
sudo apt-get upgrade -y

Once finished, your server is ready for installing the software.

Step 3: Install and Configure UFW Firewall

Only keep necessary ports open: SSH (22), HTTP (80), HTTPS (443).

Install UFW and configure the firewall as follows:

sudo apt install ufw -y
sudo ufw allow 22    # SSH
sudo ufw allow 80    # HTTP
sudo ufw allow 443   # HTTPS
sudo ufw enable

Check your firewall configuration:

sudo ufw status verbose

Note: Docker can sometimes ignore UFW rules. To tackle this, verify extra settings as explained here.

Step 4: Docker Installation

Docker will be the container system running Flowise. Install Docker by running these commands:

Setup dependencies and Docker's GPG key:

sudo apt-get update
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 \
| sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

Add Docker repository:

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" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

Install Docker Engine and compose-plugin:

sudo apt-get install docker-ce docker-ce-cli \
containerd.io docker-buildx-plugin docker-compose-plugin -y

Check installation:

sudo docker run hello-world

If you see the "hello-world" message, Docker is ready.

Step 5: Installing Caddy for Automatic HTTPS

Caddy simplifies HTTPS configuration since it handles SSL certificates automatically from Let's Encrypt.

Install Caddy:

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl

curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' \
| sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg

curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' \
| sudo tee /etc/apt/sources.list.d/caddy-stable.list

sudo apt update
sudo apt install caddy -y

Before configuring Caddy, you need to point your domain to your server's IP address. If you haven't configured DNS yet, follow these steps:

Configure DNS for Your Domain

  1. Log into your domain registrar's dashboard (where you purchased your domain)
  2. Navigate to the DNS settings or DNS management section
  3. Add an A record with the following settings:
    • Type: A
    • Name: @ (for root domain) or a subdomain like flowise (for flowise.yourdomain.com)
    • Value/Target: Your Hetzner server's IPv4 address
  4. Add an AAAA record for IPv6 support:
    • Type: AAAA
    • Name: @ (for root domain) or the same subdomain you used for the A record
    • Value/Target: Your Hetzner server's IPv6 address

Note: DNS changes can take a few minutes to several hours to propagate. You can check if your DNS is configured correctly using tools like dig or online DNS checkers. Once the DNS record is active, you can proceed with Caddy configuration.

Configure Caddy

Edit the Caddyfile configuration file:

sudo nano /etc/caddy/Caddyfile

Enter your domain and configure reverse proxy. Replace "yourdomain.com" with your actual domain name:

Caddyfile
yourdomain.com {
    reverse_proxy localhost:3000
}

If no domain yet, use this temporarily:

Caddyfile
:80 {
    reverse_proxy localhost:3000
}

Restart Caddy to load the config:

sudo systemctl restart caddy

Step 6: Running Flowise with Docker Compose

We're going to use Docker Compose for easier setup. First create a directory for Flowise and navigate to it:

mkdir ~/flowise
cd ~/flowise

Create compose.yml with the following content:

compose.yml
services:
  flowise:
    image: flowiseai/flowise:3.0.12
    restart: always
    ports:
      - "3000:3000"
    volumes:
      - flowise_data:/root/.flowise
    environment:
      - DATABASE_PATH=/root/.flowise
      - SECRETKEY_PATH=/root/.flowise
      - LOG_PATH=/root/.flowise/logs
      - BLOB_STORAGE_PATH=/root/.flowise/storage

volumes:
  flowise_data:

This setup ensures:

  • Your database persists across container restarts
  • Secrets don't reset
  • Logs and file uploads are kept between restarts

Now deploy Flowise by running Docker compose:

sudo docker compose up -d

Docker pulls the Flowise image and runs it in background mode using port 3000.

Step 7: Accessing Your Self-Hosted Flowise Instance

Visit your domain in any web browser. Your Flowise instance should now load successfully at https://yourdomain.com. Follow the setup steps in the interface to complete your initial setup.

Security Recommendations

Public servers should always be secure. The following practises are recommended:

  • Regularly apply updates and security patches.
  • Set strong passwords and control user access.
  • Monitor server logs for suspicious activity.
  • Install tools like Fail2ban for extra security.

Updating your Flowise Installation

When you want to update your Flowise instance, first check the latest version on Docker Hub, then update the image version in your compose.yml file and run:

sudo docker compose pull
sudo docker compose up -d

Docker will download updated versions automatically and replace your current containers.

Cost Comparison with Other Providers

Self-hosting Flowise typically results in lower cost compared to hosted services:

ProvidervCPURAMDiskMonthly CostNote
Sliplane22 GB50 GB€22.80Flat rate, free egress, SSL included
Fly.io22 GB40 GB~$17.83Disk and bandwidth billed separately
Render12 GB40 GB~$355 GB bandwidth included on Hobby; disk billed separately
Railway22 GB40 GBUp to ~$66Usage-based; Pro required for a 40 GB volume
Click here to see how these numbers were calculated.

Prices checked July 19, 2026. Assuming an always-on instance running 730 hrs/month, Germany/Amsterdam where regional pricing applies, excluding VAT and egress.

  • Sliplane: Base server with 2 vCPU, 2 GB RAM and 20 GB storage = €17.80/month; the 50 GB storage tier adds €5 -> €22.80/month. Unlimited services, free egress and SSL are included.
  • Fly.io: in Amsterdam, shared-cpu-2x with 2 GB RAM = $11.83/month + 40 GB volume × $0.15/GB = $6 -> ~$17.83/month. Egress is billed separately at $0.02/GB in Europe.
  • Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/month. A Hobby workspace includes 5 GB bandwidth, then charges $0.15/GB. Stepping up to Pro compute (2 vCPU / 4 GB) costs $85/month plus disk.
  • Railway (Pro plan): at full resource usage: CPU 2 × $20/vCPU/month = $40; RAM 2 × $10/GB/month = $20; volume 40 × $0.15/GB/month = $6 -> up to ~$66/month. Actual CPU and RAM charges depend on usage. A 40 GB volume requires Pro; its $20/month subscription is a minimum commitment that counts toward usage, not an additional charge. Egress is $0.05/GB.

Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.

Bandwidth Cost Growth Comparison

Move the slider or play the animation to compare monthly egress costs. Sliplane stays free as traffic grows.

0 GB
Sliplane
Free
Fly.io
$0.00
Railway
$0.00
Render
$0.00

Egress only, excluding compute and storage. Based on public US/European rates checked July 19, 2026. Render includes its first 5 GB per month. Sliplane egress is free, subject to the Fair Use Policy.

You maintain complete control and avoid additional usage-based charges by self-hosting. But of course there is no free lunch and you're now responsible for managing your own server!

Deploy Flowise in minutes

If managing and securing your own server is a bit too much for you, check out how easy it is to deploy a managed instance of Flowise on Sliplane with one click!

Welcome to your cloud platform

Sliplane makes it simple to deploy and scale your apps in the cloud. Start with a container or your favorite framework and grow from there. Try it now and get started in minutes!