wallet-sync-server/hosting
2022-08-01 11:46:06 -04:00
..
caddy.conf Hosting instructions 2022-07-11 22:25:43 -04:00
lbry-id.conf Hosting configs FOR DEV ONLY to let lbry.id work out of the box again 2022-08-01 11:46:06 -04:00
README.md Hosting instructions 2022-07-11 22:25:43 -04:00

These are some simple instructions to get your lbry wallet sync server running. This is mostly a note to self and suggestion to others, but you can host however you want. We use supervisord and the Caddy web server. Ideally we'll probably switch to systemd and we'd include a Caddyfile.

Install the latest version of golang. Check out this repository, and run go build . in the repository root.

Insteall the caddy web server. The website has its own debian repos. You can also install from source (golang). Which ever (if either) you feel comfortable with. No specific recommendations here.

You'll need to adjust your firewall to allow http (port 80) for caddy to obtain an SSL cert via ACME (ZeroSSL or LetsEncrypt) and also allow the port you set to have caddy serve on (we use 8091, but it probably also be 80). If you use ufw:

sudo ufw allow http
sudo ufw allow 8091

To avoid running Caddy as root, you'll need to allow it to serve from port 80 (see here):

sudo setcap 'cap_net_bind_service=+ep' /home/lbry/caddy/cmd/caddy/caddy

Finally, included are a couple quick conf scripts for supervisord to help get lbry.id running. Fill in the {blank}s and put under /etc/supervisor/conf.d/:

  • {caddy-cmd}: The command to run caddy. If you're building from source, it will be {caddy git repo root}/cmd/caddy/caddy. If you're installing from a debian repo it's probably just caddy, but refer to the Caddy docs.
  • {lbry-user}: The user you're using to run Caddy and the sync server.
  • {lbry-user-home}: The home directory of {lbry-user}.
  • {sync-server-dir}: The git repo root of the lbry sync server.