
Open source powers the internet. It deserves free deployments.
If your GitHub repo is public, Defang lets you deploy to your own AWS or GCP account for free. Not a 14-day trial. Not a limited tier that expires. Free. Forever. In this post we’ll focus purely on AWS.
How It Works
Defang detects when you're deploying from a public repository. That's it. No application process. No approval needed. No credit card required.
You bring your AWS account. We handle the deployment. You pay AWS directly for whatever resources you use. Defang's fee? Zero.
Why We're Doing This
Open source maintainers already give enough. Their time. Their expertise. Their weekends.
They shouldn't also have to pay for deployment tooling just to share their work with the world. Or spend days learning Terraform to get their project running somewhere other than localhost.
We believe deploying an app should be as easy as building one. For open source, we believe it should also be free.
What You Get
Everything. The same features paid users get.
One command deploys to your AWS account. The agentic CLI catches errors and fixes them. Named Stacks for dev, staging, and production environments. Full deployment history in the Portal. Native support for AI agent frameworks like CrewAI, LangGraph, and n8n.
Your cloud. Your infrastructure. Full control.
Getting Started
You'll need three things:
- A Defang account (free at defang.io)
- A public GitHub repository
- An AWS account
Step 1: Configure AWS via the Portal
- Go to portal.defang.io and log in
- Navigate to Clouds → AWS
- Select your GitHub organization
- Choose whether to allow all repos or private repos only
- Enter your AWS Account ID and select your preferred region
- Click Launch CloudFormation to open AWS CloudFormation with pre-filled parameters
- In AWS CloudFormation, review the stack and click Create stack
That's it. The CloudFormation stack creates everything you need: the OIDC identity provider, an IAM role with the right trust policy, and all the resources Defang needs to deploy to your account.
Step 2: Create your GitHub Actions workflow
Create .github/workflows/deploy.yml in your repo:
Replace YOUR_AWS_ACCOUNT_ID with your 12-digit AWS account ID and us-west-2 with your preferred region.
Step 3: Push and Deploy
Commit the workflow file. Push to main. Watch your app deploy.
Every push to main now triggers a deployment. Your open source project is live on production-grade AWS infrastructure. For free.
Prefer Manual Setup?
If you want more control over the AWS configuration, check out our manual setup guide.
What Gets Provisioned
When you deploy, Defang creates real AWS infrastructure in your account:
- ECS Fargate for running your containers
- Application Load Balancer with SSL certificates
- VPC with private and public subnets
- Security groups with least-privilege access
- CloudWatch for logs and monitoring
- RDS if you need a database
- ElastiCache if you need Redis
All of it follows AWS Well-Architected best practices. All of it yours to inspect, modify, or tear down.
Estimate Costs Before You Deploy
Defang is free. AWS isn't. But you can see exactly what you'll pay before deploying:
For most open source projects running in affordable mode, you're looking at $20-50/month in AWS costs. Some projects will be less.
The Deal
- Your repo must be public on GitHub
- You deploy to your own AWS or GCP account
- You pay AWS/GCP directly for resources
- Defang is free
That's it.
Open Source Deserves Better
Too many projects die on localhost because deployment is too hard, too expensive, or both.
We're trying to fix that.
If you're building something open source, we want to help you ship it. One command. Your cloud. Free.
Get started at defang.io
Have questions? Join our Discord or open an issue on GitHub.
Related posts


FastAPI deployment Heroku vs AWS / GCP with Defang
Defang brings Heroku’s simplicity to your own cloud: deploy FastAPI apps to AWS or GCP with a single command using your existing Docker Compose. You keep full ownership, pay raw cloud costs, and stay portable. No platform lock-in, same Heroku-style workflow.
