Deploy Astro
Astro outputs static files by default, making it the simplest framework to deploy on deploybase. No additional adapters or configuration needed unless you’re using SSR.
Requirements
Section titled “Requirements”- Astro 3+ (static output is the default)
Configuration
Section titled “Configuration”No special configuration is required for static Astro sites. The default output mode is 'static'.
If your astro.config.mjs explicitly sets an SSR adapter, remove it or switch to static:
import { defineConfig } from 'astro/config';
export default defineConfig({ // No adapter needed for static output});deploybase Defaults
Section titled “deploybase Defaults”| Setting | Value |
|---|---|
| Framework | astro |
| Build command | npm run build |
| Output directory | dist |
| Docker image | node:24-alpine |
Create and Deploy
Section titled “Create and Deploy”curl -X POST https://api.deploybase.eu/api/v1/projects \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "My Astro Site", "framework": "astro", "git_repo_url": "https://github.com/user/astro-site.git", "git_provider": "github" }'Common Issues
Section titled “Common Issues”Build fails with adapter error — If you previously used an SSR adapter (@astrojs/node, @astrojs/vercel, etc.), remove it from astro.config.mjs and uninstall the package. deploybase only serves static files.
Custom output directory — If your Astro config sets outDir to something other than dist, update the project:
curl -X PATCH https://api.deploybase.eu/api/v1/projects/PROJECT_ID \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"output_dir": "your-custom-dir"}'Content collections — Astro content collections work without any special configuration. They are resolved at build time and output static HTML.