Why Nostr? What is Njump?
2024-05-12 14:14:47

c-lightning-REST with Tailscale on Start9

This guide gives you commands to run additional containers on Start9. This is not officially supported and will break on reboot. You can always run the containers again to restore the setup. The containers are used to provide access, via Tailscale, to Core Lightning's c-lightning-REST plugin

Start9 setup

  1. In your Start9 dashboard, make sure you have C-Lightning-REST enabled.
    • Services > Core Lightning > Config > Advanced > Plugins > C-Lightning-REST
  2. SSH to your Start9, see documentation for help: https://docs.start9.com/0.3.5.x/user-manual/ssh
  3. Access the root account: sudo -i
  4. Run tailscaled and alpine/socat containers:
podman run -d \
--name=tailscaled.embassy \
-v /dev/net/tun:/dev/net/tun \
-v /var/lib:/var/lib \
-e TS_HOSTNAME=tailscaled \
--network=host \
--cap-add=NET_ADMIN \
--cap-add=NET_RAW \
docker.io/tailscale/tailscale:stable
podman run -d \
--name=socat.embassy \
--publish 4321:1234 \
--network=start9 \
docker.io/alpine/socat \
tcp-listen:1234,fork,reuseaddr tcp:c-lightning.embassy:3001
  • Note, if you see errors related to /root/.docker/config.json or Unexpected end of JSON, run echo '{}' > /root/.docker/config.json
  1. Check the status of tailscaled and log in
podman exec tailscaled.embassy tailscale --socket /tmp/tailscaled.sock status

# example output
Logged out.
Log in at: https://login.tailscale.com/a/1fa8e293dfd108

Zeus wallet setup

  1. On your phone, connect to Tailscale
  2. On your Start9, copy your REST Macaroon (Hex) for Zeus wallet setup
    • Services > Core Lightning > Properties > REST Properties > REST Macaroon (Hex)
  3. In Zeus wallet, add a new node
    • Settings > (tap the active node) > +

Setting | Value ---|--- Node interface | Core Lightning (c-lightning-Rest) Host | tailscaled.YOUR_TAILNET_DOMAIN Macaroon (Hex format) | see last step REST Port | 4321 Certificate Verification | disabled

SAVE NODE CONFIG

Enjoy!

Author Public Key
npub1qdsjkr46urkg6vqrr3zqhgy8l7dazc5k9hlm5jmwqg0vft7hzgtqamgfw3