# Self-Hosting

The Builder and Projects are hosted separately. The Builder is used to create Projects, and when a Project is published or exported, the site/app is deployed independently.

## Builder

{% hint style="warning" %}
While both the Builder and the generated site are open-source, self-hosting the Builder in production is more difficult and currently not recommended. You can still [self-host the Builder for development](/contributing/contributing-for-developers.md#running-the-webstudio-project-using-github-codespaces), and of course, you can self-host the sites for production.
{% endhint %}

## Projects

After building, export your Projects and host them on your own server or preferred platform.

### Export methods

There are two ways to export Projects:

1. [**Webstudio CLI** ](/university/self-hosting/cli.md)– Allows you to interact with and export your Projects. **Supports static and dynamic (see below).**
2. [**Download button in the Builder**](/university/self-hosting/download.md) – Click a button in the Webstudio Builder, and the Project will be downloaded as a zip. **Supports static only (see below).**

{% hint style="warning" %}
If you are self-hosting the Builder, then please use the [Webstudio CLI](/university/self-hosting/cli.md) to export your project.
{% endhint %}

### Export types

There are two types of exports:

* **JavaScript application** – Builds a dynamic [Remix app](https://remix.run/). This is the default behavior of Webstudio Cloud and provides the most functionality, but it requires hosting that works with apps.
* **Static site** – Outputs a static site (HTML/CSS/JS) with limited functionality, but has more versatile hosting options.

{% hint style="warning" %}
If you want the export to contain human-readable class names, disable atomic CSS. See [Atomic CSS](/university/foundations/project-settings.md#atomic-css) for more information.
{% endhint %}

#### **JavaScript application**

This is the default behavior if you were to publish to Webstudio Cloud.

The JavaScript application supports dynamic functionality like [CMS integrations](/university/foundations/cms.md), Webhook forms, [image optimization](/university/core-components/image.md#optimize), redirects, and more.

JavaScript applications require a hosting environment that handles server-side code execution, fetching data from CMS integrations, and more.

#### Platforms for JavaScript applications

Here are the platforms we have documented.

**Serverless:**

Serverless platforms enable you to push code, and they handle the rest, from infrastructure to scaling.

{% hint style="info" %}
This self-hosting option is the easiest to use, though there is less flexibility in platform choice.
{% endhint %}

{% content-ref url="/pages/NTtYU4Aze2YAnbMZoV7F" %}
[Netlify](/university/self-hosting/netlify.md)
{% endcontent-ref %}

{% content-ref url="/pages/5yi7Mh0tJVVIHIzqZhol" %}
[Vercel](/university/self-hosting/vercel.md)
{% endcontent-ref %}

**Servers:**

Webstudio provides a Dockerfile, which enables your site to run on any server that supports containers.

{% hint style="info" %}
This self-hosting option is more technical compared to others, but it offers a higher degree of flexibility regarding its deployment location.
{% endhint %}

{% hint style="warning" %}
The Docker build requires a *minimum* of 1 GB of memory and 1 core CPU, though more is recommended.
{% endhint %}

{% content-ref url="/pages/UImt0ieCrBOqxbGfVo4i" %}
[AWS with Flightcontrol (Docker)](/university/self-hosting/flightcontrol.md)
{% endcontent-ref %}

{% content-ref url="/pages/jAkS5WG17HPsBKBCzmVh" %}
[Digital Ocean with Coolify (Docker)](/university/self-hosting/digital-ocean-coolify.md)
{% endcontent-ref %}

{% content-ref url="/pages/FHq8oPPQN1zZG18yLRiR" %}
[Hetzner with Coolify (Docker)](/university/self-hosting/hetzner-coolify.md)
{% endcontent-ref %}

#### **Static site**

You can optionally export your Webstudio Project as a static site, i.e., a collection of HTML, CSS, JavaScript, and image files. This allows you to host your site on traditional hosting providers or, better yet, on dedicated static site hosting and deployment platforms.

#### Static site limitations

While static site exporting and hosting are less technical, this comes at the cost of functionality.

**The following are&#x20;*****not*****&#x20;supported:**

* Dynamic pages
* Redirects
* Statuses
* Client navigation
* Webhook form
* Image optimization
* No robots.txt
* No sitemap.xml

#### Local

To run a project locally, you must run a simple local server. Use the command `npx serve .` to spin one up. This is required because the static files use absolute URLs.

#### Platforms for static sites

Here are the platforms we have documented:

{% content-ref url="/pages/TeSYeEUu0WYU4uGb2ggd" %}
[Cloudflare Pages](/university/self-hosting/cloudflare-pages.md)
{% endcontent-ref %}

{% content-ref url="/pages/lJviNK2UJBkCJOFtQR8r" %}
[GitHub Pages](/university/self-hosting/github-pages.md)
{% endcontent-ref %}

{% content-ref url="/pages/NTtYU4Aze2YAnbMZoV7F" %}
[Netlify](/university/self-hosting/netlify.md)
{% endcontent-ref %}

{% content-ref url="/pages/5yi7Mh0tJVVIHIzqZhol" %}
[Vercel](/university/self-hosting/vercel.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webstudio.is/university/self-hosting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
