How to Troubleshoot Service Issues
Common problems and solutions for homelab services.
When to use
Service not working, container won’t start, or unexpected behavior.
Diagnostic Steps
1. Check container status
# Is container running?
pct status <CT_ID>
# If not running, start it
pct start <CT_ID>2. Check Docker status
# Is Docker running?
pct exec <CT_ID> -- systemctl status docker
# If not, start it
pct exec <CT_ID> -- systemctl start docker3. Check Docker containers
# List containers
pct exec <CT_ID> -- docker ps -a
# Are containers running?
# If not, check why4. View logs
# Docker Compose logs
pct exec <CT_ID> -- bash -c 'cd /opt/homelab-docker/<service> && docker compose logs'
# Follow logs
pct exec <CT_ID> -- bash -c 'cd /opt/homelab-docker/<service> && docker compose logs -f'
# Specific container logs
pct exec <CT_ID> -- docker logs <container-name>5. Check data directory
# Does data directory exist?
ls -la /lxcdata/<service>/
# Are permissions correct?
ls -la /lxcdata/<service>/Common Issues
Container won’t start
Symptoms: pct start fails or container stops immediately
Solutions:
-
Check container config:
cat /etc/pve/lxc/<CT_ID>.conf -
Check for AppArmor issues:
# Verify AppArmor workaround is present grep apparmor /etc/pve/lxc/<CT_ID>.conf -
Check container logs:
journalctl -xe -u pve-container@<CT_ID>
Service containers not running
Symptoms: docker ps shows no or stopped containers
Solutions:
-
Check Docker Compose config:
pct exec <CT_ID> -- bash -c 'cd /opt/homelab-docker/<service> && docker compose config' -
Check for missing .env file:
pct exec <CT_ID> -- ls -la /opt/homelab-docker/<service>/.env -
Try starting manually:
pct exec <CT_ID> -- bash -c 'cd /opt/homelab-docker/<service> && docker compose up -d'
Permission issues
Symptoms: “Permission denied” errors, service can’t write to /data
Cause: Unprivileged LXC containers map UIDs with +100000 offset
Fix:
# Find correct ownership (example for www-data, UID 33)
chown -R 100033:100033 /lxcdata/<service>/<dir>
# Common mappings:
# UID 33 (www-data) → Host UID 100033
# UID 70 (postgres) → Host UID 100070
# UID 999 (mysql) → Host UID 100999Network issues
Symptoms: Can’t access service from other machines
Diagnosis:
# Test from Proxmox host
curl http://<service-ip>:<port>
# Test from inside container
pct exec <CT_ID> -- curl localhost:<port>
# Check DNS
dig @192.168.144.20 <domain>Solutions:
- Check firewall rules on container
- Check routing in Cloudflare/Lanproxy
- Verify service is listening
pct exec <CT_ID> -- netstat -tlnp
Out of disk space
Symptoms: “No space left on device” errors
Diagnosis:
# Check container disk usage
pct exec <CT_ID> -- df -h
# Check data directory size
du -sh /lxcdata/<service>Solutions:
-
Clean Docker images:
pct exec <CT_ID> -- docker system prune -a -
Clean logs if oversized
-
Expand disk if needed
Database connection errors
Symptoms: Service can’t connect to database
Diagnosis:
# From service container, can you reach DB?
pct exec <SERVICE_CT> -- curl <db-ip>:<db-port>
# Is DB container running?
pct exec <DB_CT> -- docker psSolutions:
- Check database credentials in .env
- Verify database is running
- Check database logs
Getting Help
When asking for help, provide:
- Service name and CT ID
- Symptoms - what’s not working
- Steps taken - what you’ve already tried
- Relevant logs - error messages
- Container status -
pct status <CT_ID>anddocker ps -a