Server Security, Docker Deployment and MTR Troubleshooting
Prepare backups, limit access and validate services from first login through fault diagnosis. These examples target Debian / Ubuntu; check your distribution and workload before running commands.
First login and access controls
Update the OS, create a non-root administrator and install your SSH public key. Verify key access in a second session before disabling password login. Allow your actual SSH port before enabling a firewall, and retain console access and a restorable backup.
sudo apt update
sudo apt upgrade
sudo adduser deploy
sudo usermod -aG sudo deploy
sudo ufw allow OpenSSH
sudo ufw status verboseDeploy a Docker workload
Install Engine and the Compose plugin using Docker's distribution-specific instructions. Pin image versions or digests; never expose the Docker socket or publish database administration ports on 0.0.0.0. Validate a staging deployment before switching traffic.
docker version
docker compose version
docker compose config --quiet
docker compose up -d
docker compose ps
docker compose logs --tail=100Separate routing and application faults with MTR
Replace YOUR_SERVER_IP with an instance you are authorized to test. Measure the outbound path from the client and the return path from the server. Intermediate ICMP loss can indicate rate limiting; correlate loss continuing to the destination with application errors.
sudo apt install mtr-tiny
mtr -rwzc 50 YOUR_SERVER_IP
mtr --tcp --port 443 -rwzc 50 YOUR_SERVER_IP
curl -o /dev/null -sS -w 'dns=%{time_namelookup} connect=%{time_connect} ttfb=%{time_starttransfer} total=%{time_total}\n' https://YOUR_DOMAIN/Backups, upgrades and support tickets
Create a restorable off-site backup before changes, rehearse recovery and monitor disk capacity and certificate expiry. Network tickets should include timestamps and timezone, source ISP, destination IP, protocol, port and a redacted MTR. Never include passwords, tokens or customer personal data.
df -h
free -h
systemctl --failed
journalctl -p err --since '1 hour ago'