Skip to content

Commit 521c48b

Browse files
committed
chore: add more information on custom deployment setup
1 parent c57481f commit 521c48b

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,23 @@ the faucet.
5252

5353
# Custom deployments
5454

55-
To deploy to a new CloudFlare account, change `account_id` in `wrangler.toml`,
56-
set `SECRET_WALLET` and `SECRET_MAINNET_WALLET` using
57-
`npx wrangler@latest secret put` (values are exported private keys, see
58-
`forest-wallet export`), and run `npx wrangler@latest deploy`.
55+
### Account & domain
56+
1. In [wrangler.toml], set `account_id` to your CloudFlare account ID.
57+
2. In [wrangler.toml], set `pattern` in routes to match your domain.
58+
59+
In order to deploy to a different CloudFlare account, you need to do the following:
60+
61+
### Rate limiter
62+
If you have a paid CloudFlare account:
63+
1. Create a KV store in CloudFlare. It can be found under the _Storage & Databases_ tab. The name can be anything.
64+
2. In [wrangler.toml], set `id` in `kv_namespaces` to your KV store id (from step 1).
65+
66+
If you have a free CloudFlare account, you will need to disable the rate limiter. :warning: This is not recommended for production use as it will expose your service to abuse.
67+
1. In [wrangler.toml], remove or comment out `[durable_objects]` and `[migrations]` sections. Additionally, remove `kv_namespaces` from the `[env.quick]` section.
68+
2. Run `npx wrangler@latest secret put RATE_LIMITER_DISABLED true`.
69+
70+
### Wallets
71+
Set `SECRET_WALLET` (calibnet) and/or `SECRET_MAINNET_WALLET` (mainnet) using `npx wrangler@latest secret put` (values are exported private keys, see `forest-wallet export`).
72+
73+
### Deployment
74+
Run `npx wrangler@latest deploy`.

0 commit comments

Comments
 (0)