Platform: Fly.io | Provider: Fly.io | Free Tier: $5/month credit forever
The Secret Nobody Talks About
Here's what makes Fly.io special: they give you $5 of free credit every single month, forever. Not a trial, not a limited-time offer—permanent free hosting for your Docker containers. If your usage stays under $5 (spoiler: it will for most projects), you pay nothing.
Even better? Unlike every other platform that claims to be "free," Fly.io runs your Docker containers as real VMs. This isn't serverless where your app goes to sleep after 5 minutes. Your containers stay running 24/7, responding instantly to requests.
I've been running three production APIs on Fly.io for over a year. Total cost? Zero dollars. Here's exactly how to do it.
What You Get for Free
That $5 monthly credit translates to serious infrastructure:
You get three VMs with 256MB RAM each, running anywhere in the world. Add a PostgreSQL database with 1GB storage. Throw in 160GB of outbound bandwidth. All of this fits comfortably within your free allowance, with room to spare.
The math is simple: a single 256MB VM costs about $1.94/month. Three of them plus a small database lands you right around $5. As long as you stay within these limits, Fly.io's monthly credit covers everything.
Getting Started Takes 5 Minutes
First, install the Fly CLI. On Mac, it's a single brew command. On Linux, curl their install script. Windows users get PowerShell. The whole thing takes 30 seconds.
# macOS
brew install flyctl
# Linux
curl -L https://fly.io/install.sh | sh
# Windows
pwsh -Command "iwr https://fly.io/install.ps1 -useb | iex"Sign up with just an email—they'll ask for a card eventually, but you can deploy your first apps without one:
flyctl auth signupYour First Deploy (It's Ridiculously Easy)
Here's where Fly.io shines. Got a Dockerfile? Great, it'll work. Don't have one? Fly.io will figure it out. I'm serious—it detects your framework and generates everything automatically.
Let me show you a real example. Here's a Node.js API I deployed last week:
// index.js
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;
app.get('/', (req, res) => {
res.json({
message: 'This API runs 24/7 for free',
timestamp: new Date().toISOString()
});
});
app.get('/health', (req, res) => {
res.json({ status: 'healthy' });
});
app.listen(port, '0.0.0.0', () => {
console.log(`Running on port ${port}`);
});To deploy this, I literally just ran:
flyctl launchThat's it. Fly detected Node.js, created a Dockerfile, built the image, and deployed it globally. The whole process took about 2 minutes. My API was live at a *.fly.dev URL, with automatic HTTPS, responding to requests from the nearest data center.
The Docker Advantage Nobody Mentions
Here's what sets Fly.io apart from Vercel, Netlify, and the rest: you're deploying actual Docker containers. This means you can run literally anything—Python scripts, Go binaries, Rust servers, PHP applications, Ruby on Rails, you name it.
I've got a Python Flask API that processes webhooks, a Node.js bot that runs scheduled tasks, and a Go service that handles image resizing. All running on the free tier. Try doing that on Vercel's hobby plan.
Your containers run as Firecracker microVMs, the same technology Amazon uses for Lambda. They boot in milliseconds but act like real servers. No cold starts, no 10-second timeouts, no serverless limitations. Just your code running exactly how you expect.
Making 256MB Work (It's Easier Than You Think)
The free tier gives you 256MB of RAM per VM. I know what you're thinking—that's nothing! But you'd be surprised. A lightweight Express.js API uses about 50MB. A Flask app with a few endpoints sits around 80MB. Even a small Rails app can squeeze into 200MB if you're careful.
Here's what runs great on 256MB:
- API backends (REST or GraphQL)
- Webhook processors
- Scheduled job runners
- Static sites with dynamic features
- Discord/Slack bots
- Small databases with SQLite
And here's what doesn't:
- Next.js (needs at least 512MB)
- Large Django applications
- Java Spring Boot apps
- Anything loading big datasets into memory
If you hit memory limits, you have two options. First, optimize your code—stream files instead of loading them into memory, use pagination for database queries, lazy-load dependencies. Most "memory problems" are just inefficient code.
Second option: scale up to 512MB. This puts you slightly over the free tier, costing maybe $2-3/month. Still cheaper than a coffee, and way more useful.
PostgreSQL That Just Works
Adding a database is stupidly simple:
flyctl postgres createChoose "Development" configuration when prompted. This gives you a PostgreSQL instance with 256MB RAM and 1GB storage, perfect for small apps. The database runs in the same region as your app for minimal latency.
Connect it to your app:
flyctl postgres attach <database-name>This automatically sets a DATABASE_URL environment variable. Your app can connect immediately:
const { Pool } = require('pg');
const pool = new Pool({
connectionString: process.env.DATABASE_URL
});
// That's it. You have a database.I'm running a blog with 500+ posts, a user system with 1000+ accounts, and an analytics dashboard tracking 50k events—all on the free tier database. Unless you're building the next Twitter, 1GB is plenty.
Going Global Without Trying
Deploy to multiple regions with one command:
flyctl regions add lhr # London
flyctl regions add nrt # Tokyo
flyctl regions add syd # SydneyFly.io automatically routes users to the nearest instance. Your European users hit London, Asian users hit Tokyo, and it all just works. No configuration, no CDN setup, no nothing.
With three free VMs, you can put one in each region for truly global coverage. Or keep all three in one region for redundancy—if one crashes, the others keep serving requests.
The Catches (There Aren't Many)
Let's be real about the limitations. The $5 credit doesn't roll over month-to-month. Use it or lose it. But honestly, running three small VMs 24/7 uses the full credit anyway.
You'll eventually need to add a credit card to unlock certain features like custom domains and to prevent service interruption if you go over the limit. But here's the thing—Fly.io emails you before charging anything. No surprise $500 bills because you forgot to shut down a test server.
The 256MB RAM limit is real. You can't just throw inefficient code at it and expect miracles. But this constraint forces you to write better code, and that's not a bad thing.
When to Use Fly.io vs Everything Else
Use Fly.io when you want real servers that never sleep. Perfect for APIs, webhooks, bots, and anything that needs to respond instantly. The Docker support means you can run any language or framework.
Use Vercel when you're building Next.js sites and want that perfect developer experience. Their preview deployments are unmatched.
Use Cloudflare Workers for edge functions that need to run in 50+ locations with zero cold starts.
Use Railway when you want a prettier UI and don't mind paying from day one.
But for getting a real app online, for free, that stays running? Fly.io wins every time.
Your Turn to Deploy
Stop reading and try it. Seriously, it takes 5 minutes:
- Install the CLI
- Create a simple app (or use one you already have)
- Run
flyctl launch - Watch your app go live
That's it. No complex configuration, no yaml hell, no billing surprises. Just your code running on real infrastructure.
Build Something to Deploy
Ready to deploy your first app to Fly.io? Start by building a real project with these hands-on tutorials:
- Build a Blog with Flask - Create a complete Flask blog perfect for Fly.io deployment
- Build a Portfolio with Flask - Learn Flask fundamentals with a deployable portfolio site
- Build E-Commerce with Flask - Master Flask with a full shopping cart application
Each tutorial includes Docker configuration and deployment steps, making it easy to take your project from development to production on Fly.io's free tier.
Already have a Flask app? Follow our complete Docker and Fly.io deployment tutorial for step-by-step instructions on containerizing your Flask application with PostgreSQL and deploying to Fly.io with zero-downtime migrations.
Technical Details
Platform: Fly.io Monthly Credit: $5 (covers 3 VMs + database) Deployment: Docker containers as microVMs Regions: 30+ worldwide RAM per VM: 256MB (upgradeable) Database: PostgreSQL with 1GB storage Bandwidth: 160GB/month included
Note: You'll need a credit card on file after initial testing, but won't be charged if you stay under $5/month usage.
Fred
AUTHORFull-stack developer with 10+ years building production applications. I've deployed applications to every major cloud platform and lived to tell the tale.

