Configure Nginx reverse proxies and static sites in seconds — right from your terminal.
ngxtui is a lightweight Terminal UI that removes the pain of hand-editing Nginx config files. Create a reverse proxy, enable a site, validate, and reload with a few keystrokes — no vim, no hunting for config paths, no syntax headaches.
It is a Node.js port of the original Go utility, distributed as a single npm package.
📖 Docs / landing page: https://godaralokesh29.github.io/ngxtui/
- 🖥️ Interactive terminal menu
- 🔁 Reverse-proxy (API) vhost generation with WebSocket support
- 🌐 Static-site vhost generation with sensible caching
- 🔗 Automatic
sites-available→sites-enabledsymlinking - ✅ Validates every change with
nginx -tbefore reloading - ♻️ Reload via
nginx -s reload,systemctl, orservice— whatever your host has - 🧨 One-command reset to a clean, working default (with a confirmation guard)
- Linux or macOS (nginx lives at
/etc/nginx; on Windows use WSL) - Node.js ≥ 18
nginxinstalled and on yourPATH- root privileges (writing to
/etc/nginxand reloading the service)
npm install -g ngxtuiOr run once without installing:
sudo npx ngxtuisudo ngxtuiThen follow the prompts:
? What would you like to do?
❯ Create API / reverse-proxy config
Create static-site config
Reset nginx to a clean default
Exit
Other commands:
ngxtui --help # show help
ngxtui --version # print versionsudo ngxtui- Choose Create API / reverse-proxy config
- Project name:
my-api, Port:3000, Domain:api.example.com
ngxtui writes /etc/nginx/sites-available/my-api.conf, symlinks it into
sites-enabled, runs nginx -t, and reloads. Done.
A reverse-proxy server block looks like:
server {
listen 80;
server_name api.example.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $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 $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
}
}git clone https://github.com/godaralokesh29/ngxtui.git
cd ngxtui
npm install
npm run build
sudo node dist/cli.jsMIT © godaralokesh29. Original concept by Bhargav16exd. Issues and PRs welcome.