Skip to main content

Self host

Backmesh is open source and is hosted Cloudflare's Workers and KV which both have a generous free tier. This tutorial will get Backmesh deployed to your own account. Check out the pricing and usage limits for the different Cloudflare worker plans and the KV datstore. Go ahead and create a Cloudflare account first if you don't have one. Make sure you have npm and yarn installed as well.

  1. Clone the backmesh repo and install its dependencies
git clone [email protected]:backmesh/backmesh.git
cd backmesh
yarn install
  1. Connect the local wrangler CLI to your Cloudflare account.
npx wrangler login
  1. Create a KV Namespace. Replace BACKMESH_KV with the desired name for your namespace.
npx wrangler kv:namespace create "BACKMESH_KV"

After running the above command, you’ll see an output like this:

✨ Success!
Add the following to your configuration file in your kv_namespaces array:

{ binding = "BACKMESH_KV", id = "xxxxxxxxxxxxxxxxxxxx" }
  1. Replace the copied KV binding ID with the placeholder one in the wrangler.toml within the cloned backmesh repo. This will bind the KV created in the CLI with the Cloudlflare worker we are about to deploy.

  2. Deploy Backmesh!

yarn deploy
  1. Now you can follow this Cloudflare tutorial to setup a route for your worker so that it can start receiving inbound HTTP requests from your web or mobile app.