Tools: The 3 Things That Trip Up Every VPS Beginner (And How to Handle Each One) (2026)

Tools: The 3 Things That Trip Up Every VPS Beginner (And How to Handle Each One) (2026)

Wall 1: UFW Firewall

Wall 2: nginx Reverse Proxy

Wall 3: PM2 (The One Everyone Forgets)

Putting It All Together with Claude Code Setting up a VPS for the first time is manageable — until you hit one of three walls. Here's what they are and exactly how to get past each one. Most tutorials tell you to run ufw enable and move on. The part they skip: what to allow first. If you enable UFW before allowing SSH, you lock yourself out of your own server. That's it. Everything not on this list is blocked. An open VPS gets port-scanned within hours of provisioning — don't skip this step. Your Node.js app runs on port 3000. Visitors come in on port 80. nginx is the bridge between them. The config that makes this work: Save this to /etc/nginx/sites-available/myapp, symlink it to sites-enabled, test with nginx -t, reload with systemctl reload nginx. That's the full flow. If you start your app with node app.js and close the terminal — app is gone. If the server reboots — app is gone. Two commands most people miss: pm2 startup and pm2 save. Without both, your app won't survive a reboot. If you want to see these three things handled automatically on a fresh VPS, I put together a full walkthrough where Claude Code does the entire setup from one SSH prompt — including the firewall, reverse proxy, and PM2 config. Full guide: ayyaztech.com/blog/hostinger-vps-setup-claude-code Video walkthrough: youtu.be/AX9Wp_YxTpU Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Command

Copy

$ ufw allow 22 # SSH — do this FIRST ufw allow 80 # HTTP ufw allow 443 # HTTPS ufw -weight: 500;">enable # now -weight: 500;">enable it ufw -weight: 500;">status # verify ufw allow 22 # SSH — do this FIRST ufw allow 80 # HTTP ufw allow 443 # HTTPS ufw -weight: 500;">enable # now -weight: 500;">enable it ufw -weight: 500;">status # verify ufw allow 22 # SSH — do this FIRST ufw allow 80 # HTTP ufw allow 443 # HTTPS ufw -weight: 500;">enable # now -weight: 500;">enable it ufw -weight: 500;">status # verify server { listen 80; server_name your-domain.com; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection '-weight: 500;">upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } server { listen 80; server_name your-domain.com; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection '-weight: 500;">upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } server { listen 80; server_name your-domain.com; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection '-weight: 500;">upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } -weight: 500;">npm -weight: 500;">install -g pm2 pm2 -weight: 500;">start app.js --name myapp pm2 startup # generates a command — run it pm2 save # saves the process list for reboot -weight: 500;">npm -weight: 500;">install -g pm2 pm2 -weight: 500;">start app.js --name myapp pm2 startup # generates a command — run it pm2 save # saves the process list for reboot -weight: 500;">npm -weight: 500;">install -g pm2 pm2 -weight: 500;">start app.js --name myapp pm2 startup # generates a command — run it pm2 save # saves the process list for reboot