---
title: Hosting a static website with Serverless Containers
description: This page provides guidelines on how to host and deploy a static website using Scaleway Serverless Containers
tags: deploy host website webapp html static containerize application docker dockerfile
products:
  - containers
  - container-registry
dates:
  validation: 2025-10-06
  posted: 2025-10-06
  validation_frequency: 12
difficulty: beginner
usecase:
  - application-hosting
  - deploy-external-software
  - website-hosting
ecosystem:
  - third-party
---

import Requirements from '@macros/iam/requirements.mdx'


<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- Installed [Docker](https://docs.docker.com/get-started/get-docker/) or [Docker Engine](https://docs.docker.com/engine/install/)
- [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) and [logged into it](/container-registry/how-to/connect-docker-cli/)

## Create and host a simple HTML static page

To host a static HTML page on Serverless Containers, you first need to create a simple HTML page that will serve as your website. Next, you will write a Dockerfile to containerize your application, specifying how your HTML file should be served. You will then build the container image locally, and push it to the [Scaleway Container Registry](/container-registry/), before deploying it to [Scaleway Serverless Containers](/serverless-containers/).

1. In a terminal, run the command below to create a new folder and access it:

    ```bash
    mkdir my-static-website
    cd my-static-website
    ```

2. Create a new `index.html` file and add the example code below to it:

    ```html
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Simple HTML Page</title>
    </head>
    <body>
        <h1>Hello World</h1>
        <p>This is a simple paragraph.</p>
    </body>
    </html>
    ```

3. In the same folder, create a new `dockerfile` file and add the following code to it:

    ```dockerfile
    FROM nginx:alpine
    COPY ./my-static-website /usr/share/nginx/html
    EXPOSE 80
    ```

4. Run the command below to build, tag, and push your image to the Scaleway Container registry:

    ```bash
    docker build \
    --platform linux/amd64 \
    --push \
    -t <CONTAINER_REGISTRY_ENDPOINT>/my-static-website:latest .
    ```

    <Message type="note">
    You can find your Container Registry endpoint in the **Settings** tab of your Container Registry Endpoint in the [Scaleway console](https://console.scaleway.com/registry/namespaces)
    </Message>

5. [Deploy a Serverless Container](/serverless-containers/how-to/deploy-container/) with the following parameters:

    - **Registry**: Scaleway Container Registry
    - **Registry namespace**: the Container Registry namespace you pushed your image to.
    - **Container port**: `8O` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile.
    - **Resources**: `100 mVCPU` and `256 MB` memory
    - **Autoscaling**: set a minimum scale of `1` to avoid [cold starts](/serverless-containers/concepts/#cold-start) (optional).

    The deployment of your container can take up to a minute to complete.

6. Once your container is **ready**, click the **container endpoint** from its **Overview** tab. Your web page displays, and is available to anyone with the link.

## Going further

- You can host a website composed of multiple pages in the `my-static-website` folder.
- You can [add a custom domain](/serverless-containers/how-to/add-a-custom-domain-to-a-container/) name to your website.
- You can host dynamic websites using dedicated frameworks for high-quality web applications.
