---
title: "Deploy Astro on your own server - Deplo"
description: "Push an Astro site and Deplo builds it and serves it on port 4321, on a server you own, with HTTPS in front."
url: "https://deplo.build/frameworks/astro"
image: "https://deplo.build/api/media/file/og_cover.png"
updated: "2026-10-09"
---

# Deploy Astro on your own server

Push an Astro site and Deplo builds it and serves it on port 4321, on a server you own, with HTTPS in front.

## From repo to live in three steps

1. Connect the repository that holds your Astro app.
2. Deplo detects Astro and sets the install, build and start commands and the port.
3. Push to the branch: every push builds and rolls out a new version.

## What Deplo sets up

- Detected from the astro dependency or an astro.config file at the root.
- Install, build and start commands chosen for you, with Astro's port 4321 already set.
- Every push rebuilds the site, so new content goes live with the commit that adds it.
- HTTPS through Traefik as soon as the domain points at the server.

Detection runs on every deploy and is never stored, so a change to the project is picked up by the next push.

[Learn more](https://deplo.build/docs/concepts/what-happens-on-a-deploy#the-framework-is-detected)

## Astro on Deplo

Short answers to what comes up before moving a Astro app onto your own server.

### What about pages rendered on request?

Add the @astrojs/node adapter in standalone mode: the build then has a server that Deplo starts on the app's port.

### Where do environment variables go?

In the app's settings, per environment. They are available during the build too, and secret values are write only: nothing reads them back.

### What if I need more control over the build?

Commands you type in the app's settings always win over detection, and a Dockerfile build takes over entirely.

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://deplo.build/#organization",
      "name": "Deplo",
      "url": "https://deplo.build",
      "description": "Deploy apps from Git, Docker images or Compose on your own servers with Deplo. Open source, automatic HTTPS, backups and no per-seat fees.",
      "logo": {
        "@type": "ImageObject",
        "url": "https://deplo.build/api/media/file/og_logo.png",
        "width": 824,
        "height": 824
      },
      "sameAs": [
        "https://ds.deplo.build",
        "https://x.com/deplocloud",
        "https://www.instagram.com/deplocloud",
        "https://github.com/DeploCloud/deplo"
      ]
    },
    {
      "@type": "WebSite",
      "@id": "https://deplo.build/#website",
      "name": "Deplo",
      "url": "https://deplo.build",
      "description": "Deploy apps from Git, Docker images or Compose on your own servers with Deplo. Open source, automatic HTTPS, backups and no per-seat fees.",
      "publisher": {
        "@id": "https://deplo.build/#organization"
      }
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Frameworks",
      "item": "https://deplo.build/frameworks"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Deploy Astro on your own server",
      "item": "https://deplo.build/frameworks/astro"
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What about pages rendered on request?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Add the @astrojs/node adapter in standalone mode: the build then has a server that Deplo starts on the app's port."
      }
    },
    {
      "@type": "Question",
      "name": "Where do environment variables go?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "In the app's settings, per environment. They are available during the build too, and secret values are write only: nothing reads them back."
      }
    },
    {
      "@type": "Question",
      "name": "What if I need more control over the build?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Commands you type in the app's settings always win over detection, and a Dockerfile build takes over entirely."
      }
    }
  ]
}
```
