To self-host Nginx UI on a managed VPS is to manage Nginx from your browser, on a server which our teams keep up to date and monitor day and night. Nginx UI is an open source web interface for Nginx under the AGPL-3.0 license, with a configuration editor, certificates, logs and backups. A panel that writes the configuration of a web server deserves care, so this guide creates the administrator before anything is reachable and keeps the panel off the Internet. It follows the official Docker image at version v3.0.9, and we tested it on a Simafri VPS before writing it: installation, HTTPS, a first site, backup, restore and update.
By Simon Vasconcelos Lee
Published on 6 December 202610 minute read
uozi/nginx-ui contains both Nginx and its interface: Nginx UI manages the Nginx inside its container.127.0.0.1 only, serve it over HTTPS from its own Nginx, and reach it through an SSH tunnel.data folder with the container stopped, then update by changing the image tag.Nginx UI is written in Go and Vue and distributed as a single binary, or as a Docker image built on the official Nginx image. It reads and writes standard Nginx files, in the sites-available and sites-enabled layout of Debian.
Nginx UI is published under the GNU Affero General Public License v3.0. You can run it free of charge, for your company or your clients, study it and modify it. If you modify it and let people use your version over a network, you must offer them its source code. The software comes without warranty.
Here is what we measured on our test VPS, with one site:
The smallest size is enough to start: a Simafri Managed VPS Pro 1, with 1 vCPU, 2 GB of memory and 20 GB of NVMe storage, at US$19.99 per month excl. tax. Move up when the sites behind Nginx need it.
The official image can replace the Nginx of a server by taking its ports 80 and 443. Here it stays in its container, on local ports, so it can live beside a web server that is already running. On a server with Docker Engine and its Compose plugin, create the folder /opt/nginx-ui:
mkdir -p /opt/nginx-ui
Put this compose.yaml in it:
services:
nginx-ui:
image: uozi/nginx-ui:v3.0.9
restart: unless-stopped
environment:
NGINX_UI_SERVER_RUN_MODE: release
NGINX_UI_IGNORE_DOCKER_SOCKET: "true"
NGINX_UI_NODE_SKIP_INSTALLATION: "true"
NGINX_UI_PREDEFINED_USER_NAME: admin
NGINX_UI_PREDEFINED_USER_PASSWORD: ${ADMIN_PASSWORD:?set ADMIN_PASSWORD in .env}
ports:
- "127.0.0.1:8130:80"
- "127.0.0.1:8131:8081"
- "127.0.0.1:8443:443"
volumes:
- ./data/nginx:/etc/nginx
- ./data/nginx-ui:/etc/nginx-ui
- ./data/www:/var/www
Generate the administrator’s password in a file readable by root only, then start the container, from /opt/nginx-ui:
umask 077
printf "ADMIN_PASSWORD=%s\n" "$(openssl rand -hex 16)" > .env
umask 022
docker compose up -d
timeout 60 sh -c "until curl -fsS -o /dev/null http://127.0.0.1:8130/; do sleep 2; done"
curl -s http://127.0.0.1:8130/api/install
The last command returns {"lock":true,"timeout":false}: the installation is already closed, and nobody can claim the administrator account.
/var/run/docker.sock, which gives the container control over Docker on the whole server. Without it, set NGINX_UI_IGNORE_DOCKER_SOCKET, as the self-check asks.NGINX_UI_SERVER_RUN_MODE to release./etc/nginx at the first start, so its volume must start empty.Nginx UI can edit configuration files and open a terminal in its container: we recommend keeping it private. Its own Nginx can serve it over HTTPS with a certificate created on the server. Once the first start has filled the folder, create that certificate:
mkdir -p data/nginx/ssl/panel
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -days 825 -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost,IP:127.0.0.1" -keyout data/nginx/ssl/panel/key.pem -out data/nginx/ssl/panel/cert.pem
chmod 600 data/nginx/ssl/panel/key.pem
Then add this file, which reuses the WebSocket setting of the bundled configuration:
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /etc/nginx/ssl/panel/cert.pem;
ssl_certificate_key /etc/nginx/ssl/panel/key.pem;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://127.0.0.1:9000/;
}
}
docker compose restart
timeout 60 sh -c "until curl -fs -o /dev/null --cacert data/nginx/ssl/panel/cert.pem https://localhost:8443/; do sleep 2; done"
docker compose exec -T nginx-ui nginx -t
curl -sI --cacert data/nginx/ssl/panel/cert.pem https://localhost:8443/
The test says the configuration is successful, and the panel answers HTTP/1.1 200 OK with a verified certificate. From your own computer, open a tunnel with the address of your server:
ssh -N -L 8443:127.0.0.1:8443 root@server.example.com
While it runs, https://localhost:8443 in your browser opens the panel. The browser warns about the certificate, which you signed yourself: accept it for this address, or import cert.pem on your computer. On our test VPS, the panel answered through the tunnel, while its port listened on 127.0.0.1 only.
/opt/nginx-ui/.env, as root.https://localhost:8443 through the tunnel and sign in as admin: the dashboard opens.On our test VPS, a request to the sites API without a session was refused with a 403. Keep the number of accounts small: whoever can write the Nginx configuration decides what the server serves and where it forwards requests.
Files placed in data/www appear under /var/www in the container. Create a test page:
mkdir -p data/www/demo
echo "<h1>Served by Nginx UI</h1>" > data/www/demo/index.html
In Manage Sites, Add Site, choose Advanced, name the site demo, paste this configuration, save it and enable it:
server {
listen 8081;
server_name demo.example.com;
root /var/www/demo;
index index.html;
}
Nginx UI tests the configuration and reloads Nginx. The site answers on its local port:
curl -s -H "Host: demo.example.com" http://127.0.0.1:8131/
To publish such a site, point the reverse proxy of your server to 127.0.0.1:8131, keeping the Host header. On a server with no other web server, the project also documents giving ports 80 and 443 to the container: if you do, give the sites their own server blocks and keep the panel’s out of public reach, since the bundled configuration serves it on port 80.
Everything lives in data: the Nginx files, the database and settings of Nginx UI, its plugins and your websites. Together with compose.yaml and .env, that is the whole installation. Stop the container during the copy, so that the SQLite database is consistent, and create the archive readable by root only, since it holds keys and accounts:
(
umask 077
docker compose stop nginx-ui &&
tar czf nginx-ui-$(date +%F).tar.gz compose.yaml .env data
docker compose start nginx-ui
)
Send the archive off the server. The interface also has encrypted configuration backups, under Backup Manage, whose key you must keep with them.
Stop the container, remove the current data folder, extract the archive with its owners and permissions, then start again:
BACKUP_DATE=2026-12-06
(
set -e
for f in nginx-ui-$BACKUP_DATE.tar.gz; do
test -s "$f" || { echo "Missing or empty: $f"; exit 1; }
done
docker compose down
rm -rf /opt/nginx-ui/data
tar xzpf nginx-ui-$BACKUP_DATE.tar.gz --numeric-owner
docker compose up -d
)
Set BACKUP_DATE, on the first line, to the date in the names of the backup you restore, as listed by ls. The commands run in parentheses with set -e, which stops them at the first error. They first check that each file exists and is not empty, before anything is stopped, removed or overwritten: a wrong date stops there, with your data untouched, and a failed step stops every step after it, so the application is never started again on a partial restore.
We tested the cycle on our VPS: archive, a site added after it, the folder deleted, restore. The account, the HTTPS panel and the demo site came back, and the site added after the archive was gone.
Nginx UI publishes releases and security advisories often, and its image also carries Nginx: an update is how both get their fixes. Read the release notes, take a backup, change the tag, then recreate the container:
sed -i "s|image: uozi/nginx-ui:v3.0.8|image: uozi/nginx-ui:v3.0.9|" compose.yaml
docker compose pull
docker compose up -d
docker compose exec -T nginx-ui nginx -v
docker compose exec -T nginx-ui nginx-ui --version
Self-hosting means running the server on top of the application. On a managed VPS, our teams take charge of the server and proactively monitor your instance; Nginx UI remains your software, with your sites and your configuration.
| Topic | Our teams | You |
|---|---|---|
| The server | System and security updates, server interventions included | The timing that suits you |
| Monitoring | Server monitored 24/7, with intervention without waiting for your call | The sites you declare in Nginx UI |
| Nginx UI | Proactive monitoring: errors, slowdowns and disk space spotted, fix recommended | Its installation, updates and settings, which you apply, yourself or through your AI assistant |
| Access | The server that carries the panel, monitored and backed up | Accounts, two-factor authentication and SSH keys |
| Backups | Every night, encrypted and kept off the machine; restores included | Your own archives, and the restore request, when you need one |
| Migration | Your current server migrated, free of charge | The timing of the switch |
If you would rather have our teams work inside the application itself, that service is billed by the hour or at a fixed rate, with an estimate shared before the work starts.
With a Simafri Managed VPS, our teams keep the server of your Nginx UI up to date, monitor it day and night and step in without waiting for your call; they also proactively monitor your instance and recommend useful fixes, which you apply, yourself or through your AI assistant. Backups are encrypted every night and kept off the machine, restores are included, and migrating your current server is free.
Yes. Nginx UI is under the AGPL-3.0 license: you can run it for your company or your clients with no license to buy. What remains is the cost of the server that runs it.
A new installation has none: it asks for a one-time secret stored in .install_secret. With this guide, the admin account is created at the first start from the password you put in .env, and the installation page is closed before you connect.
Yes. Publish the ports of the container on 127.0.0.1, as in this guide: ports 80 and 443 of the server stay with the web server already there, which can forward your sites to the local port.
Only to control Nginx in another container, or to replace its own container during an update from the panel. To manage the bundled Nginx and update with Docker Compose, leave it out and set NGINX_UI_IGNORE_DOCKER_SOCKET to true.
On our test VPS, the container used about 100 to 110 MB, Nginx included. A Managed VPS Pro 1 with 2 GB of memory, at US$19.99 per month excl. tax, is enough to start.
Stop the container, archive compose.yaml, .env and the data folder under umask 077, then start it again and send the archive off the server. To restore, extract the archive in the same folder with tar and its numeric owners, then run docker compose up -d.
Read the release notes and take a backup, change the image tag in compose.yaml, then run docker compose pull and docker compose up -d. The image carries Nginx, which is updated at the same time.
A managed VPS covers the server: system, security, monitoring and backups. Our teams also proactively monitor your instance and recommend useful fixes, which you apply. Work inside the application is billed by the hour or at a fixed rate.
Simafri
Let's talk about your project
Tell us what you need in a few words: we will get back to you quickly.
Thank you! Your request has been sent. We'll get back to you shortly.
Prefer email? Write to us at support@simafri.com.