CLI Troubleshooting Guide
Solutions to common issues when using the ANTE CLI.
Diagnostic Tools
Before troubleshooting specific issues, run these diagnostic commands:
# Check system health
ante doctor
# Check service status
ante status
# View recent logs
ante logs --lines 200
# Check CLI version
ante --versionInstallation Issues
Command Not Found
Symptom:
$ ante --version
bash: ante: command not foundCause: CLI not installed or not in PATH.
Solution:
- Verify installation:
npm list -g ante-erp-cli- If not installed, install it:
npm install -g ante-erp-cli- If installed but not found, add npm global bin to PATH:
# Find npm global bin directory
npm config get prefix
# Add to PATH (Linux/macOS)
export PATH="$(npm config get prefix)/bin:$PATH"
# Make permanent
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcnpm Permission Errors
Symptom:
npm ERR! Error: EACCES: permission deniedCause: Insufficient permissions to install global npm packages.
Solution 1 (Recommended): Configure npm to use a user directory:
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Install again
npm install -g ante-erp-cliSolution 2 (Not Recommended): Use sudo:
sudo npm install -g ante-erp-cliSolution 3: Use npx instead:
npx ante-erp-cli installNode.js Version Too Old
Symptom:
error This version of ANTE requires Node.js 24.0.0 or higherCause: Node.js version is below 24.0.0.
Solution:
- Check current version:
node --version- Update Node.js (Ubuntu/Debian):
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get install -y nodejs- Update Node.js (macOS with Homebrew):
brew update
brew upgrade node- Verify:
node --version # Should be 24.0.0 or higherDocker Issues
Docker Daemon Not Running
Symptom:
Error: Cannot connect to the Docker daemonCause: Docker service is not running.
Solution:
# Check Docker status
sudo systemctl status docker
# Start Docker
sudo systemctl start docker
# Enable Docker to start on boot
sudo systemctl enable docker
# Verify
docker psDocker Permission Denied
Symptom:
permission denied while trying to connect to the Docker daemon socketCause: Current user doesn't have permission to access Docker.
Solution:
# Add user to docker group
sudo usermod -aG docker $USER
# Apply group changes
newgrp docker
# Or log out and log back in
# Verify
docker psDocker Compose Version Mismatch
Symptom:
Error: Docker Compose v2 required, found v1Cause: Old Docker Compose version installed.
Solution:
# Remove old Docker Compose
sudo apt-get remove docker-compose
# Install Docker Compose v2 (comes with Docker Desktop)
# Or install plugin:
sudo apt-get update
sudo apt-get install docker-compose-plugin
# Verify
docker compose version # Should be 2.x.xInstallation Detection Issues
Installation Not Found
Symptom:
Error: ANTE installation not foundCause: CLI can't find the ANTE installation directory.
Solution:
- Check if installation exists:
ls -la ./ante-erp- If it exists, navigate to the directory:
cd /path/to/ante-erp
ante status- If installation doesn't exist, install ANTE:
ante install- Check CLI configuration:
cat ~/.config/ante-cli/config.jsonMultiple Installations Detected
Symptom: CLI is confused about which installation to use.
Solution:
- Navigate to the installation directory you want to use:
cd /path/to/ante-erp- Run commands from that directory:
ante status- Or update CLI configuration manually:
nano ~/.config/ante-cli/config.json
# Edit "installPath" to point to correct directoryService Issues
Services Won't Start
Symptom:
$ ante start
Error: Failed to start servicesDiagnostics:
# Check what's wrong
ante doctor
# Check Docker logs
ante logs --lines 500
# Check specific service
ante logs --service backend --followCommon Causes & Solutions:
Port Already in Use
# Find what's using the port
sudo lsof -i :8080
# Kill the process
sudo kill -9 <PID>
# Or change ANTE's port
nano ./ante-erp/.env
# Change FRONTEND_PORT=9000
ante restartOut of Disk Space
# Check disk space
df -h
# Clean up Docker
docker system prune -a --volumes
# Remove old images
docker images
docker rmi <image-id>Out of Memory
# Check memory
free -h
# Increase Docker memory limit (Docker Desktop)
# Settings → Resources → Memory → Increase
# Or restart services one by one
ante stop
ante start --service postgres
ante start --service redis
ante start --service mongodb
ante start --service backend
ante start --service frontendServices Keep Restarting
Symptom: Services show as "restarting" instead of "running".
Diagnostics:
# Watch logs in real-time
ante logs --service backend --follow
# Check Docker events
docker events
# Check resource usage
docker statsCommon Causes:
- Configuration Error: Check
.envfile for typos - Database Connection: Ensure database is running first
- Insufficient Memory: Increase available RAM
- Corrupt Image: Pull fresh images
Solution:
# Stop everything
ante stop
# Remove containers
docker compose -f ./ante-erp/docker-compose.yml down
# Pull fresh images
docker compose -f ./ante-erp/docker-compose.yml pull
# Start again
ante startDatabase Connection Errors
Symptom:
Error: Unable to connect to databaseDiagnostics:
# Check if PostgreSQL is running
ante status
# Check database logs
ante logs --service postgres
# Try connecting manually
ante db shellSolutions:
- Restart database:
ante restart --service postgres- Check credentials:
cat ./ante-erp/.env | grep DATABASE
# Verify DATABASE_URL is correct- Reset database (⚠️ destructive):
ante backup # Backup first!
ante db resetBackup & Restore Issues
Backup Fails
Symptom:
Error: Backup creation failedCommon Causes & Solutions:
Insufficient Disk Space
# Check available space
df -h ./backups
# Clean up old backups
rm ./backups/ante-backup-old*.tar.gzPermission Denied
# Fix permissions
sudo chown -R $USER:$USER ./backups
chmod -R 755 ./backupsServices Not Running
# Start services first
ante start
# Then create backup
ante backupRestore Fails
Symptom:
Error: Restore operation failedSolution:
# Stop all services
ante stop
# Manually remove containers and volumes
docker compose -f ./ante-erp/docker-compose.yml down -v
# Try restore again
ante restore ./backups/your-backup.tar.gz
# If still fails, restore manually:
# 1. Extract backup
tar -xzf ./backups/your-backup.tar.gz -C ./temp-restore
# 2. Start services
ante start
# 3. Restore database manually
cat ./temp-restore/postgres.dump | docker exec -i ante-postgres psql -U ante -d ante_dbUpdate Issues
Update Fails
Symptom:
Error: Update failedSolution:
- Create manual backup first:
ante backup- Check current version:
docker images | grep ante- Force pull new images:
docker compose -f ./ante-erp/docker-compose.yml pull- Run update again:
ante update- If still fails, restore from backup:
ante restoreUpdate Succeeds But Services Don't Start
Solution:
# Check logs for errors
ante logs
# Run database migrations manually
docker compose -f ./ante-erp/docker-compose.yml exec backend npm run migration:run
# Restart services
ante restartPerformance Issues
Slow Performance
Diagnostics:
# Check resource usage
docker stats
# Check database performance
ante db info
# Check logs for slow queries
ante logs --service backend | grep "slow query"Solutions:
- Optimize database:
ante db optimizeIncrease Docker resources:
- Docker Desktop: Settings → Resources → Increase CPU/Memory
- Linux: Edit
/etc/docker/daemon.json
Clean up old data:
# Docker cleanup
docker system prune -a
# Database cleanup (be careful!)
ante db optimizeHigh Memory Usage
Symptom: System runs out of memory.
Solution:
# Check what's using memory
docker stats
# Restart services to clear memory leaks
ante restart
# Reduce Docker memory limits
nano ./ante-erp/docker-compose.yml
# Add memory limits to services:
# services:
# backend:
# mem_limit: 2gNetwork Issues
Can't Access Frontend
Symptom: Browser can't connect to http://localhost:8080
Diagnostics:
# Check if frontend is running
ante status
# Check port binding
sudo lsof -i :8080
# Check firewall
sudo ufw statusSolutions:
- Port is already in use:
# Kill process using port
sudo lsof -i :8080
sudo kill -9 <PID>
# Or change ANTE port
nano ./ante-erp/.env
# FRONTEND_PORT=9000
ante restart- Firewall blocking:
# Allow port through firewall
sudo ufw allow 8080- Wrong URL:
- Use
http://nothttps://(unless SSL is configured) - Use
localhostnot127.0.0.1in some cases
- Use
SSL Certificate Issues
Symptom: Certificate errors when accessing via HTTPS.
Solution:
# Check certificate status
sudo certbot certificates
# Renew certificate
sudo certbot renew
# Or use CLI
ante ssl:renew # If this command existsData Issues
Data Loss After Restart
Symptom: Data disappears after restarting services.
Cause: Docker volumes not configured correctly.
Prevention:
# Always use named volumes (not bind mounts)
docker volume ls
# Backup regularly
ante backup # Set up in cronRecovery:
# Restore from latest backup
ante backup list
ante restore ./backups/ante-backup-latest.tar.gzCorrupted Database
Symptom: Database errors, can't query data.
Solution:
# 1. Create backup of corrupted DB (if possible)
ante backup --databases-only
# 2. Try database repair
docker compose -f ./ante-erp/docker-compose.yml exec postgres vacuumdb -U ante -d ante_db --full --analyze
# 3. If that fails, restore from backup
ante restore ./backups/ante-backup-yesterday.tar.gz
# 4. Last resort: Reset database
ante db reset # ⚠️ Deletes all data!CLI-Specific Issues
CLI Configuration Corrupted
Symptom: CLI behaves unexpectedly.
Solution:
# Remove CLI config
rm -rf ~/.config/ante-cli
# Re-run commands from installation directory
cd /path/to/ante-erp
ante status # This will recreate config"ANTE not installed" But It Is
Solution:
# Navigate to installation directory
cd /path/to/ante-erp
# Run commands from there
ante status
# Or manually set in config
echo '{"installPath": "/path/to/ante-erp"}' > ~/.config/ante-cli/config.jsonGetting More Help
Enable Debug Mode
Some issues require verbose logging:
# Set environment variable for detailed logs
export DEBUG=ante:*
# Run command
ante start
# Or with single command
DEBUG=ante:* ante doctorCollect Diagnostic Information
When reporting issues, collect this information:
# System information
uname -a
docker --version
docker compose version
node --version
ante --version
# Service status
ante status
# Recent logs
ante logs --lines 500 > ante-debug-logs.txt
# Docker information
docker ps -a
docker images
docker volume lsReport an Issue
If you're still stuck:
Search existing issues: GitHub Issues
Create new issue with:
- Symptom description
- Steps to reproduce
- Diagnostic information (above)
- Error messages
- Screenshots (if applicable)
Contact support:
- Email: support@ante.ph
- Include diagnostic information
Common Error Messages
"Port already in use"
Fix: Change port or kill process using it:
sudo lsof -i :8080
sudo kill -9 <PID>"Cannot connect to Docker daemon"
Fix: Start Docker service:
sudo systemctl start docker"Database connection refused"
Fix: Ensure PostgreSQL is running:
ante restart --service postgres"Insufficient memory"
Fix: Increase Docker memory or free up RAM:
docker system prune -a"Permission denied"
Fix: Check file/Docker permissions:
sudo usermod -aG docker $USER
newgrp dockerPrevention Tips
Regular Maintenance
# Weekly backup
ante backup
# Monthly optimization
ante db optimize
# Periodic updates
ante updateMonitoring Script
Create a cron job to monitor ANTE health:
# health-monitor.sh
#!/bin/bash
if ! ante status > /dev/null 2>&1; then
echo "ANTE is down! Attempting restart..."
ante restart
# Send notification
fi# Add to crontab
crontab -e
# Run every 5 minutes
*/5 * * * * /path/to/health-monitor.shNext Steps
- CLI Reference - Complete command reference
- Installation Guide - Install or reinstall CLI
- Self-Hosting Guide - General troubleshooting
Still having issues? Contact support or open an issue on GitHub.
