Comments (11)
Have you worked on a way to automate the following?
- lncli createwallet (and output the seed to a file)
- lncli unlock or at least have a way of piping the password to it ?
from dockerfiles.
Create wallet should not happen automatically, but during the initial setup.
Unlock: yes I have a script for that, I'll share it a bit later, admittedly it wasn't trivial to figure it out 😅
from dockerfiles.
-
Login as
root
-
Put this into
/etc/lnd/unlock
#!/bin/sh /bin/sleep 5s LN_ROOT=/home/ln/.lnd curl -s \ -H "Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 ${LN_ROOT}/admin.macaroon)" \ --cacert ${LN_ROOT}/tls.cert \ -d "{\"wallet_password\": \"$(cat /etc/lnd/pwd | tr -d '\n' | base64 -w0)\"}" \ https://localhost:8080/v1/unlockwallet > /dev/null 2>&1 echo "$? $(date)" >> /etc/lnd/unlocks.log exit 0
-
Adjust your
LN_ROOT
path in code above -
chmod 100 /etc/lnd/unlock
-
touch /etc/lnd/pwd
-
Put your
lnd
wallet password intopwd
-
chmod 400 /etc/lnd/pwd
-
Add
ExecStartPost
line to your/etc/systemd/system/lnd.service
, so it looks something like this:$ sudo grep -A 2 Service /etc/systemd/system/lnd.service [Service] ExecStart=/usr/local/bin/lnd ExecStartPost=+/etc/lnd/unlock
Note: the assumption is that the attacker doesn't gain access to your
root
account, if they do all bets are off anyway…
from dockerfiles.
Thanks this is useful information.
Yes createwallet shouldn't happen, but it needs to be controllable through another interface
from dockerfiles.
REST interface perhaps, or RPC from Go code directly - but that requires deeper look.
from dockerfiles.
@nolim1t I just took a look at the lnd
Dockerfile you've made, and I actually like it quite a lot.
A few topics though:
- Why do you do final image as
FROM alpine
and notFROM scratch
? - Wouldn't it be better if configuration and/or unlocking of the
lnd
client happen from within another container that's setup to start beforelnd
? - Doesn't
lnd
ever use SSL connections isn't copying root certs necessary (as per article in the first comment here)
from dockerfiles.
Ah, I see you just copied the image from their official repo.
I think we should try getting rid of their start-lnd.sh
file, as it contains a lot of options that will not be useful to us, and try to have it run from scratch ^^.
from dockerfiles.
I haven’t had a chance to look at it too much but seeing you did claim that lnd works with a pruned node I’ll give it a try again.
from dockerfiles.
I'm pretty sure we don't want to re-write autopilot logic which c-lightning currently lacks, so going ahead with lnd
might be our best choice.
from dockerfiles.
After digging-in for a while, having it run FROM scratch
might be too much effort - lnd
seems to rely on stuff like HOME directory, and some other stuff that any OS has, but are not avail in scratch
.
That being said, I think we can live with the enormous overhead that alpine
adds :P
I got lnd cross-compilation to work well already, except I'm not yet sure what exactly to expose in the final image…
from dockerfiles.
this is done and actually working with the alpine images with lncm/pi-factory
from dockerfiles.
Related Issues (20)
- Simplify db4 installation HOT 4
- Investigate if it's possible to run lnd on top of scratch only HOT 1
- Create c-lightning docker container based on alpine HOT 1
- Split this repo into individual projects HOT 17
- Docker image build process HOT 6
- Take a look at "condition: service_healthy" for starting invoicer if its not connecting to LND HOT 3
- Change bitcoin dockerfile to include wallet support HOT 4
- nginx container for docker HOT 1
- Split bitcoind into a separate repo HOT 4
- Split lnd into a separate repo
- Bump Bitcoin to v0.16.3 as it fixes crit vuln HOT 1
- Dockerize Tor
- Create lndash Docker image and push it to Docker hub HOT 1
- Consider removing utils docker image HOT 1
- ENV vars not working HOT 2
- Change URLs HOT 2
- Arch HOT 4
- Create arm6 lncm image HOT 4
- Migrate from ubuntu to alpine base images HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerfiles.