Web Server
Synology Site Management
Both sites are hosted on mainsqueeze (Synology) behind NGINX Reverse Proxy, served over 443.
| Site | Local Port | Directory |
|---|---|---|
| wreckroom.nyc | localhost:3000 |
/volume2/wreckroom.nyc/wreckroom.nyc
|
| justinbjur.com | localhost:3001 |
/volume2/justinbjur.com/justinbjur.com
|
Updating Site Content
- Make changes locally and commit to GitHub
- SSH into mainsqueeze:
ssh guernica@wreckroom.nyc - Navigate to the site and pull:
cd /volume2/wreckroom.nyc/wreckroom.nyc(or justinbjur.com)git pull
- Restart pm2:
sudo pm2 restart wreckroom.nyc(or justinbjur.com) - or git pull && sudo npm run build && sudo pm2 restart justinbjur.com
PM2
PM2 is a process manager that keeps both Next.js apps alive on the server.
Current Processes
| Name | Command |
|---|---|
wreckroom.nyc |
npm run start
|
justinbjur.com |
npm run start
|
Startup Persistence
DSM on mainsqueeze uses systemd. PM2 startup has been configured and the service is enabled:
sudo pm2 startup # already run; installs pm2-root.service sudo pm2 save # saves current process list to ~/.pm2/dump.pm2
On reboot, systemd will automatically call pm2 resurrect via pm2-root.service.
Run sudo pm2 save any time processes are added, removed, or renamed.
To verify the service:
sudo systemctl status pm2-root
After a Synology Reboot
PM2 should auto-resume via systemd. If processes are not running after a reboot:
sudo systemctl start pm2-root- Verify with
sudo pm2 list
If that fails, restart manually:
cd /volume2/wreckroom.nyc/wreckroom.nycsudo pm2 start npm --name "wreckroom.nyc" -- run startcd /volume2/justinbjur.com/justinbjur.comsudo pm2 start npm --name "justinbjur.com" -- run startsudo pm2 save
Troubleshooting
If a site is down and pm2 shows an error, delete and restart that process:
sudo pm2 delete wreckroom.nycsudo pm2 start npm --name "wreckroom.nyc" -- run startsudo pm2 save
Certificates
If you modify a certificate's FQDN, you must also update the reverse proxy entry. Control Panel → Login Portal → Advanced → Reverse Proxy Update the hostname there — without this step the site will not resolve correctly even after migrating the cert. This has cost half a day before, don't skip it.