Tutorial: Host an Astro Site on Filebase

Tutorial: Host an Astro Site on Filebase

Build your Astro site locally, upload the contents of dist/ to a bucket, and create a Filebase Site from that static output.

AuthorFilebase Team
CategoryTutorials

Build the Astro Output

Astro is static-first by default, which makes deployment to Filebase straightforward. The deployable output lives in dist/.

Build the Project

From your project root:

Terminal
npm run build

Astro writes the static site to dist/ by default. You should see index.html at the root plus the generated asset folders.

Upload the Contents of dist/

In Filebase, create a bucket and upload the contents of dist/. The bucket root should contain index.html and Astro’s generated assets directly.

Do not upload the dist directory itself. Filebase needs the built files at the bucket root.

Keep only the built site files in that bucket. Once the upload is complete, copy the bucket CID from the bucket storing those files. That bucket CID is what you will use when you create the site.

Create the Site

Open Sites in the dashboard and create a new site, then paste in the bucket CID you copied from the bucket storing the site files. Filebase will use that CID as the site’s content source.

Other Frameworks

We also have framework-specific guides for Vite, Next.js, Remix, Gatsby, and Docusaurus.