Deploy Astro site to coolify
Small guide on how to deploy an astro site on mode server to coolify
The Problem
On Astro is very easy to deploy static apps to Coolify, but when using the mode server it gets a bit more difficult.
astro.config.mjs
This is the configuration needed to set the type of the app to server, this is an example for this site, samperalabs.com
output: 'server',
adapter: node({
mode: 'standalone'
}),
site: 'https://samperalabs.com',
server: { port: 4322 }
package.json
change the start command to the following
"start": "HOST=0.0.0.0 PORT=4322 node ./dist/server/entry.mjs"
Create the resource for the site on coolify
In this case I choose the github repo and selected the following parameters
Adjust the Configuration of the Resource
I have set the installation, build and start commands to follow the configuration that we need for astro.
Set the env variables and start
On the tab environment variables in the left side I set the urls I need and then I started the application
Related Posts
Deploy vite frontend to coolify
Learn how to deploy a vite project in coolify
Register domain with cloudflare and deploy it to coolify
quick guide on how to register a domain with cloudflare and deploy it to coolify
How to Manage SQLite Databases on a VPS ( with Coolify )
The Problem Keeping a SQLite database consistent between a Docker‑based VPS and local development requires a shared persistent volume, correct path...
Let's connect !!
Get in touch if you want updates, examples, and insights on how AI agents, Langchain and more are evolving and where they’re going next.