Skip to content

Deploy your Astro Site to Seenode

How to deploy your Astro site to the web on Seenode.

Seenode is a deployment platform for building and deploying web applications with databases, built-in observability, and auto-scaling. Astro sites can be deployed to Seenode using server-side rendering (SSR).

This guide includes instructions for deploying to Seenode through the web interface.

To enable on-demand rendering in your Astro project and deploy to Seenode, add the Node.js adapter with the following astro add command. This will install the adapter and make the appropriate changes to your astro.config.mjs file in one step.

After installing the adapter, update your astro.config.mjs to configure the server for Seenode’s requirements:

astro.config.mjs
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';
export default defineConfig({
output: 'server',
adapter: node({
mode: 'standalone'
}),
server: {
port: process.env.NODE_ENV === 'production' ? (Number(process.env.PORT) || 80) : 4321,
host: true
}
});

Update your package.json to include a start script that runs the built server:

package.json
{
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"start": "NODE_ENV=production node ./dist/server/entry.mjs"
}
}

You can deploy to Seenode through the web interface by connecting your Git repository.