# AWS with Flightcontrol (Docker)

In this tutorial, you will learn how to export your Webstudio Project and use [Flightcontrol](https://www.flightcontrol.dev) to deploy it to [AWS](https://aws.amazon.com).

{% hint style="info" %}
Flightcontrol is a PaaS that deploys to your AWS account, enabling you to leverage the power and cost of AWS without the complexity.
{% endhint %}

{% embed url="<https://youtu.be/_YpTBvARxic>" %}

## Prerequisites

* [GitHub account](https://github.com)
* [AWS account](https://aws.amazon.com)
* [Flightcontrol account](https://www.flightcontrol.dev)
* [Webstudio CLI](/university/self-hosting/cli.md)

## 1. Create a GitHub repository

Create a repository where you will add the Webstudio Project code in the following steps.

Be sure to clone the repository to your local machine.

## 2. Export Webstudio Project

Use the [CLI](/university/self-hosting/cli.md) to export your Project and select the “Docker” option.

<figure><img src="/files/eMtIEmr5ZyG2JPTStxKL" alt="Selecting Docker for Webstudio"><figcaption></figcaption></figure>

## 3. Push to GitHub

Now that the site code is local, push it to GitHub.

{% hint style="info" %}
You do not need to install dependencies.
{% endhint %}

## 4. Setup Flightcontrol

1. Follow the prompt to connect AWS, which will direct you to AWS. Then click “Create stack”. It may take a couple of minutes, but once it is done, Flightcontrol will take you to the next step.

   ![AWS setup in Flightcontrol](/files/aa4mCjhLlJY87LY6BLFh)
2. Connect your GitHub account and select the repository you want to give it permission to.

   ![connect GitHub button](/files/2fyOYWgQHYV9KimDH5SS)
3. Follow the prompts: Select "Build your own" > Select "Web server" > and select "Dockerfile" in "Build Configuration".

   ![build your own option](/files/kR31QivIbTct1fGH4cBX) ![build config dockerfile](/files/tTpuOogNqyQCRKkKkum7)
4. Deploy and wait. The initial deployment takes some time. Please allow up to \~15 minutes for the deployment to finish.

   ![Deployed app](/files/xPN1V6kC7y3iSth57rMK)
5. (Optional) If you are loading images from third-party domains, usually in the case of [CMS integrations](/university/foundations/cms.md), you must specify those asset domains in the Environment Variables tab with the key `DOMAINS` and a comma-separated list of the third-party domains. It’s best to inspect your HTML/API response to see the exact domain the platform is using.

   ![Adding third party domains to flightcontrol](/files/UlFWkQLrsDfYtN7qtwE5)

## 5. Sync, Build, and push new changes

When you are ready to publish your latest changes again, follow these steps:

1. Click “Publish” in the builder (even though you aren’t publishing to the cloud, it’s necessary to generate the latest build data).
2. Run `webstudio sync`
3. Run `webstudio build --template docker`
4. Push the changes to GitHub

<figure><img src="/files/2nHfjVhccbseObuORx2a" alt="webstudio sync command"><figcaption></figcaption></figure>

***

Now, you should have a website built on Webstudio that is hosted on AWS using Flightcontrol.

## Related

* [CLI](/university/self-hosting/cli.md) – Export and build your project using the command line
* [Digital Ocean with Coolify](/university/self-hosting/digital-ocean-coolify.md) – Deploy using Coolify on Digital Ocean
* [Hetzner with Coolify](/university/self-hosting/hetzner-coolify.md) – Deploy using Coolify on Hetzner
* [VPS with Docker](/university/self-hosting/vps-with-docker.md) – Manual Docker deployment on any VPS
* [Publishing and custom domains](/university/foundations/publishing-and-custom-domains.md) – Set up custom domains for your site


---

# 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/flightcontrol.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.
