Dev Tools · 1h ago
Free Hosting Kills Bots Without HTTP Ports—Here's the One-Line Fix
Bots on free hosting often go offline because platforms health-check via HTTP, but bots don't listen on a port. The fix is to run a tiny HTTP server alongside the bot, like StayPresent, which starts a web server and launches the bot as a subprocess. This one-line solution prevents the platform from marking the bot as unhealthy or restarting it.
Meridian48 take
This is a practical workaround for a platform quirk, but it highlights a broader issue: free tiers are designed for web apps, not long-running processes, so developers must hack around infrastructure assumptions.
Read the full reporting
Why Does My Bot Go Offline After a Few Minutes on Free Hosting? →
DEV Community
bot-hostingfree-tier