bumi / lnme

Your friendly Bitcoin Lightning ⚡ payment page ⚡
MIT License
164 stars 29 forks source link

Lnme fails when running as service if you enable Tor. #14

Closed aplnx closed 2 years ago

aplnx commented 2 years ago

Lnme fails to startup when running as service if you enable Tor.

The problem is that it tries to create the 'data-dir-?????' inside the folder '/etc/systemd/system/'.

Question is: Is it possible to control where it creates these temporary files?

aplnx commented 2 years ago

I managed to make it work! The correct specification of lnme.service file is following:

[Unit]
Description=LnMe your friendly lightning payment page
Wants=lnd.service
After=lnd.service

[Service]
ExecStart=/home/user/lnme/lnme -config /home/user/lnme/config.toml
WorkingDirectory=/home/user/lnme/
User=user
Group=user
Type=simple
KillMode=process
LimitNOFILE=128000
TimeoutSec=240
Restart=always
RestartSec=60

[Install]
WantedBy=multi-user.target

Notice that it is important to specify WorkingDirectory.

bumi commented 2 years ago

great!

alternatively we need to add support to pass the datadir to bine #12