An automated, turnkey shell deployment script for Ubuntu 22.04 / 24.04 LTS and Debian 12 servers. Configures baseline Linux security, UFW firewall rules, Fail2ban brute-force protection, Node.js LTS, PM2 process management, and Nginx reverse proxy with SSL.
- System & Security Hardening:
- Updates APT package repositories and enables unattended security patches.
- Installs and configures UFW Firewall (denies incoming by default, whitelists SSH, HTTP 80, HTTPS 443).
- Configures Fail2ban to protect SSH from brute-force attempts.
- Dedicated User Architecture:
- Creates a non-root application user (
deployby default) with sudo privileges.
- Creates a non-root application user (
- Node.js Environment:
- Installs Node.js LTS via official NodeSource distribution repositories.
- Installs PM2 process supervisor with systemd automatic reboot hooks.
- Nginx Reverse Proxy & SSL (Optional):
- Configures an Nginx virtual host with WebSocket and proxy headers.
- Automates Let's Encrypt SSL certificate issuance via Certbot.
Run directly on a fresh Ubuntu or Debian VPS:
curl -fsSL https://raw.githubusercontent.com/VexaNode-Dev/node-vps-deploy/main/deploy.sh | sudo bash -s -- --node-version 20 --user deploy| Flag | Default | Description |
|---|---|---|
--dry-run |
false |
Prints all actions without modifying system state |
--node-version <ver> |
20 |
Node.js major version (e.g., 18, 20, 22) |
--user <username> |
deploy |
Non-root application user to create |
--domain <domain> |
None | Optional: Domain name for Nginx reverse proxy |
--port <port> |
3000 |
Application upstream local port for reverse proxy |
Verify script syntax and dry-run execution locally:
git clone https://github.com/VexaNode-Dev/node-vps-deploy.git
cd node-vps-deploy
bash tests/test_syntax.shNeed dedicated compute resources with unmetered 10Gbps bandwidth? Deploy this script directly to VexaNode KVM VPS instances with instant provisioning and enterprise DDoS defense.
MIT License. Developed by VexaNode-Dev. Need support? Join our Discord at discord.gg/devz.