FREE JamStack / Static Site Hosting with Keybase.io
Tags: webdev, hosting, jamstack
Published: 2020-10-26 18:10:33

---
title: FREE JamStack / Static Site Hosting with Keybase.io
published: true
description: 
tags: webdev, hosting, jamstack
cover_image: https://joelnet.keybase.pub/keybase-hosting-1000x420.png
canonical_url: https://joel.net/free-jamstack-static-site-hosting-with-keybaseio
---

[Keybase](https://keybase.io) offers secure messaging and file sharing. Included in the file sharing offering is **250GB of storage which can also be used to host public JamStack / Static Websites**.

{% youtube GzhhG5ItwY8 %}

## Install Keybase

**Keybase Sites** are accessed through their software so you'll have to head over to [Keybase.io](https://keybase.io) and follow the directions for your operating system to install.

After installing the [Keybase](https://keybase.io) client, navigate to the **Files** tab. You should see a screen similar to this.

![keybase.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1603410494221/EPird1Mn4.png)

Follow the directions to **Enable Keybase** for the file system for your operating system. This will give you native file system access to your [Keybase](https://keybase.io) secure file share.

Once the **Keybase File System** has been installed you should be able to access your files at `/keybase` for Mac/Linux and `K:\` on Windows.

If everything is setup correctly, under `/keybase` you should see three directories.

```text
/keybase
    /private
    /public
    /team
```

## The Keybase Subdomain

All [Keybase](https://keybase.io) accounts are given a subdomain with the format `<username>.keybase.pub`. For example, my username is `joelnet`, so my subdomain is [joelnet.keybase.pub](https://joelnet.keybase.pub). This is where my static files will live.

## Copying Files to Keybase

Files can be added to the **Keybase Subdomain** by copying them into `/keybase/public/joelnet` (`K:\public\joelnet` on Windows). All files copied here are **PUBLIC** and everyone has **read** access to them.

I have prepared a Gatsby site that I am going to copy to `/keybase/public/joelnet`  (`K:\public\joelnet` on Windows).
![copy-files-to-keybase.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1603412507383/ugCFyuqtG.gif)

Your website has been deployed! Open up a browser and visit your new site. My site is now up and visible on [joelnet.keybase.pub](https://joelnet.keybase.pub) 🔥

## Custom Domain Names

[Keybase](https://keybase.io) also supports custom domain names, but the process is a little different.

The site needs to be deployed under `/keybase/private/<username>,kbpbot/<site>` (`K:\private\<username>,kbpbot/<site>` on Windows). `<site>` can be any name. This gives you the flexibility to host multiple sites on [Keybase](https://keybase.io).

The next step is setting up the DNS.

Create a `CNAME` to point to `kbp.keybaseapi.com`.

Next create a `TXT` record. If your site is at `my-site.example.com`, then prefix the record with `_keybase_pages.`.

This is what my DNS records look like:

![dns.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1603413846461/qpclb_3J8.png)

After copying your files, your website should be accessible on your custom domain!

## End

More information about [Keybase Sites](https://book.keybase.io/sites) can be found [here](https://book.keybase.io/sites).

- Join my 📰 [Newsletter](https://joel.net/newsletter)
- Subscribe to my 📺 YouTube, [JoelCodes](https://www.youtube.com/c/JoelCodes?sub_confirmation=1)
- Say hi to me on Twitter [@joelnet](https://twitter.com/joelnet)

Cheers 🍻

Photo by [Killian Eon](https://www.pexels.com/@killian-eon-1185568) from [Pexels](https://www.pexels.com/photo/blue-metal-tool-2635595)