# Deploy to Deno Deploy

**URL:** https://community.silverbullet.md/t/deploy-to-deno-deploy/14
**Category:** Guides
**Created:** [January 19, 2024, 6:05pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14 "2024-01-19T18:05:31Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [January 19, 2024, 6:05pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/1 "2024-01-19T18:05:31Z")

</div>

You can deploy SilverBullet to [Deno Deploy](https://deno.com/deploy) for free, and store space content in [Deno KV](https://deno.com/kv). This is a convenient option to deploy SilverBullet in the cloud, without having to run or pay for a server.

**Note:** this setup is highly experimental, rarely used and may break at any time. We recommend using another deployment method.

# Steps

Sign up for a (free) [Deno Deploy account](https://dash.deno.com/projects) and “Create an empty project” there.

Jump to the “Settings”, give your project a nicer name, and configure the following environment variables:

- `SB_FOLDER`: `db://`
- `SB_PORT`: `8000`
- `SB_SYNC_ONLY`: `1` (Deno Deploy does not currently support Workers, so running indexing etc. on the server will not work)
- `SB_USER`: (e.g. `pete:letmein`) — this is **super important** otherwise your space will be open to anybody without any authentication
- `SB_AUTH_TOKEN`: (Optional) If you would like to migrate existing content from elsewhere (e.g. a local folder) using [[Sync]], you will want to configure an authentication token here (pick something secure).

Make sure you have [installed Deno locally](https://docs.deno.com/runtime/manual/getting_started/installation) on your machine.

Then, install `deployctl` via:

```shell
$ deno install -gArf jsr:@deno/deployctl

```

To deploy, run:

```shell
$ deployctl deploy -p=your-project --entrypoint=https://edge.silverbullet.md/silverbullet.js --include= --prod

```

This will ask you to authenticate with your Deno Deploy account, and then deploy SilverBullet.

# Migrating and backing up content

This setup stores your space in Deno’s KV database, which is still a beta feature and not specifically designed for this purpose. Therefore it’s recommended to use something like [Sync](https://silverbullet.md/Sync) to make backups elsewhere.

For this, be sure to also configure a `SB_AUTH_TOKEN` variable.

---

<div class="post-metadata">

### Author: ![benmneb](https://community.silverbullet.md/user_avatar/community.silverbullet.md/benmneb/32/252_2.png) [@benmneb](https://community.silverbullet.md/u/benmneb)
#### Post date: [March 16, 2024, 12:55pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/2 "2024-03-16T12:55:15Z")

</div>

tansk for this guide

but after trying to deploy with

```auto
$ deployctl deploy -p=your-project --entrypoint=https://silverbullet.md/silverbullet.js --include= --prod

```

silverbullet.js 404’s

```auto
Error The deployment failed: HTTP status client error (404 Not Found) for url (https://silverbullet.md/silverbullet.js)

```

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [March 16, 2024, 2:15pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/3 "2024-03-16T14:15:48Z")

</div>

Right, the URL changed, updated in the original post.

---

<div class="post-metadata">

### Author: ![pihentagy](https://community.silverbullet.md/user_avatar/community.silverbullet.md/pihentagy/32/318_2.png) [@pihentagy](https://community.silverbullet.md/u/pihentagy)
#### Post date: [May 27, 2024, 9:38am UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/4 "2024-05-27T09:38:47Z")

</div>

I don’t know the details about SBs internals, but sketch my vision, correct me, if I’m wrong:

deno.dev allows you to sync with any github repo. So you can fork any version of silverbullet and could run directly deploy it (without installing anything at all).

You can upgrade your mirror anytime, so you decide when to upgrade.

Only missing part is the single entrypoint of the project for deno deploy.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [May 27, 2024, 5:41pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/5 "2024-05-27T17:41:10Z")

</div>

Yes, SB requires a build step (to build the plugs, Frontend and bundle them up in a single JS file) if that can somehow be automated as part of the Deno deploy process you don’t need to do a local checkout. Theoretically this should be doable perhaps with the help of GitHub actions somehow.

---

<div class="post-metadata">

### Author: ![pihentagy](https://community.silverbullet.md/user_avatar/community.silverbullet.md/pihentagy/32/318_2.png) [@pihentagy](https://community.silverbullet.md/u/pihentagy)
#### Post date: [May 29, 2024, 6:56am UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/6 "2024-05-29T06:56:35Z")

</div>

A new setting popped up when deploying github projects on deno. It might help.

 ![image](https://community.silverbullet.md/uploads/default/original/1X/fd7d240c28ff5aa528e9b69ac21c1b04d620fc69.png)

 ![image](https://community.silverbullet.md/uploads/default/original/1X/54962176585a08911d0814ee0f8cbab9fb96dc2f.png)

---

<div class="post-metadata">

### Author: ![Maarrk](https://community.silverbullet.md/user_avatar/community.silverbullet.md/maarrk/32/56_2.png) [@Maarrk](https://community.silverbullet.md/u/Maarrk)
#### Post date: [July 29, 2024, 8:08pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/7 "2024-07-29T20:08:08Z")

</div>

Is there a way to make this work with Git Sync? I managed to complete the setup for a friend and we got a working password-protected instance, but without a backup server that I would know better, it feels too risky to use seriously.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [July 29, 2024, 8:33pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/8 "2024-07-29T20:33:10Z")

</div>

No. Deno deploy will likely never support running shell commands.

What you could do is use `silverbullet sync` to sync files with a folder elsewhere and run git from there. Not sure that’s actually helpful though.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [July 29, 2024, 8:36pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/9 "2024-07-29T20:36:12Z")

</div>

You may want to look at [fly.io](http://fly.io). I think will be possible to run there (if you limit it to just one container). Will take some fiddling, but I think I managed to at some point in the past.

And if you get that to work, be sure to post it in #Guides 😉

---

<div class="post-metadata">

### Author: ![Maarrk](https://community.silverbullet.md/user_avatar/community.silverbullet.md/maarrk/32/56_2.png) [@Maarrk](https://community.silverbullet.md/u/Maarrk)
#### Post date: [July 29, 2024, 8:52pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/10 "2024-07-29T20:52:07Z")

</div>

> [@zef](#):
>
> What you could do is use `silverbullet sync` to sync files with a folder elsewhere and run git from there. Not sure that’s actually helpful though.

That is helpful, I was hoping to find asome solution like that, thanks!

---

<div class="post-metadata">

### Author: ![maxwell-k](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/m/3da27b/32.png) [@maxwell-k](https://community.silverbullet.md/u/maxwell-k)
#### Post date: [October 8, 2024, 10:21pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/11 "2024-10-08T22:21:41Z")

</div>

Is running SilverBullet on Deno Deploy a popular option? What’s the experience like?

I ask because I’ve been trying to deploy it; I was struggling and then got a somewhat working version but there was a lot of lag. I am new to both Deno Deploy and Silver Bullet so want to ask if this is a well trodden path and if the end result - Silver Bullet on Deno Deploy - is a sensible thing to work towards.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [October 10, 2024, 2:12pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/12 "2024-10-10T14:12:39Z")

</div>

I don’t think it’s popular. I consider it experimental and limited. It only supports sync mode, and you cannot use it with tools like git etc.

I’d rather go with hosting it on your own server, or otherwise try something like [Deploy SilverBullet to fly.io](https://community.silverbullet.md/t/deploy-silverbullet-to-fly-io/797)

---

<div class="post-metadata">

### Author: ![maxwell-k](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/m/3da27b/32.png) [@maxwell-k](https://community.silverbullet.md/u/maxwell-k)
#### Post date: [October 11, 2024, 3:02am UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/13 "2024-10-11T03:02:38Z")

</div>

Thanks for the advice; I appreciate it.

---

<div class="post-metadata">

### Author: ![caesiumtea](https://community.silverbullet.md/user_avatar/community.silverbullet.md/caesiumtea/32/1016_2.png) [@caesiumtea](https://community.silverbullet.md/u/caesiumtea)
#### Post date: [February 14, 2025, 12:11pm UTC](https://community.silverbullet.md/t/deploy-to-deno-deploy/14/14 "2025-02-14T12:11:43Z")

</div>

So you currently recommend [fly.io](http://fly.io) more so than Deno Deploy? In that case, would it be appropriate for the [Install/Network and Internet](https://silverbullet.md/Install/Network%20and%20Internet) page to mention [fly.io](http://fly.io) and refer to the Discourse post about it, rather than recommending Deno Deploy?
