Hosting Basics
You've built an app with AI. It works on your computer. Now you need to put it on the internet so other people can use it.
That's what hosting is — renting space on a computer that's always on and connected to the internet.
This page explains your hosting options in plain language, so you can choose the right one for your app.
What Is Hosting?
Think of hosting like renting a storefront:
- Your computer is like building a product in your garage — only you can see it
- Hosting is like renting a shop on Main Street — anyone can walk in and see your product
The "computer" you rent is called a server. It runs your app 24/7 and serves it to anyone who visits your website.
Types of Hosting
1. Static Hosting
Best for: Simple websites, landing pages, documentation sites, blogs
How it works: You upload HTML, CSS, and JavaScript files. The hosting provider serves them to visitors.
Pros:
- Very fast
- Very cheap (often free)
- No server management
- Scales automatically
Cons:
- Can't run backend code (databases, user accounts, etc.)
- Limited to static content
Good for: Sites built with plain HTML, React (static export), Docusaurus, Hugo, Jekyll
Providers: Cloudflare Pages, Vercel, Netlify, GitHub Pages
2. Serverless / Platform-as-a-Service (PaaS)
Best for: Web apps with backend logic, APIs, databases
How it works: You upload your code. The provider handles the server, scaling, and maintenance.
Pros:
- No server management
- Scales automatically
- Pay only for what you use
- Built-in databases and services
Cons:
- Can be more expensive at scale
- Less control over the server
- Some platforms have vendor lock-in
Good for: Most web apps, APIs, full-stack applications
Providers: Vercel, Railway, Render, Fly.io, Heroku, Netlify
3. Virtual Private Server (VPS)
Best for: Apps that need full control, custom configurations, or specific software
How it works: You rent a virtual computer with full control. You install everything yourself.
Pros:
- Full control over the server
- Can run any software
- Usually cheaper for high traffic
- No vendor lock-in
Cons:
- You manage everything (security, updates, backups)
- Requires more technical knowledge
- Manual scaling
Good for: Custom setups, apps with specific requirements, high-traffic sites
Providers: DigitalOcean, Linode, Vultr, AWS EC2
4. Container Hosting
Best for: Apps that need consistent environments across development and production
How it works: Your app runs in a container (like Docker) that includes everything it needs. The provider runs the container.
Pros:
- Consistent environment
- Easy to deploy and scale
- Good for complex apps
Cons:
- Requires Docker knowledge
- Can be more expensive
Good for: Apps with complex dependencies, microservices
Providers: Railway, Fly.io, DigitalOcean App Platform, AWS ECS
How to Choose
| Your App Type | Recommended Hosting | Example Provider |
|---|---|---|
| Simple website / blog | Static hosting | Cloudflare Pages (free) |
| Documentation site | Static hosting | Vercel (free) |
| Web app with database | PaaS | Railway ($5/month) |
| API backend | PaaS or serverless | Render (free tier) |
| E-commerce store | PaaS | Vercel + Stripe |
| Custom / complex app | VPS or container | DigitalOcean ($6/month) |
What to Look For in a Hosting Provider
Essential Features
| Feature | Why It Matters |
|---|---|
| HTTPS / SSL | Required for security and user trust |
| Custom domain | Use your own domain name (not provider's subdomain) |
| Automated backups | Recover from data loss |
| Monitoring | Know when your app goes down |
| Scaling | Handle more users as you grow |
Nice-to-Have Features
| Feature | Why It's Useful |
|---|---|
| CI/CD | Auto-deploy when you push to GitHub |
| Environment variables | Manage secrets without hardcoding |
| Database | Built-in database (PostgreSQL, MySQL) |
| CDN | Fast global content delivery |
| Staging environment | Test before deploying to production |
Hosting Providers Compared
| Provider | Type | Free Tier | Starting Price | Best For |
|---|---|---|---|---|
| Cloudflare Pages | Static | Yes | Free | Static sites, docs |
| Vercel | Static + Serverless | Yes | $20/month | Frontend apps, Next.js |
| Netlify | Static + Serverless | Yes | $19/month | Static sites, forms |
| Railway | PaaS | No | $5/month | Full-stack apps |
| Render | PaaS | Yes | $7/month | Web services, APIs |
| Fly.io | Container | Yes | Pay per use | Containerized apps |
| DigitalOcean | VPS | No | $6/month | Custom setups |
| Heroku | PaaS | No | $5/month | Traditional web apps |
Common Hosting Mistakes
Mistake 1: Choosing the Wrong Type
- Using static hosting for an app that needs a database
- Using a VPS when you don't know how to manage a server
- Using a complex solution when a simple one would work
Mistake 2: Not Setting Up Monitoring
You won't know your app is down unless you set up monitoring. See Monitoring & Error Tracking.
Mistake 3: No Backups
If your hosting provider doesn't automatically back up your data, set it up yourself. See Backups & Recovery.
Mistake 4: Ignoring Environment Variables
Don't hardcode secrets. Use your hosting provider's environment variable system. See API Keys & Secrets.
Mistake 5: Not Testing the Deployment Process
Deploy to a staging environment first. Make sure the deployment process works before you need to do it in a hurry.
Quick Start: Deploy Your First App
For a Static Site (like this documentation site)
- Sign up for Cloudflare Pages or Vercel
- Connect your GitHub repository
- Configure the build settings (if needed)
- Deploy
- Your site is live in minutes
For a Web App with a Database
- Sign up for Railway or Render
- Connect your GitHub repository
- Add a database (PostgreSQL)
- Set environment variables (database URL, API keys)
- Deploy
- Your app is live
The Bottom Line
Hosting doesn't have to be complicated. Start simple, and upgrade when you need to.
For most AI-built apps, a PaaS provider like Railway or Render is the sweet spot — easy to set up, handles the hard parts, and scales as you grow. You can always migrate to a more powerful solution later.
Don't overthink hosting. Pick a provider, deploy your app, and focus on building something people want to use.