Deploy Astro App on Seenode | Astro Hosting & Deployment Guide
Astro is a modern, content-focused web framework for building fast websites using the Islands Architecture. This guide shows how to deploy your existing Astro project as a web service on seenode.
Prerequisites
Section titled “Prerequisites”Before you begin, ensure you have:
- Node.js 18+ installed locally
- Git configured on your machine
- A seenode account at cloud.seenode.com
- Existing Astro project ready to deploy
Configure for seenode Deployment
Section titled “Configure for seenode Deployment”Enable Server-Side Rendering (SSR)
Section titled “Enable Server-Side Rendering (SSR)”To deploy as a web service, Astro needs to be configured for server-side rendering. Install the Node.js adapter:
npx astro add node
This will automatically update your astro.config.mjs
and install the required dependencies.
Port Configuration
Section titled “Port Configuration”seenode requires applications to be reachable on port 80 at the load balancer. Your server should listen on PORT
from the environment, defaulting to 80
in production. Configure your Astro project accordingly:
import { defineConfig } from 'astro/config';import node from '@astrojs/node';
export default defineConfig({ output: 'server', // Enable SSR mode adapter: node({ mode: 'standalone' }), server: { // Use port from env in production (default 80), 4321 for development port: process.env.NODE_ENV === 'production' ? (Number(process.env.PORT) || 80) : 4321, host: true // Bind to 0.0.0.0 for container networking }});
Update Package Scripts
Section titled “Update Package Scripts”Ensure your package.json
includes the following scripts:
{ "scripts": { "dev": "astro dev", "build": "astro build", "preview": "astro preview", "start": "NODE_ENV=production node ./dist/server/entry.mjs" }}
Deploy on seenode
Section titled “Deploy on seenode”-
Push to Git
Commit your project and push it to GitHub or GitLab.
-
Create a Web Service
From the seenode Dashboard, create a new Web Service and connect your repository.
-
Configure Build & Start
seenode will detect a Node.js project. Configure:
- Build Command: npm ci && npm run build
- Start Command: npm start
- Build Command:
-
Choose Pricing Tier
Select your preferred instance size and create the service.
-
Deploy
Click Create Web Service and watch logs until your web service is live.
-
Success
Once complete, your Astro application will be accessible via your service’s URL.
Starting from Scratch?
Section titled “Starting from Scratch?”If you don’t have an Astro project yet:
Option 1: Use our Template (Recommended)
Astro Web Service Template
Deploy a minimal Astro web service with SSR, API endpoints, and seenode optimization.Option 2: Create from Astro Docs + seenode Setup
Follow the official Astro documentation to create a new project, then return here for seenode-specific deployment steps.
seenode-Specific Setup Steps:
- Run
npm create astro@latest
- Select the
minimal
template - Install Node.js adapter:
npx astro add node
- Configure for seenode (see “Configure for seenode Deployment” above)
Troubleshooting
Section titled “Troubleshooting”If your deployment fails, check the Logs tab. Here are solutions to common issues:
Next Steps
Section titled “Next Steps”Connect to a Database
Add PostgreSQL or MySQL for dynamic web services with server-side features