Skip to content

Server Management


Server Access

SonarQube Server

ssh -i ~/aws-keys/enfection-sonarqube-key.pem ubuntu@43.205.140.176

Staging Server

ssh -i ~/aws-keys/enfection-staging-key.pem ubuntu@13.202.105.210

Staging SSH is key-only (since 2026-10-30)

  • Elastic IP 13.202.105.210. Security group port 22 is open to 0.0.0.0/0 so GitHub Actions can deploy.
  • That is safe because password login is off: /etc/ssh/sshd_config.d/00-enfection-hardening.conf sets PasswordAuthentication no and PermitRootLogin prohibit-password. fail2ban is running.
  • Only holders of the staging private key can log in (DevOps laptops + the STAGING_SSH_KEY secret in the theme repos). CloudPanel site users can't SSH/SFTP with their password.
  • Never delete that file or turn password login back on while port 22 is open to everyone.
  • If the server's IP changes again: update STAGING_SERVER_IP in ~/.enfection-config and in every theme repo + this docs repo (gh secret set STAGING_SERVER_IP --body <ip> --repo Enfection-Dev-Lab/<repo>).

SonarQube Management

# Status check
cd /opt/sonarqube && docker-compose ps

# Restart
docker-compose restart

# Logs
docker logs sonarqube -f --tail=50

# Stop/Start
docker-compose down
docker-compose up -d

Staging Server Management

All Sites Status

# CloudPanel sites list
ls /home/

# Disk usage
df -h

# Docker (if used)
docker ps

Site Theme Path

/home/enfection-[client]/htdocs/[client].dev.enfection.com/wp-content/themes/

Nginx Status

sudo systemctl status nginx
sudo nginx -t
sudo systemctl reload nginx

Fix Theme Permissions (New Site)

sudo chmod 755 /home/enfection-[client]/htdocs/[client].dev.enfection.com/wp-content/themes
sudo chown -R ubuntu:ubuntu /home/enfection-[client]/htdocs/[client].dev.enfection.com/wp-content/themes

SSL Renewal

Auto renewal on. Manual check:

sudo certbot renew --dry-run
sudo certbot certificates

Disk Usage Check

df -h
du -sh /home/*/htdocs/* | sort -rh | head -20