Debian, Nginx, UI Install Tutorial

Nginx Debian cloud-init

Alt text

I recently needed a simple load balancer for a couple of projects. I already run HAProxy, but I’m always happy to kick the tires on other tools.

This guide is a verified install doc that walks through setting up Nginx and its UI on Debian 12 (Bookworm). It may also work on Debian 11, but 12 is what this was tested on.

As you’ll see, I don’t force a specific OS in my builds. I aim for the least friction to “getting there.” Docker is obviously dead simple, but in my use case I’m not big on using it, especially when these VMs are already super lightweight.

That said, I do see the appeal of fully automated Nginx installs in Docker. That might be another article down the road.

  • Debian (minimal server)
  • nginx from Debian repos
  • Nginx UI (official upstream installer)

If you are cloning from a Proxmox Cloud-Init enabled template on the Proxmox host

qm clone 122 401 --name vm-name-01 --full 1

Then set (make sure no trailing spaces)

qm set 401 \
  --ciuser root \
  --cipassword 'passwordhere' \
  --hostname vm-name-01 \
  --ipconfig0 ip=xxx.xx.x.xx/xx ,gw=xxx.xx.x.x \
  --nameserver xxx.xxx.xx.x\
  --searchdomain domain.com
Assumptions Now
  • Fresh Debian 12 (Bookworm) or Debian 11
  • Root shell
  • No existing nginx or web UI installed

Verify OS:

cat /etc/os-release

Update base system

apt update
apt upgrade -y

Install required utilities (curl is required):

apt install -y curl ca-certificates gnupg lsb-release

Install nginx (official Debian package)

apt install -y nginx

Enable and start nginx:

systemctl enable --now nginx

Verify:

systemctl status nginx

Test in browser:

http://<server-ip>

You should see the “Welcome to nginx” page.


Note if your intent is to use stream do not install UI its not worth it. The UI does not support stream and the UI bind conflicts with stream.

Download Nginx UI installer (correct upstream URL)

Official, current installer source:

curl -fsSL https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh -o install.sh

(Recommended) Inspect before running

less install.sh

What this script does:

  • Detects CPU architecture

  • Downloads the correct release binary from GitHub Releases

  • Installs to /usr/local/bin/nginx-ui

  • Creates /etc/systemd/system/nginx-ui.service

  • Does NOT overwrite nginx configs

Run the installer

bash install.sh

When finished, it will report:

  • Installed binary location
  • Service name
  • Listening port (default: 9000)

Enable and start Nginx UI

systemctl enable --now nginx-ui

Verify:

systemctl status nginx-ui

Access Nginx UI

Default URL:

http://<server-ip>:9000

On first login you will:

  • Create an admin account
  • Confirm nginx binary path
  • Confirm config directories

Default nginx paths on Debian (IMPORTANT)

These are the correct Debian defaults and should be set once in Nginx UI → Settings:

Item Path
nginx binary /usr/sbin/nginx
main config /etc/nginx/nginx.conf
site configs /etc/nginx/sites-enabled/
available sites /etc/nginx/sites-available/

Firewall (if enabled)

If using ufw:

ufw allow 80
ufw allow 9000
ufw reload

Update strategy

Update Nginx UI

curl -fsSL https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh -o install.sh
bash install.sh
systemctl restart nginx-ui

Update nginx

apt upgrade

Final sanity check

nginx -t
systemctl is-active nginx
systemctl is-active nginx-ui

Both services should report active.

Its quick and gets the job done. Between using HAproxy and nginx, they both work, but I may be partial to HAProxy now.

Thanks for reading! -Christian


Next Post