Skip to content

Instantly share code, notes, and snippets.

# create wallet unlock file, put your lnd password in this file
nano ~/.bitcoin/password
# add to your litd config file -> "lnd.wallet-unlock-password-file=/home/ubuntu/.bitcoin/password"
nano ~/.lit/lit.conf
# create unit file
sudo nano /etc/systemd/system/litd.service
# enable litd service
[Unit]
Description=Litd daemon
After=bitcoind.service
Wants=bitcoind.service
[Service]
ExecStart=/home/ubuntu/go/bin/litd
# Process management
@echennells
echennells / inotify-channel-backup.md
Last active June 27, 2023 02:04 — forked from alexbosworth/inotify-channel-backup.md
Backup channel.backup file using systemd and inotify

LND backup script for channel.backup using inotify

Install inotify

sudo apt install inotify-tools

Create script to watch for changes and copy on change

# litd Log File
litd is logging to /var/log/syslog
Logrotate is a linux system utility that by default runs once per day, and will trim (rotate) your log files if configured to do so. It will also keep a configurable
number of previous log files but will compress them to save a considerable about of disk space. Compressed files have the .gz extension.
If once a day isn't frequent enough it can be configured to run as often as you'd like by editing the systemd logrotate.timer configuration. We won't cover that here,
and if once a day isn't enough you can also configure the verbosity level of the service that is being too chatty.
@echennells
echennells / gist:b57577b501b88620195c51b544892b12
Created June 9, 2024 19:12
How to self-host mutiny wallet and use their signet
Build the https://github.com/MutinyWallet/mutiny-web docker container with the following environment variables:
# Add the ARG directives for build-time environment variables
ARG VITE_PROXY="/_services/proxy"
ARG VITE_STORAGE="/_services/vss/v2"
ARG VITE_SELFHOSTED="true"
ARG VITE_NETWORK="signet"
ARG VITE_ESPLORA="https://mutinynet.com/api"
ARG VITE_LSP="https://signet-lsp.mutinywallet.com"
ARG VITE_RGS="https://rgs.mutinynet.com/snapshot/"
### WARNING ###
Mutiny stores your channel state in your browser cache as well as in a postgres database on your server. If you lose the state in one of the two locations it will resync, for example if you lose your browser
cache the next time you access mutiny it will sync from the postgres server. The opposite is also true. One issue with the self hosted mutiny is there isn't an easy way to handle the postgres backup, this is because
every time you do a lightning transaction the channel state is updated, and there isn't a way that I know of to trigger a postgres backup on each update to the database. If you accidently restore a previous version
of the channel state you will be in a bad place and possibly (almost certinaly, lose funds).
# update the machine (if you get an error about a lock just wait a few minutes and try again)
sudo apt update