GitHub Setup
GitHub Setup info →
GitHub Setup
Cloudflare Pages
Vercel
Netlify
Firebase Hosting
Surge
AWS
VPS
cPanel / Plesk
Static & PHP Hosting
Deployment is the process of taking your Astro Docus project from your local machine and making it available on the internet. Astro Docus builds to static HTML, CSS, and JavaScript — which means it can be hosted anywhere that serves files.
No server runtime is required. No database. No backend. Just files.
This makes Astro Docus compatible with nearly every hosting provider in existence, from free platforms like Cloudflare Pages and Netlify, to traditional VPS and shared hosting with cPanel.
Before deploying anywhere, you need to build the production version of your site.
npm run buildThis command:
dist/ folderThe dist/ folder is what gets deployed. Nothing else.
To preview the build locally before deploying:
npm run previewThis runs a local server serving the contents of dist/, exactly as it will appear in production.
Astro Docus can be deployed to any of the following. Each has its own strengths.
| # | Platform | Best For | Cost | Setup Difficulty |
|---|---|---|---|---|
| 1 | Static Hosting | Simple sites, quick uploads | Free–cheap | Easy |
| 2 | GitHub | Version control + source backup | Free | Easy |
| 3 | Cloudflare Pages | Fast global CDN, Git integration | Free | Easy |
| 4 | Vercel | Frontend-focused, Git integration | Free tier | Easy |
| 5 | Netlify | Drag-and-drop + Git integration | Free tier | Easy |
| 6 | Firebase Hosting | Google ecosystem, fast CDN | Free tier | Medium |
| 7 | AWS | Enterprise, full control | Pay-as-you-go | Hard |
| 8 | VPS | Full control, custom setups | Varies | Hard |
| 9 | cPanel / Plesk | Traditional shared hosting | Cheap | Easy |
Each will be covered in detail in its own page.
If you are unsure, here is a simple decision path:
For most users, Cloudflare Pages is the recommended starting point. It is free, extremely fast, and integrates directly with GitHub.
Before deploying, make sure you have:
A working local build — npm run build completes without errors.
The correct site URL — set in astro.config.mjs:
site: 'https://yourdomain.com',This is used for sitemaps, canonical URLs, and RSS.
The correct adapter — depending on host:
cloudflare({ imageService: 'passthrough' })vercel()netlify()A Git repository (recommended) — most platforms deploy from GitHub. Setting up Git first makes everything smoother.
A domain name (optional) — every platform provides a free subdomain, but a custom domain looks more professional.
Most modern deployment platforms follow the same pattern:
Local project → Git push → Platform detects change → Build → DeployYou commit your code, push it to GitHub, and the platform automatically:
npm install and npm run builddist/Every future push to the main branch triggers a new deploy. Some platforms also create preview URLs for pull requests, so you can see changes before merging.
For platforms without Git integration (cPanel, some VPS setups), you upload the dist/ folder manually via FTP, SSH, or a control panel file manager.
Each platform has its own small quirks. Here is a quick preview of what is covered in the individual guides.
npm run builddistcloudflare({ imageService: 'passthrough' })npm run builddistvercel()npm run builddistnetlify()npm run builddistdist/ to an S3 bucketdist/ via SSH or SFTPdist/ contents to public_html/Even if your chosen platform supports direct upload, using GitHub is recommended because:
The GitHub setup guide is the second page in this list and covers:
If you are new to Git, start there.
Some platforms require environment variables — for example, if your project uses a CMS with API keys. Astro Docus works without any environment variables for the default setup.
If you do need them:
.env file.env fileOnly set the variables you actually use. Do not expose secrets in client-side code.
Every platform offers a free subdomain:
your-project.pages.devyour-project.vercel.appyour-project.netlify.appyour-project.web.appTo use your own domain:
Each platform guide covers the DNS setup in detail.
| Problem | Likely Cause | Fix |
|---|---|---|
| Build fails on the platform | Node version mismatch | Set Node version in platform settings |
| Broken images after deploy | Wrong site URL | Update astro.config.mjs |
| Pages return 404 | Wrong output directory | Set output to dist |
| Slow first load | No CDN caching | Enable platform caching |
| Sitemap URLs wrong | site URL missing | Set it in astro.config.mjs |
| Adapter mismatch | Wrong import | Match adapter to platform |
If you are deploying Astro Docus for the first time, follow this order:
This path gets you online in under 15 minutes.
This page is the introduction. Each deployment method is covered in its own detailed guide under docs/deploy-hosting/. The planned pages are:
| Page | File | Covers |
|---|---|---|
| Static Hosting | docs/deploy-hosting/static.md | Generic static hosts, manual uploads |
| GitHub Setup | docs/deploy-hosting/github.md | Account, Git install, repo, first push |
| Cloudflare Pages | docs/deploy-hosting/cloudflare.md | Signup, GitHub connect, direct upload, domain |
| Vercel | docs/deploy-hosting/vercel.md | Signup, GitHub connect, direct upload, domain |
| Netlify | docs/deploy-hosting/netlify.md | Signup, GitHub connect, drag-drop, domain |
| Firebase Hosting | docs/deploy-hosting/firebase.md | Firebase CLI, init, deploy, domain |
| AWS | docs/deploy-hosting/aws.md | S3, CloudFront, Route 53 |
| VPS | docs/deploy-hosting/vps.md | Nginx, SSL, manual deploy |
| cPanel / Plesk | docs/deploy-hosting/cpanel.md | File manager, FTP upload, subdomain setup |
Each page is self-contained and includes registration steps, connection steps, and troubleshooting.
Deployment flow: Local project → Git push → Platform build → Live site
Requirements: ├── Working local build (npm run build) ├── Correct site URL in astro.config.mjs ├── Correct adapter for your host ├── GitHub account (recommended) └── Domain (optional)
Options: ├── Static hosting → manual upload ├── GitHub → source control ├── Cloudflare Pages → free, fast, recommended ├── Vercel → frontend-focused ├── Netlify → drag-and-drop or Git ├── Firebase → Google ecosystem ├── AWS → enterprise ├── VPS → full control └── cPanel / Plesk → shared hosting
Recommended start: 1. Set up GitHub 2. Deploy to Cloudflare Pages 3. Add custom domainDeployment is not a single step — it is a small workflow. Once Git and one platform are set up, every future change publishes with a single git push.