SectionKnowledge BaseTopicFTP PublishingDepthComplete reference
Quick Answers
  • Active vs passive FTP — when to use each mode
  • Firewall and NAT traversal for residential connections
  • Directory structure patterns that prevent half-upload states
  • Automated retry and error recovery configuration
  • Diagnosing intermittent upload failures

FTP remains the backbone of weather-station publishing for most hobbyist setups. The protocol is defined in RFC 959, but the practical reality of configuring it through home routers, NAT firewalls, and shared hosting accounts requires knowledge that no RFC covers. This guide is built from over a decade of troubleshooting real FTP publishing failures for GraphWeather Publishing setups, and covers the patterns that actually hold up in production.

Active vs Passive FTP

FTP uses two connections: a control channel (port 21 by default) for commands, and a data channel for file transfers. The critical difference between active and passive mode is who initiates the data channel:

Rule of thumb: if your station computer is behind any kind of router or firewall — and it almost certainly is — use passive mode. Active mode is only appropriate for servers on the same local network with no NAT in between.

Step-by-Step FTP Configuration

  1. Gather credentials — hostname, username, password, remote directory path, and port (usually 21). Your hosting provider supplies these.
  2. Set passive mode — in GraphWeather’s publishing settings, enable “Passive FTP” or “PASV mode.”
  3. Set the remote directory — typically /public_html/weather/ or /htdocs/meteo/. Verify the path exists on the server.
  4. Configure upload order — upload images and data files first, then the HTML page last. This prevents browsers from loading a page that references images still in transit.
  5. Test manually — use the “Test Connection” button or publish once manually before enabling the scheduler.
  6. Enable scheduler — set the interval (5–15 minutes is typical) and enable retry on failure.

Troubleshooting Matrix

SymptomLikely CauseFix
Connection timeout on port 21Firewall blocking, wrong hostnameVerify hostname resolves; check if ISP blocks port 21; try alternate port if hosting supports it
Login succeeds, transfer hangsActive mode through NATSwitch to passive mode
Intermittent “connection reset”Router NAT table exhaustionReduce upload frequency; reboot router to clear NAT table; increase retry delay
Permission denied on uploadWrong remote directory or file permissionsVerify the remote path; check file/directory ownership on the server; contact hosting support
File uploads but page shows old dataBrowser or CDN cachingImplement cache-busting query parameters; check CDN cache rules. See Image Refresh and Caching
Uploads stop after server migrationNew server IP, changed FTP settingsUpdate hostname, verify new credentials, test connection
Partial file on serverConnection dropped mid-transferEnable atomic upload (write to .tmp, then rename); increase timeout values

Advanced: Secure FTP Options

For operators whose hosting supports it, consider upgrading from plain FTP to FTPS (FTP over TLS) or SFTP (SSH File Transfer Protocol). Both encrypt the data stream, preventing credential interception. GraphWeather supports FTPS natively; SFTP requires an external tool or plugin.

FAQ

Can I use SFTP instead of FTP?
Yes, if your hosting provides SSH access. SFTP runs over SSH (port 22) and is generally more reliable through firewalls than FTP. GraphWeather can integrate with SFTP through external tools like WinSCP scripting.
How often should I publish?
Every 5–15 minutes is standard for hobbyist stations. Publishing more frequently than every 2 minutes risks hitting FTP connection limits on shared hosting.
My hosting says “FTP is disabled” — what now?
Some modern hosting providers disable plain FTP in favour of SFTP. Check if SSH access is available and configure SFTP instead. Alternatively, some providers offer a web-based file manager or API for uploads.
Does GraphWeather support FTP over TLS (FTPS)?
Yes. In the publishing settings, enable “Explicit TLS” or “FTPS.” This encrypts the connection while still using port 21 for the control channel. Not all hosting providers support it — check with your host.
Why does my upload work from a desktop FTP client but fail from GraphWeather?
Most likely a passive mode or timeout setting difference. Desktop FTP clients often handle mode negotiation automatically. Verify that GraphWeather is using the same mode (passive) and that timeout values are at least 30 seconds.