Windmill Print

  • 0

How to Install Windmill on Ubuntu 24.04 

 

Windmill is a powerful, self-hosted automation and workflow platform that enables teams to build, run, and schedule flows without relying on complex orchestration tools.
This guide explains how to install and run Windmill on Ubuntu 24.04 manually and configure it to start as a service.

 

Step 1: Update System Packages

 

Begin by updating the package index to ensure you’re using the latest package information:

sudo apt update -y

 

Step 2: Install Required Dependencies

 

Windmill requires a number of system tools, compilers, and libraries. Install them all with:

sudo apt install -y curl wget unzip build-essential pkg-config libssl-dev python3 python3-pip postgresql postgresql-contrib

These packages include PostgreSQL (the database backend), Python for certain integrations, and essential libraries for building Windmill.

 

Step 3: Install Node.js

 

Windmill uses Node.js for building front-end components. Add the NodeSource repository and install Node.js 20:

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt install -y nodejs

Verify the installation:

node -v
npm -v

 

Step 4: Install Deno Runtime

 

Deno is required to execute certain Windmill scripts. Download and install it manually:

wget https://github.com/denoland/deno/releases/latest/download/deno-x86_64-unknown-linux-gnu.zip -O /tmp/deno.zip
sudo unzip /tmp/deno.zip -d /usr/local/bin
sudo chmod +x /usr/local/bin/deno
rm /tmp/deno.zip

Confirm the installation:

deno --version

 

Step 5: Create a System User and Directory

 

It’s best practice to run Windmill under a dedicated system account for security and isolation:

sudo useradd -r -s /usr/sbin/nologin -d /opt/windmill windmill
sudo mkdir -p /opt/windmill
sudo chown windmill:windmill /opt/windmill

 

Step 6: Configure PostgreSQL Database

 

Start PostgreSQL and create the necessary users and databases:

sudo systemctl enable postgresql
sudo systemctl start postgresql

Switch to the PostgreSQL shell:

sudo -u postgres psql

Then run the following SQL commands:

CREATE USER windmill_admin WITH PASSWORD 'changeme' CREATEDB SUPERUSER;
CREATE USER windmill WITH PASSWORD 'changeme' CREATEDB;
DROP DATABASE IF EXISTS windmill;
CREATE DATABASE windmill OWNER windmill_admin;
GRANT ALL PRIVILEGES ON DATABASE windmill TO windmill;
\q

This sets up the Windmill database and user accounts.

 

Step 7: Download and Install Windmill

 
 

Fetch the latest release from the Windmill GitHub repository:

cd /opt/windmill
wget https://github.com/windmill-labs/windmill/releases/latest/download/windmill-amd64 -O windmill
sudo chmod +x windmill
sudo chown windmill:windmill windmill

 

Step 8: Create an Environment File

 

Create an environment file to define configuration settings:

sudo nano /etc/windmill.env

Add the following contents:

DATABASE_URL=postgresql://windmill_admin:changeme@localhost/windmill
BASE_URL=http://0.0.0.0:8000
MODE=standalone
SUPERADMIN_SECRET=supersecret
WORKER_GROUP=default
JSON_FMT=false

Save and exit (CTRL + O, ENTER, CTRL + X).

 

Step 9: Create a Systemd Service

 

To make Windmill run as a background service, create a systemd unit:

sudo nano /etc/systemd/system/windmill.service

Insert the following configuration:

[Unit]
Description=Windmill Workflow Engine
After=network.target postgresql.service
Requires=postgresql.service

[Service]
Type=simple
User=windmill
Group=windmill
EnvironmentFile=/etc/windmill.env
ExecStart=/opt/windmill/windmill
WorkingDirectory=/opt/windmill
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal

# Security hardening
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/opt/windmill

[Install]
WantedBy=multi-user.target

Save the file and reload systemd:

sudo systemctl daemon-reload
sudo systemctl enable windmill
sudo systemctl start windmill

 

Step 10: Access the Web Interface

 

Once Windmill is up, open your browser and navigate to:

http://<your-server-ip>:8000

Check generated files:

ls -l /opt/appwrite/appwrite

Conclusion

You’ve successfully installed and configured Windmill on Ubuntu 24.04.
Here’s what you accomplished:

  • Installed PostgreSQL, Node.js 20, and Deno

  • Created dedicated database users and schema

  • Downloaded the latest Windmill binary

  • Configured a secure systemd service for automatic startup

  • Exposed the Windmill web interface on port 8000

 

Windmill is now ready to automate workflows, run scripts, and orchestrate tasks seamlessly in your environment — fully self-hosted and production-ready.


Was this answer helpful?
Back