Setup Multi-User Environment for lbcd
February 29, 2024
bitcoin
blockchain
Prerequisites
Install Caddy
Install lbcd
Configuration
For Caddyfile
rpc.yourdomain.xyz {
basicauth * {
user1 hashed-password1
user2 hashed-password2
}
reverse_proxy :9245 {
header_up Authorization "Basic abcdefg"
}
}
Hashed password is generated with
caddy hash-password -p plain-text-password
The Authorization
header value Basic abcdefc
can be extracted using Postman by setting Authorization -> Basic Auth with username and password.
Post to https://rpc.yourdomain.xyz
Body:
{
"version": "2.0",
"id": 8337029974246184036,
"method": "getblockcount",
"params": []
}
Start
caddy start
caddy adapt
caddy stop
~/go/bin/lbcd --rpcuser=user --rpcpass=password --notls
## shutdown
kill -9 lbcd-pid