VPS - Hostinger

Production web server for Shadow’s domain portfolio.


Overview

PropertyValue
ProviderHostinger
IP76.13.115.76
Hostnamesrv1314175.hstgr.cloud
OSUbuntu 22.04.5 LTS
Kernel5.15.0-164-generic
RAM16 GB
Disk200 GB
SSHssh -i ~/.ssh/github_ed25519 root@76.13.115.76

Stack

ComponentVersionPurpose
nginxsystemReverse proxy
Node.js24.13.0 (nvm)App runtime
PM2latestProcess manager
Docker29.2.0Containerization
PostgreSQL14Database

Hosted Domains

DomainPortTypeStatus
templeofthemoonbooks.com:3001Next.js✅ Live
nortlandtechsolutions.com:3002Next.js⏳ DNS pending
sunsofthecosmicdust.comstaticStatic HTML✅ Live
shdwnet.org:3004TBD⏸️ Skipped

SSL: Enabled via Certbot (Let’s Encrypt) with auto-renewal.


Directory Structure

/opt/deploy/
├── repos/                         # Git repositories
│   ├── templeofthemoonbooks.com/  # Next.js app
│   ├── nortlandtechsolutions.com/ # Next.js app
│   ├── sunsofthecosmicdust.com/   # Static site (website/ subfolder)
│   └── shdwnet.org/               # OSINT hub (not deployed yet)
├── scripts/
│   └── deploy.sh                  # Generic deploy script
└── webhook.js                     # GitHub webhook listener (:9000)

/root/
├── .nvm/                          # Node Version Manager (v24.13.0)
├── .pm2/                          # PM2 config (auto-starts on boot)
└── .ssh/
    ├── github_account             # GitHub account SSH key
    └── id_ed25519                 # Deploy key (single repo)

Nginx Configuration

Sites are configured as reverse proxies to local Node.js apps:

/etc/nginx/sites-available/templeofthemoonbooks.com

server {
    listen 80;
    server_name templeofthemoonbooks.com www.templeofthemoonbooks.com;
    
    location / {
        proxy_pass http://localhost:3001;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        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;
    }
}

Port Assignments

PortDomain
3001templeofthemoonbooks.com
3002nortlandtechsolutions.com
3003sunsofthecosmicdust.com
3004shdwnet.org

Deployment Workflow

Automatic (Webhook)

Webhook listener running on port 9000. Add to GitHub repo settings:

Webhook URL: http://76.13.115.76:9000/
Content type: application/json
Events: Just push

When you push to main, the VPS will:

  1. git pull the repo
  2. npm ci + npm run build
  3. pm2 restart <app>

Manual Deploy

ssh -i ~/.ssh/github_ed25519 root@76.13.115.76
/opt/deploy/scripts/deploy.sh templeofthemoonbooks.com

Deploy Script

#!/bin/bash
# /opt/deploy/scripts/deploy.sh <repo-name>
source ~/.nvm/nvm.sh
cd /opt/deploy/repos/$1
git pull origin main
npm ci --production=false
npm run build
pm2 restart $1

SSL/HTTPS

Certbot installed with auto-renewal configured.

Current Certs

DomainStatusExpires
templeofthemoonbooks.com2026-05-01
sunsofthecosmicdust.com2026-05-01
nortlandtechsolutions.comPending DNS

Add New Cert

certbot --nginx -d newdomain.com -d www.newdomain.com \
  --non-interactive --agree-tos -m shadow@shdwnet.org --redirect

Check Renewal

certbot renew --dry-run

Quick Commands

SSH In

ssh -i ~/.ssh/github_ed25519 root@76.13.115.76

Check Services

ssh -i ~/.ssh/github_ed25519 root@76.13.115.76 "systemctl status nginx postgresql docker"

PM2 Status

ssh -i ~/.ssh/github_ed25519 root@76.13.115.76 "source ~/.nvm/nvm.sh && pm2 list"

Nginx Reload

ssh -i ~/.ssh/github_ed25519 root@76.13.115.76 "nginx -t && systemctl reload nginx"

View Logs

# Nginx access
ssh -i ~/.ssh/github_ed25519 root@76.13.115.76 "tail -50 /var/log/nginx/access.log"
 
# Nginx errors
ssh -i ~/.ssh/github_ed25519 root@76.13.115.76 "tail -50 /var/log/nginx/error.log"
 
# PM2 logs
ssh -i ~/.ssh/github_ed25519 root@76.13.115.76 "source ~/.nvm/nvm.sh && pm2 logs --lines 50"

Database

PostgreSQL 14 running locally:

PropertyValue
Hostlocalhost
Port5432
StatusRunning
# Connect
ssh -i ~/.ssh/github_ed25519 root@76.13.115.76 "sudo -u postgres psql"
 
# List databases
ssh -i ~/.ssh/github_ed25519 root@76.13.115.76 "sudo -u postgres psql -c '\l'"

TODO

  • Deploy site apps to each domain
  • Set up SSL with Certbot
  • Configure git-based deployment workflow
  • Fix nortlandtechsolutions.com DNS at Porkbun
  • Set up PostgreSQL databases for apps
  • Configure firewall (ufw)
  • Set up backups
  • Add GitHub webhooks to each repo