Skip to content

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.

  • Astro 3+ (static output is the default)

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
});
SettingValue
Frameworkastro
Build commandnpm run build
Output directorydist
Docker imagenode:24-alpine
Terminal window
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"
}'

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:

Terminal window
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.