Skip to content

FTP Deployment Troubleshooting Guide

Common FTP Connection Issues

Error: ERR_TLS_CERT_ALTNAME_INVALID (IP vs hostname mismatch)

This error means you are connecting via IP address but Hostinger's FTPS certificate only covers DNS names (*.hstgr.io, hstgr.io). TLS validation fails because IPs are not in the cert's Subject Alternative Names.

Fix: Use the FTP hostname instead of the IP in HOSTINGER_FTP_SERVER:

  1. Log in to Hostinger hPanel
  2. Go to FTP Accounts or Plan Details
  3. Find the FTP hostname (e.g. ftp.yourdomain.com or srv123.hostinger.com)
  4. In GitHub → Settings → Secrets and variables → Actions
  5. Edit HOSTINGER_FTP_SERVER and replace the IP with the hostname (no ftp://, no port)

If you see both an IP and a hostname in hPanel, use the hostname.


Error: connect ETIMEDOUT ***:21

This error indicates a connection timeout on port 21 (standard FTP port).

Solutions

The easiest way to deploy is through GitHub Actions, which handles FTP deployment automatically:

  1. Push your changes to GitHub:

    git add .
    git commit -m "Your commit message"
    git push origin main
    

  2. GitHub Actions will automatically:

  3. Build the frontend
  4. Deploy to Hostinger via FTPS
  5. Handle all FTP connection details

  6. Check deployment status:

  7. Go to: https://github.com/your-username/pcb_stackup_generator/actions
  8. View the deployment workflow logs

Solution 2: Verify FTP Credentials

If deploying manually, verify your FTP credentials in Hostinger hPanel:

  1. Log in to Hostinger hPanel
  2. Go to FTP Accounts
  3. Verify:
  4. FTP Server/Host: Usually ftp.yourdomain.com or an IP address
  5. FTP Username: Your FTP username
  6. FTP Password: Your FTP password
  7. Port: Usually 21 for FTP, 990 for FTPS, 22 for SFTP

Solution 3: Try Different Protocols

Hostinger may support different protocols. Try these in order:

Option A: FTPS (FTP over SSL) - Port 990

# In your FTP client, use:
Protocol: FTPS (Explicit)
Port: 990
Security: TLS/SSL

Option B: SFTP (SSH File Transfer) - Port 22

# In your FTP client, use:
Protocol: SFTP
Port: 22
Security: SSH

Option C: FTP (Plain) - Port 21

# In your FTP client, use:
Protocol: FTP
Port: 21
Security: None (not recommended for production)

Solution 4: Check Firewall/Network

Your network or firewall might be blocking FTP ports:

# Test FTP port connectivity
Test-NetConnection -ComputerName your-ftp-server.com -Port 21

# Test FTPS port
Test-NetConnection -ComputerName your-ftp-server.com -Port 990

# Test SFTP port
Test-NetConnection -ComputerName your-ftp-server.com -Port 22

If all ports timeout: - Try from a different network (mobile hotspot) - Check if your ISP blocks FTP ports - Contact your network administrator

Solution 5: Use Hostinger File Manager (Alternative)

If FTP doesn't work, use Hostinger's web-based file manager:

  1. Log in to Hostinger hPanel
  2. Go to File Manager
  3. Navigate to public_html/
  4. Upload files manually via web interface

Solution 6: Contact Hostinger Support

If nothing works, contact Hostinger support:

  1. Live Chat: Available in hPanel
  2. Email: support@hostinger.com
  3. Ask them:
  4. "What FTP server address should I use?"
  5. "What port should I use for FTP/FTPS/SFTP?"
  6. "Is FTP enabled for my account?"
  7. "My FTP connection times out on port 21"

Quick Diagnostic Checklist

  • Verified FTP credentials in hPanel
  • Tried FTPS (port 990) instead of FTP (port 21)
  • Tried SFTP (port 22) instead of FTP
  • Tested port connectivity with Test-NetConnection
  • Tried from different network
  • Checked firewall settings
  • Used GitHub Actions for automatic deployment

Use GitHub Actions - It's the most reliable method:

  1. Push code to GitHub
  2. GitHub Actions automatically builds and deploys
  3. No manual FTP configuration needed
  4. Deployment logs available in GitHub

The workflow is configured in .github/workflows/deploy-hostinger.yml and: - Protocol: FTPS - Security: Strict (requires valid TLS cert; use hostname, not IP) - Timeout: 300 seconds - State tracking: Prevents duplicate uploads

If GitHub Actions FTP Deployment Fails

  1. Check GitHub Secrets:
  2. Go to: Settings → Secrets and variables → Actions
  3. Verify these secrets are set correctly:

    • HOSTINGER_FTP_SERVER - Use the hostname (e.g. ftp.yourdomain.com), not the IP. Using an IP causes ERR_TLS_CERT_ALTNAME_INVALID.
    • HOSTINGER_FTP_USERNAME - Your FTP username
    • HOSTINGER_FTP_PASSWORD - Your FTP password
  4. Verify FTP Settings in Hostinger:

  5. Log in to Hostinger hPanel
  6. Go to FTP Accounts
  7. Compare the server address, username, and password with your GitHub secrets

  8. Check GitHub Actions Logs:

  9. Go to: Actions tab in your GitHub repository
  10. Click on the failed workflow run
  11. Look for FTP connection errors in the logs
  12. The workflow will automatically retry with FTP if FTPS fails

Next Steps

  1. If using GitHub Actions: Just push to GitHub and monitor the Actions tab
  2. If deploying manually: Try SFTP (port 22) or contact Hostinger support
  3. If urgent: Use Hostinger File Manager for manual upload