- Home
- Frameworks
- Astro
Astro hosting with no vendor lock-in
Deploy Astro sites to servers you own
Static output or server-side rendering — Hatchbox deploys both, detects your project on its own, and serves the result over HTTPS from Caddy.
Includes a 7 day free trial. $10 per server per month after that — unlimited apps.
Astro ships almost no JavaScript by default, which makes it a great fit for a plain
server and a fast file server. Hatchbox finds astro in your
package.json, runs your build, and moves the generated dist
directory into place for Caddy. There's no build script to write.
Running SSR instead? Add one process for Astro's Node adapter and Caddy reverse proxies to it. Everything else about the deploy stays the same.
Why deploy Astro with Hatchbox
Static or SSR, your choice
Static builds get served from disk. SSR builds run as a managed Node process that Hatchbox restarts on deploy and on crash.
Detected from package.json
Hatchbox recognizes astro in your dependencies and wires up the build
and output directory without any configuration from you.
Your static assets are preserved
Astro's own public folder is moved aside to public-original
before the build output takes its place, so nothing gets clobbered.
No build minutes, no bandwidth bills
Builds run on your own server. You pay your hosting provider for bandwidth at normal rates instead of platform markup.
What customers say
I run 15+ Rails apps and static sites with Hatchbox. My bill went from $400/month on Heroku to $28/mo with Hatchbox & DigitalOcean combined.
Donn Felker
Software Professional
If you want the most bang for your buck, Hatchbox / Hetzner / DigitalOcean is the killer combo. You can throw sooo much at this and it's crazy how inexpensive it is.
Josh Pigford
Serial Entrepreneur
- Applications deployed
- 24,000+
- Deployments run
- 2 million+
- Deploying since
- 2016
How to deploy an Astro site
Four steps from an empty server to a live site over HTTPS.
-
Connect a server
Ubuntu LTS on any provider. Give it enough memory for your build — Astro builds are Node processes and can be hungry.
-
Add a process if you use SSR
Static sites need nothing here. For SSR with Node, add one process running Astro's server entrypoint.
-
Connect your repository
Pick the repo and branch, and enable auto-deploy on push.
-
Deploy
Hatchbox installs dependencies, runs your build, and promotes the release with automatic SSL.
What Hatchbox does for you
Detection is astro in your package.json. There's no build script
to write.
Build steps it runs
npm run build
mv public public-original && mv dist public
Astro's source public folder is moved aside rather than deleted, then the
dist output becomes the directory Caddy serves.
Processes, for SSR only
Using Astro's Node adapter for server-side rendering? Add a process running the server entrypoint and Caddy reverse proxies to it. A static build needs no process at all.
node ./dist/server/entry.mjs
Astro deployment questions
Still stuck? Ask us directly — a real person who has deployed a lot of Astro apps will answer.
node ./dist/server/entry.mjs. Caddy reverse proxies to it, and Hatchbox restarts it on every deploy and if it crashes.
dist. Hatchbox moves your source public folder aside to public-original and then moves dist into its place, so Caddy serves the built site without you configuring anything.
astro in your package.json. That's all Hatchbox needs to set up the build and output directory.
Simple, predictable pricing.
We charge per server, not per app. Run one application or twenty on the same box — the bill doesn't change.
$10
- Unlimited applications
- Deploy anywhere
- Zero downtime deployments
- Custom domains & free SSL
- Databases, cron jobs & background workers
- Full SSH access to your servers
- Real, human support
- 7 day free trial
Deploy more than Astro
One server, one bill, as many apps as it can hold. Run any of these alongside your Astro app for no extra cost.
- Ruby Deploy Ruby on Rails Rails deployment without the platform tax
- Ruby Deploy Hanami Hanami hosting on infrastructure you control
- Ruby Deploy Bridgetown Bridgetown hosting with full server access
- Go Deploy Hugo Hugo hosting without the per-site pricing
- Ruby Deploy Jekyll Jekyll hosting with real server access
- Ruby Deploy Middleman Middleman hosting on your own infrastructure
Ready to deploy your Astro app?
Hatchbox has run more than 2 million deploys across 24,000+ applications since 2016. Start a 7 day free trial and put yours on a server you own.