This guide has moved to https://lbry.tech/resources/wallet-server
-
-
Save lyoshenka/2557c08344bfe1020f0c0a13b9c5b0ce to your computer and use it in GitHub Desktop.
@mirgee You're seeing that happen on a fresh Ubuntu install? When I run these steps, the extraction and permissions work out correctly. Here's what I'm seeing immediately after going through the above setup:
$ sudo docker volume ls
DRIVER VOLUME NAME
local database
$ sudo docker volume inspect database | grep Mount
"Mountpoint": "/var/lib/docker/volumes/database/_data",
$ sudo su
# cd /var/lib/docker/volumes/database/_data
# ll -h
total 4.2G
drwxr-xr-x 5 999 docker 4.0K Oct 10 19:12 ./
drwxr-xr-x 3 root root 4.0K Oct 10 19:02 ../
-rw-r--r-- 1 999 docker 4.1G Oct 10 19:12 claims.db
-rw-r--r-- 1 999 docker 320K Oct 10 19:13 claims.db-shm
-rw-r--r-- 1 999 docker 161M Oct 10 19:13 claims.db-wal
drwxr-xr-x 2 999 docker 4.0K Oct 10 19:12 hist/
drwxr-xr-x 2 999 docker 12K Sep 13 19:53 meta/
drwxr-xr-x 2 999 docker 4.0K Oct 10 19:12 utxo/
Can you help me reproduce this? Maybe I'm missing something?
tagged the wrong person above. meant to tag @mirgee
i'm able to run the wallet server successfully and instructions were simple enough so i did not take help
@lyoshenka, not fresh, but older Ubuntu 16.04 install, Docker version 19.03.2, and I followed the instructructions to the point (made sure to reinstall Docker). I think Docker was creating db directory in /opt/
at runtime with root only permissions, so I had to manually create a directory elsewhere with proper permissions and run --volume ./database:/database
. I will try to reproduce it again later.
@lyoshenka, can you also provide instructions on how to run the wallet server after reboot/initial startup?
@tzarebczan you can use docker [start|stop] wallet-server
to start or stop the server after reboot or any other time
thanks tom and grin: sudo docker start wallter-server
starts the server and sudo docker stop wallet-server
stops it. Use sudo docker logs -f wallet-server
to see live logs
When you mount volume to the container with
--volume database:/database
, docker drops privileges for the file back to root, and then since the entrypoint script is run aslbry
user, the snapshot extraction fails. Maybe you should first create a./database
directory somewhere on the host and set privileges with the same uid and gid as forlbry
user within the container, i.e.chown -R 999:999 ./database
? Or just run the server withgosu
.