Prerequisites
Before downloading logs, make sure you have:
- SSH access to your VPS
- Local machine with SCP or SFTP client
Method 1: Download via SCP
On your local computer:
scp hxroot@YOUR_SERVER_IP:/home/admin/logs/example.com/access.log ~/Desktop/
scp hxroot@YOUR_SERVER_IP:/home/admin/logs/example.com/error.log ~/Desktop/
Method 2: Download via SFTP (FileZilla)
- Open FileZilla
- Connect to YOUR_SERVER_IP as hxroot
- Navigate to
/home/admin/logs/example.com/ - Drag files to local directory
Method 3: Compress and Download Large Logs
On server, compress first:
ssh hxroot@YOUR_SERVER_IP -p 22
gzip /home/admin/logs/example.com/access.log
Now download the .gz file:
scp hxroot@YOUR_SERVER_IP:/home/admin/logs/example.com/access.log.gz ~/Desktop/
Download All Logs for a Domain
tar -czf /tmp/example_logs.tar.gz /home/admin/logs/example.com/
scp hxroot@YOUR_SERVER_IP:/tmp/example_logs.tar.gz ~/Desktop/
Download via HestiaCP Web Interface
HestiaCP does not have direct log download. Use SSH methods above.
Automated Log Collection Script
#!/bin/bash
# Download all logs for analysis
mkdir log_collection
cp /home/admin/logs/example.com/*.log log_collection/
tar -czf logs_$(date +%Y%m%d).tar.gz log_collection/
echo "Logs ready: logs_$(date +%Y%m%d).tar.gz"
✅ Logs have been downloaded successfully.