From bd143f5c14010dd8c3407a919ffec35f06a33752 Mon Sep 17 00:00:00 2001 From: Arc <33088785+arcbtc@users.noreply.github.com> Date: Thu, 11 Jan 2024 01:09:08 +0000 Subject: [PATCH] added directions for cache (#2197) --------- Co-authored-by: Pavol Rusnak --- docs/guide/installation.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/guide/installation.md b/docs/guide/installation.md index a37e3d64d..8bce522d5 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -65,17 +65,31 @@ poetry install --only main # Install nix. If you have installed via another manager, remove and use this install (from https://nixos.org/download) sh <(curl -L https://nixos.org/nix/install) --daemon +# Enable nix-command and flakes experimental features for nix: +echo 'experimental-features = nix-command flakes' >> /etc/nix/nix.conf + +# Add cachix for cached binaries +nix-env -iA cachix -f https://cachix.org/api/v1/install +cachix use lnbits + # Clone and build LNbits git clone https://github.com/lnbits/lnbits.git cd lnbits -nix build .#lnbits -mkdir data +nix build +mkdir data ``` #### Running the server ```sh +nix run +``` + +Ideally you would set the environment via the `.env` file, +but you can also set the env variables or pass command line arguments: + +``` sh # .env variables are currently passed when running, but LNbits can be managed with the admin UI. LNBITS_ADMIN_UI=true ./result/bin/lnbits --port 9000 @@ -83,7 +97,6 @@ LNBITS_ADMIN_UI=true ./result/bin/lnbits --port 9000 SUPER_USER=be54db7f245346c8833eaa430e1e0405 LNBITS_ADMIN_UI=true ./result/bin/lnbits --port 9000 ``` - ## Option 3: Docker use latest version from docker hub