How to Host a Static Website on Cloider S3

Host a static website from an S3 compatible bucket on Cloider: a public bucket with index and error pages, its own HTTPS address, and a free subdomain or your own domain, from the dashboard, the cloider CLI or an AI coding agent, with a screenshot of every step.

Marei Morsy··12 min read
Host a static website on Cloider S3: a site folder with index.html, about/index.html, 404.html and style.css goes into a public bucket and is served to a browser over HTTPS
On this page

Key takeaways

  • A public bucket with its website on answers / and every folder with index.html, and anything missing with your error document and a 404.
  • Every website bucket gets its own HTTPS address, https://<bucket>.s3-website.eu-central-2.cloider.com.
  • A Bucket target serves the site on a free cloider.app subdomain or your own domain, with the certificate handled for you.
  • Upload what is inside your build folder, so index.html sits at the root of the bucket.
  • With the CLI it is cloider bucket create --public --website, cloider bucket upload -r, and cloider target create --bucket.
  • Only stored data is billed, $0.10 per GB per month. Requests and traffic are free.

A static website is a folder of files: HTML pages, CSS, JavaScript, images and fonts that every visitor gets exactly as they are stored. Portfolios, landing pages, documentation, blogs made with a static site generator and single-page apps built with React or Vue are all static once they are built. They don't need a server, a container or a database, only a place that serves the files over HTTPS.

Amazon S3 made object storage the usual place for that: you put the files in a bucket and turn on static website hosting. Cloider Object Storage is S3 compatible and works the same way. A public bucket with its website turned on answers / with index.html, serves each folder's index.html, shows your own 404 page for anything missing, and gets an HTTPS address of its own. One target then serves it on a free cloider.app subdomain or on your own domain.

In this guide you host a small site three ways:

  1. From the dashboard: create the bucket, upload the files, set the error page, then serve it on a free subdomain.

  2. With the cloider CLI: the same in a few commands, plus aws s3 sync for later updates.

  3. With an AI coding agent: one prompt, "using cloider cli host this site as a static website".

Options 1 and 2 show each step with a screenshot of what you will see. You only pay for storage: $0.10 per GB per month, with requests and traffic free, so a site of a few megabytes costs less than a cent a month.

What you are hosting

The example is a two-page personal site with its own 404 page. It is plain HTML and CSS, with no build step:

Text
site/
├── index.html
├── about/
│   └── index.html
├── 404.html
└── style.css
  • index.html is the home page. The bucket website shows it for /.

  • about/index.html answers at /about/, so the site gets clean URLs without .html in them.

  • 404.html is the error document, shown with a 404 status for every path that has no file.

  • style.css is loaded by every page from /style.css.

The pages link to each other with paths that start at the root, such as /about/ and /style.css, so they work on every address the site is served from. This is index.html:

HTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Jane Doe · Product designer</title>
  <link rel="stylesheet" href="/style.css">
</head>
<body>
  <header>
    <a class="logo" href="/">Jane Doe</a>
    <nav><a href="/">Home</a><a href="/about/">About</a></nav>
  </header>
  <main>
    <p class="eyebrow">Product designer</p>
    <h1>I design calm, useful software.</h1>
    <p class="lead">Ten years of turning messy workflows into interfaces people enjoy. This site is plain HTML and CSS, served straight from a Cloider bucket.</p>
    <a class="button" href="/about/">More about me</a>
  </main>
  <footer>© 2026 Jane Doe</footer>
</body>
</html>

A static site generator works the same way: build the site, then upload the output folder. That is dist/ for Vite and Astro, public/ for Hugo, _site/ for Jekyll and Eleventy, out/ for a Next.js static export, and build/ for Docusaurus and Create React App. What matters is that index.html ends up at the root of the bucket, not inside a dist/ folder.

How a bucket website answers requests

Every bucket has an S3 address, meant for S3 tools, SDKs and links to single files. Turning the website on gives the bucket a second address, meant for browsers, https://<bucket>.s3-website.eu-central-2.cloider.com. Both serve the same files, but the website address answers like a web server:

Request

What the website answers

/

index.html, with 200

/about/

about/index.html, with 200

/about, without the slash

A 302 redirect to /about/

/style.css

The file, with the Content-Type it was uploaded with

A path with no file

Your error document, 404.html, with 404

POST, PUT or DELETE

405 Method Not Allowed

The website reads the bucket without a key, like any visitor would, which is why the bucket needs public read access. Anyone can download everything in it, so keep drafts, source files and anything private in another bucket.


Option 1: host it from the Cloider dashboard

Step 1: Create a public bucket with the website on

Open Buckets in the sidebar and click Create Bucket. Type a Bucket Name, jane-doe-site here. Bucket names are shared by everyone on the endpoint, so pick one nobody else has, and keep in mind that it appears in the website's address. Keep the region, turn on Public read access, then turn on Static website, which stays disabled until the bucket is public.

The Create new bucket form with the name jane-doe-site, the eu-central-2 region, and the Public read access and Static website switches turned on
Public read access first, then Static website: the website reads the bucket without a key.

Scroll down. The Connection box shows the bucket's S3 endpoint and URL, and the line under it shows the price: $0.1 per GB per month, with no charges for requests or traffic. Click Create bucket.

The bottom of the create form with the Connection box showing the endpoint, region and bucket URL, the price line and the Create bucket button
The S3 endpoint and URL are for tools and SDKs. The website gets an address of its own.

The bucket is Ready within seconds, marked Public.

The Buckets list with jane-doe-site in eu-central-2, 0 B, Public and Ready
jane-doe-site is ready and public.

Step 2: Upload the site

Click the bucket to open its Files tab. Click Upload files and pick index.html, 404.html and style.css. They go straight from your browser to the bucket, and each one gets its Content-Type from its file extension.

The Files tab of jane-doe-site with an Uploads panel listing style.css, 404.html and index.html as uploaded, and the three files in the table
The three files at the root, uploaded in one go.

The dashboard uploads files into the folder that is open, not whole folders. Click New folder, name it about, open it, and upload about/index.html there. Back at the root, the bucket holds the whole site:

The Files tab of jane-doe-site listing the about folder and the files 404.html, index.html and style.css
index.html sits at the root of the bucket, next to 404.html, style.css and the about folder.

For a site with many files or folders, use the CLI or an S3 tool as in option 2. They upload a whole folder and keep its paths.

Step 3: Set the error document

Open the Settings tab and scroll to the Static Website card. The switch is already on from the create form, with index.html as the Index document. Type 404.html as the Error document and click Save.

The Static Website card with the switch on, index.html as the index document, 404.html as the error document, and the address https://jane-doe-site.s3-website.eu-central-2.cloider.com
index.html for / and every folder, 404.html for anything missing.

Without an error document, missing pages show Cloider's built-in Page not found page instead of your own. The card also shows the website's Address. Every bucket follows the same pattern, https://<bucket>.s3-website.eu-central-2.cloider.com.

Step 4: Open the website

Open the address. The root answers with index.html:

The Jane Doe home page with the heading I design calm, useful software. and a More about me button
The home page, served from index.html at the root of the bucket.

Click About. /about/ answers with about/index.html, and /about without the slash redirects there:

The About page with the heading Hi, I'm Jane. and a Back home button
/about/ is about/index.html in the bucket.

Any path without a file shows 404.html with a 404 status, for example /blog/old-post:

The site's own 404 page with the heading This page doesn't exist. and a Go to the homepage button
Your own 404 page, instead of an XML error.

New files show at once. Changes to the website settings take up to about 30 seconds.

Step 5: Serve it on a free subdomain or your own domain

The s3-website address works, but you will want a better name for it. A Bucket target points a domain at the bucket's website. Every account can claim free subdomains of cloider.app, which are covered by Cloider's certificate, so HTTPS works as soon as the target is saved.

Open Domains in the sidebar, click the arrow next to Add Domain and choose Subdomain. Type the name you want and click Check availability.

The Add Subdomain step with the name jane-doe followed by .cloider.app and a Check availability button
Free subdomains end in .cloider.app.

When the name is free, the Connect your apps step opens. Click Add target, choose Bucket as the Target type and pick the bucket. Path and Target path stay /, because a bucket website always takes the whole domain. Click Save.

The Add a new target dialog with Bucket as the target type, jane-doe-site as the bucket, the hint serves the jane-doe-site website, and / as path and target path
A Bucket target serves the bucket's website on the domain.
The Targets list with one Bucket target named jane-doe-site on path / and an Add subdomain button
The target routes the subdomain's / to jane-doe-site.

Click Add subdomain. The subdomain is Active at once, and the site answers on https://<subdomain>.cloider.app.

The Domains list with jane-doe.cloider.app as an active subdomain
The subdomain is active and routed to the bucket.

The bucket's Overview tab now lists both addresses in the Website row:

The Overview tab of jane-doe-site with the Website row listing the s3-website address and the cloider.app subdomain
The bucket's website address and the subdomain, side by side.

To use a domain you own, such as example.com, choose Custom Domain under Add Domain instead. You verify the domain with a TXT record and point it at Cloider, as its page walks you through, then add the same Bucket target, and Cloider gets a Let's Encrypt certificate for it. www.example.com is a domain of its own: add it and give it a Bucket target too if both names should serve the site. See Add a custom domain in the docs.


Option 2: host it with the cloider CLI

The same site from your terminal. The CLI uploads a whole folder in one command, so it is the quicker way for real sites, and the one to script.

Step 1: Install the CLI

Bash
curl -fsSL https://cloider.com/install.sh | sh
A terminal running the install script, which downloads cloider 0.21.0 for darwin/arm64 and installs it to ~/.local/bin
The install script picks the build for your OS and CPU.

On Windows, run irm https://cloider.com/install.ps1 | iex in PowerShell instead.

Step 2: Log in

Bash
cloider login

The CLI opens your browser on Cloider, where you pick the account and whether the CLI may make changes. Keep Read and write, since the CLI will create the bucket, and click Authorize CLI:

The Authorize Cloider CLI page with the account and the Read and write and Read only options
Read and write lets the CLI create buckets and upload files.
The terminal after cloider login, printing Logged in as the account with Read and Write access
Logged in. The token is kept in ~/.cloider.

Step 3: Create the bucket and upload the site

From the folder that holds site/, create a public bucket with its website on, wait until it is ready, and upload the folder:

Bash
cloider bucket create jane-doe-site --public --website --wait
cloider bucket upload jane-doe-site ./site -r
The terminal output: Created bucket jane-doe-site, Bucket jane-doe-site is ready, then the four files uploaded to 404.html, about/index.html, index.html and style.css
-r uploads what is inside site/ and keeps its paths, so site/index.html lands at the root.

--website needs --public, and starts the website with index.html as its index document. The upload sets each file's Content-Type from its extension. That matters, because the website tells browsers not to guess types.

Step 4: Set the error document

Bash
cloider bucket website jane-doe-site on --error 404.html
cloider bucket website jane-doe-site
The terminal output: Website of jane-doe-site is on at its s3-website address, then the settings with index.html as the index document and 404.html as the error document
The website's address, index document and error document.

--index and --error change only what you pass, and --error "" goes back to the built-in page.

Step 5: Check it with curl

Bash
curl -I https://jane-doe-site.s3-website.eu-central-2.cloider.com/
Text
HTTP/2 200
content-type: text/html; charset=utf-8
content-length: 747
etag: "a039625ab9428a9e584f0aebc5609e87"
x-content-type-options: nosniff
strict-transport-security: max-age=31536000; includeSubDomains

A path without a file answers HTTP/2 404 with your 404.html, and /about answers 302 with a location header pointing at /about/.

Step 6: Serve it on a free subdomain

cloider domain create claims a free subdomain when the name ends in cloider.app, and cloider target create with --bucket points it at the website:

Bash
cloider domain create <subdomain>.cloider.app
cloider target create <subdomain>.cloider.app --bucket jane-doe-site
The terminal output: Claimed jane-doe.cloider.app, Routed jane-doe.cloider.app/ to the bucket's website, then curl -I on the subdomain answering HTTP/2 200 with text/html
A free subdomain and a Bucket target, and the site answers on HTTPS.

For a domain you own, run cloider domain create example.com, verify it as the CLI explains, then cloider target create example.com --bucket jane-doe-site.

Step 7: Publish changes with aws s3 sync

Running cloider bucket upload again after each change overwrites the files, but it never deletes files you removed. aws s3 sync uploads only what changed, and with --delete it removes what is gone. Create an access key that opens only this bucket, and let the CLI print it as the environment variables the AWS CLI reads:

Bash
eval "$(cloider bucket key create --label site-deploy --bucket jane-doe-site --print-env)"
export AWS_REQUEST_CHECKSUM_CALCULATION=when_required AWS_RESPONSE_CHECKSUM_VALIDATION=when_required
aws s3 sync ./site s3://jane-doe-site --delete
Text
upload: site/index.html to s3://jane-doe-site/index.html

Only index.html had changed since the last upload, so only it was sent. The two checksum variables are needed with AWS CLI 2.23 and later, which add a checksum to every upload by default that Cloider's storage doesn't accept. The secret key can't be shown again, so for CI, create a key without --print-env and save its values as CI secrets. See S3 tools for rclone, s3cmd and others.


Option 3: let an AI coding agent host it

If you work with an AI coding agent such as Claude Code, Cursor or Codex, install and log in to the CLI as in option 2, open the project, and ask:

Text
using cloider cli host this site as a static website

The first thing cloider --help prints is a note for AI agents pointing them to docs.cloider.com/llms.txt, which holds the deployment strategy agents follow on Cloider. Its first rule is that a static site goes to a public bucket website, not to an app or a Kubernetes cluster. So you can expect the agent to:

  • Run cloider whoami, to confirm the account and that the token can make changes.

  • Build the site if it has a build step, and find the output folder.

  • Create a public bucket with --website, and upload the output with cloider bucket upload -r.

  • Set the error document: 404.html, or index.html for a single-page app.

  • Give you the website's address, and add a Bucket target when you ask for a domain.

Agents can also drive Cloider through its MCP server, cloider mcp, which offers the same commands as tools, such as create_bucket, upload_bucket_objects, set_bucket_website and create_domain_target. See AI coding agents in the docs.


Host a single-page app

React, Vue, Angular and Svelte apps route in the browser, so a path such as /settings/billing has no file in the bucket. Upload the build and set the error document to index.html. Every path without a file then gets index.html, and the app's router shows the right page:

Bash
cloider bucket website my-app on --error index.html

Those pages come with a 404 status, as on Amazon S3 website endpoints. Browsers show them normally, but crawlers and uptime checks see the 404, while / and real files still answer 200. If search engines matter for the app, prerender its routes to their own index.html files, which most frameworks can do, and keep a real 404.html.

Set cache headers

The website sends each file with the headers it was uploaded with, Cache-Control included. A good default is to have browsers check HTML on every visit, and to cache fingerprinted assets, whose names change with their content (such as app.3f9a2c.js), for a year:

Bash
aws s3 sync ./dist/assets s3://jane-doe-site/assets --cache-control "public, max-age=31536000, immutable"
aws s3 sync ./dist s3://jane-doe-site --exclude "assets/*" --cache-control "no-cache" --delete

A new release then shows on the next page load, while the assets that didn't change stay in the browser's cache.

Troubleshooting

  • Every page shows Cloider's "Page not found", and / shows "Nothing here yet": the website is off, the bucket isn't public, or the change hasn't shown yet, which takes up to 30 seconds. On a domain, also check that it has a Bucket target.

  • / shows your 404 page: there is no index.html at the root of the bucket. A common cause is uploading the dist folder itself, which puts the site under dist/. Upload what is inside it.

  • The browser downloads a page, or shows CSS as text: the file was stored with the wrong Content-Type, and the website doesn't let browsers guess. Upload it again with the right one, for example aws s3 cp index.html s3://jane-doe-site/index.html --content-type "text/html; charset=utf-8".

  • Visitors still see the old version: their browser cached it. Use no-cache for HTML and fingerprinted names for assets.

  • "Make the bucket public first, its website is read without a key.": turn on public read access, then turn on the website.

  • "Domains still point at this website, remove their targets first.": delete the Bucket targets before you turn the website off.

What it costs

Only the data in the bucket is billed: $0.10 per GB per month, charged by the hour. Requests, uploads, downloads and traffic are free however many visitors the site gets, and free subdomains and targets cost nothing either. The example site is 3.4 KiB, and a 100 MB site would cost one cent a month. There is no minimum charge and no charge for an empty bucket, and new accounts get a welcome credit to try it.

Cloider Object Storage gives you S3 compatible buckets with static websites, versioning, lifecycle rules, CORS and bucket policies, billed only for what you store. Everything in this guide is covered in more detail on Static websites in the docs. When the site needs server-side code, deploy it as an app instead, and keep its files in a bucket.

Frequently asked questions

Can I host a static website on Cloider object storage?

Yes. Create a public bucket, turn on Static website, and upload your files with index.html at the root. Cloider serves the bucket at https://<bucket>.s3-website.eu-central-2.cloider.com with index and error documents, like an Amazon S3 website endpoint.

Does the bucket have to be public?

Yes. The website reads the bucket without a key, like any visitor, so the bucket needs public read access, and every file in it can be downloaded by anyone. Keep private files in another bucket.

Can I use my own domain for a bucket website?

Yes. Add the domain under Domains, verify it, and give it a Bucket target that points at the bucket, or run cloider target create example.com --bucket <bucket>. Free cloider.app subdomains work the same way. Cloider issues the HTTPS certificate.

Is a Cloider bucket website served over HTTPS?

Always. The s3-website address and free cloider.app subdomains use Cloider's certificate, and a custom domain gets a Let's Encrypt certificate once it points at Cloider. Plain http requests are redirected to https.

How do I host a React or Vue single-page app in a bucket?

Upload the build and set the error document to index.html, with cloider bucket website <bucket> on --error index.html. Every path without a file then gets index.html and the app's router shows the page. Those fallback pages are served with a 404 status, as on Amazon S3.

How do I update the site after a change?

Upload the build again with cloider bucket upload <bucket> ./dist -r, or use aws s3 sync ./dist s3://<bucket> --delete with an access key from cloider bucket key create, which uploads only what changed and removes deleted files.

How much does it cost to host a static website on Cloider?

Only the stored data is billed, $0.10 per GB per month, charged by the hour. Requests, downloads and traffic are free, and so are free subdomains and targets. A 100 MB site costs one cent a month.

Written byMarei Morsy

Comments