wallet server guide
This commit is contained in:
parent
7963e5bdd4
commit
7b11a03e02
2 changed files with 67 additions and 0 deletions
|
@ -18,3 +18,4 @@ description: Find the LBRY specification, API documentation, our Contributor's g
|
|||
- [Regtest Setup](/resources/regtest-setup)
|
||||
- [LBRY Android App Build Steps](/resources/android-build)
|
||||
- [Lighthouse (search) API](https://lbryio.github.io/lighthouse)
|
||||
- [Run Your Own Wallet Server](/resources/wallet-server)
|
||||
|
|
66
documents/resources/wallet-server.md
Normal file
66
documents/resources/wallet-server.md
Normal file
|
@ -0,0 +1,66 @@
|
|||
# How To Run Your Own Wallet Server
|
||||
|
||||
This guide will walk you through the process of setting up a LBRY wallet server. This involves provisioning a web server and setting up some services (docker, lbrycrd, and the wallet server). At the end, you'll have your own connection to the LBRY network.
|
||||
|
||||
**note:** This is early-stage stuff. You may encounter unexpected issues. Please be patient and don't hesitate to [reach out for help](#get-in-touch).
|
||||
|
||||
|
||||
### Provision a fresh server
|
||||
|
||||
We recommend a dual-core server with at least 8GB RAM, 50GB disk, and a fresh Ubuntu 18.04 install.
|
||||
|
||||
I tested this guide on AWS using a `t3.large` instance and the `ami-07d0cf3af28718ef8` image. If you're using AWS, create your instance in the us-east-2 (Ohio) region. That's where our snapshots are stored, so downloading them will be faster for you.
|
||||
|
||||
Make sure your firewall has ports 9246 and 50001 open. 9246 is the port lbrycrd uses to communicate to other nodes. 50001 is the wallet server RPC port.
|
||||
|
||||
|
||||
### Install Docker & Docker Compose
|
||||
```
|
||||
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common && \
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
|
||||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \
|
||||
sudo apt install -y docker-ce docker-ce-cli containerd.io && \
|
||||
sudo systemctl enable docker && sudo systemctl start docker && \
|
||||
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
|
||||
```
|
||||
|
||||
### Download our docker-compose.yml
|
||||
You can see it [here](https://github.com/lbryio/lbry-sdk/blob/master/docker/docker-compose-wallet-server.yml).
|
||||
```
|
||||
curl -L "https://raw.githubusercontent.com/lbryio/lbry-sdk/master/docker/docker-compose-wallet-server.yml" -o docker-compose.yml
|
||||
```
|
||||
|
||||
### Start the servers
|
||||
```
|
||||
sudo docker-compose up --detach
|
||||
```
|
||||
|
||||
### Check that everything worked
|
||||
|
||||
The first time you start the wallet server, it will take a few minutes to download a recent snapshot of the database and extract it. You can follow the progress with
|
||||
|
||||
```
|
||||
sudo docker-compose logs --follow
|
||||
```
|
||||
|
||||
After the wallet server has caught up, it will bind to port 50001 and start responding to requests. You can check if this happened by running
|
||||
|
||||
```
|
||||
sudo netstat -tlpn | grep 50001
|
||||
```
|
||||
|
||||
If there is no output, the port is ont bound yet and the server is still catching up. Check the logs for more info.
|
||||
|
||||
After the wallet server is ready, check that it responds to basic RPC calls:
|
||||
|
||||
```
|
||||
echo '{"id":1,"method":"server.version"}' | timeout 1 curl telnet://localhost:50001
|
||||
```
|
||||
|
||||
You should see a response like `{"jsonrpc": "2.0", "result": ["0.46.1", "0.0"], "id": 1}`. If you do, congratulations! You've set up your own wallet server.
|
||||
|
||||
## Get in touch
|
||||
|
||||
Whether you got to the end without a hiccup or you got stuck along the way, we want to hear from you. [Join our Discord](https://discord.gg/y3W9JuS) to get help, stay updated, and talk to other wallet server operators.
|
Loading…
Reference in a new issue