Deploy Astro on Zeabur
Astro is a modern website building tool with a powerful developer experience and lightweight output.
This guide will help you deploy your Astro site on Zeabur.
Step 1: Create an Astro Project
You can create an Astro project using the command below and follow the prompts for configuration.
npm create astro@latest
Step 2: Set up Node.js Adapter
Use Astro’s official @astrojs/node
to deploy your project on Zeabur using containerization mode:
import node from '@astrojs/node';
export default {
// ...
adapter: node({ mode: 'standalone' }),
output: 'server'
// ...
};
Step 3: Deploy to Zeabur
Method 1: Using the Zeabur CLI
First, ensure that you have installed the Zeabur CLI according to the guide Deploy in CLI.
Then, in your newly initialized Astro project, add uncommitted files to Git.
git add -A
git commit -m "Initial commit"
Next, deploy your service using the command below.
zeabur
Method 2: Using the Zeabur Dashboard
Navigate to the Zeabur Dashboard and create a new project.
Then, click on the Deploy New Service
button and choose to deploy from GitHub.
If this is your first time deploying a project from GitHub on Zeabur, you will need to configure and install the GitHub App. You can view a more detailed guide here.
After selecting the repository and branch, Zeabur will automatically begin to build your service.
Zeabur will automatically detect that your service is built with Astro, so you don’t need to make any additional configurations. Your deployment will be completed in a few minutes.
Step 4: Bind a Domain
After the deployment is complete, you may need to configure a domain for your Astro site.
Open the “Domain” tab on the service page and click on “Generate Domain” or “Custom Domain”.
For more information on how to bind a domain to your service, please refer to Bind a domain.