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.

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:
From the dashboard: create the bucket, upload the files, set the error page, then serve it on a free subdomain.
With the cloider CLI: the same in a few commands, plus
aws s3 syncfor later updates.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:
site/
├── index.html
├── about/
│ └── index.html
├── 404.html
└── style.cssindex.htmlis the home page. The bucket website shows it for/.about/index.htmlanswers at/about/, so the site gets clean URLs without.htmlin them.404.htmlis the error document, shown with a 404 status for every path that has no file.style.cssis 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:
<!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 |
|---|---|
|
|
|
|
| A 302 redirect to |
| The file, with the Content-Type it was uploaded with |
A path with no file | Your error document, |
| 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.

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 bucket is Ready within seconds, marked 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 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:

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.

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:

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

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

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.

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.


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

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

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
curl -fsSL https://cloider.com/install.sh | sh
On Windows, run irm https://cloider.com/install.ps1 | iex in PowerShell instead.
Step 2: Log in
cloider loginThe 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:


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:
cloider bucket create jane-doe-site --public --website --wait
cloider bucket upload jane-doe-site ./site -r
--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
cloider bucket website jane-doe-site on --error 404.html
cloider bucket website jane-doe-site
--index and --error change only what you pass, and --error "" goes back to the built-in page.
Step 5: Check it with curl
curl -I https://jane-doe-site.s3-website.eu-central-2.cloider.com/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; includeSubDomainsA 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:
cloider domain create <subdomain>.cloider.app
cloider target create <subdomain>.cloider.app --bucket jane-doe-site
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:
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 --deleteupload: site/index.html to s3://jane-doe-site/index.htmlOnly 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:
using cloider cli host this site as a static websiteThe 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 withcloider bucket upload -r.Set the error document:
404.html, orindex.htmlfor 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:
cloider bucket website my-app on --error index.htmlThose 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:
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" --deleteA 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 noindex.htmlat the root of the bucket. A common cause is uploading thedistfolder itself, which puts the site underdist/. 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-cachefor 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.



Comments