This template will help you deploy an Earthstar server on Fly.io. The server will run on the Deno runtime.
If you'd like to further customise your server, you can learn more about servers and their extensions at the main Earthstar repo.
Note: Fly requires a credit card to sign up. If you just want something a bit less involved, try the Glitch template instead.
- Create a new file called
known_shares.json
in the root of this project. Add the public addresses of the shares you'd like your server to replicate as an array of strings (e.g.["+one.xxx", "two.xxx"]
). - Install the
fly
command line tool - Make an account:
fly auth signup
- Run
fly launch --no-deploy
. The command line will prompt you for a name for your app. - Run
fly volumes create share_data
. You'll be prompted for which region you'd like this first volume to be in. fly deploy --remote-only
- Check the logs at
fly logs
. There should be a message saying that the server is running and with the URL to sync from.
You might want to make some changes and test them locally. You'll need to have Deno installed to do it (instructions here). You can do that by running the following:
deno task server