fix nix install doc (#3401)
Some checks failed
LNbits CI / lint (push) Has been cancelled
LNbits CI / jmeter (3.10) (push) Has been cancelled
LNbits CI / test-api (, 3.10) (push) Has been cancelled
LNbits CI / test-api (, 3.11) (push) Has been cancelled
LNbits CI / test-api (, 3.12) (push) Has been cancelled
LNbits CI / test-api (postgres://lnbits:lnbits@0.0.0.0:5432/lnbits, 3.10) (push) Has been cancelled
LNbits CI / test-api (postgres://lnbits:lnbits@0.0.0.0:5432/lnbits, 3.11) (push) Has been cancelled
LNbits CI / test-api (postgres://lnbits:lnbits@0.0.0.0:5432/lnbits, 3.12) (push) Has been cancelled
LNbits CI / test-wallets (, 3.10) (push) Has been cancelled
LNbits CI / test-wallets (, 3.11) (push) Has been cancelled
LNbits CI / test-wallets (, 3.12) (push) Has been cancelled
LNbits CI / test-wallets (postgres://lnbits:lnbits@0.0.0.0:5432/lnbits, 3.10) (push) Has been cancelled
LNbits CI / test-wallets (postgres://lnbits:lnbits@0.0.0.0:5432/lnbits, 3.11) (push) Has been cancelled
LNbits CI / test-wallets (postgres://lnbits:lnbits@0.0.0.0:5432/lnbits, 3.12) (push) Has been cancelled
LNbits CI / test-unit (, 3.10) (push) Has been cancelled
LNbits CI / test-unit (, 3.11) (push) Has been cancelled
LNbits CI / test-unit (, 3.12) (push) Has been cancelled
LNbits CI / test-unit (postgres://lnbits:lnbits@0.0.0.0:5432/lnbits, 3.10) (push) Has been cancelled
LNbits CI / test-unit (postgres://lnbits:lnbits@0.0.0.0:5432/lnbits, 3.11) (push) Has been cancelled
LNbits CI / regtest (LndWallet, 3.10) (push) Has been cancelled
LNbits CI / test-unit (postgres://lnbits:lnbits@0.0.0.0:5432/lnbits, 3.12) (push) Has been cancelled
LNbits CI / migration (3.10) (push) Has been cancelled
LNbits CI / migration (3.11) (push) Has been cancelled
LNbits CI / migration (3.12) (push) Has been cancelled
LNbits CI / openapi (push) Has been cancelled
LNbits CI / regtest (CoreLightningRestWallet, 3.10) (push) Has been cancelled
LNbits CI / regtest (CoreLightningWallet, 3.10) (push) Has been cancelled
LNbits CI / regtest (EclairWallet, 3.10) (push) Has been cancelled
LNbits CI / regtest (LNbitsWallet, 3.10) (push) Has been cancelled
LNbits CI / regtest (LndRestWallet, 3.10) (push) Has been cancelled
codeql / analyze (push) Has been cancelled

This commit is contained in:
Arc 2025-10-10 16:39:08 +01:00 committed by GitHub
parent ad606b2517
commit 266b16834b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -132,7 +132,7 @@ Now visit `0.0.0.0:5000` to make a super-user account.
```sh ```sh
# Install nix. If you have installed via another manager, remove and use this install (from https://nixos.org/download) # Install nix. If you have installed via another manager, remove and use this install (from https://nixos.org/download)
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
# Enable nix-command and flakes experimental features for nix: # Enable nix-command and flakes experimental features for nix:
grep -qxF 'experimental-features = nix-command flakes' /etc/nix/nix.conf || \ grep -qxF 'experimental-features = nix-command flakes' /etc/nix/nix.conf || \
@ -145,16 +145,29 @@ echo "trusted-users = root $USER" | sudo tee -a /etc/nix/nix.conf
# Restart daemon so changes apply # Restart daemon so changes apply
sudo systemctl restart nix-daemon sudo systemctl restart nix-daemon
# Clone and build LNbits
git clone https://github.com/lnbits/lnbits.git
cd lnbits
# Make data directory and persist data/extension folders
mkdir data
PROJECT_DIR="$(pwd)"
{
echo "export PYTHONPATH=\"$PROJECT_DIR/ns:\$PYTHONPATH\""
echo "export LNBITS_DATA_FOLDER=\"$PROJECT_DIR/data\""
echo "export LNBITS_EXTENSIONS_PATH=\"$PROJECT_DIR\""
} >> ~/.bashrc
grep -qxF '. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ~/.bashrc || \
echo '. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' >> ~/.bashrc
. ~/.bashrc
# Add cachix for cached binaries # Add cachix for cached binaries
nix-env -iA cachix -f https://cachix.org/api/v1/install nix-env -iA cachix -f https://cachix.org/api/v1/install
cachix use lnbits cachix use lnbits
# Clone and build LNbits # Build LNbits
git clone https://github.com/lnbits/lnbits.git
cd lnbits
nix build nix build
mkdir data
``` ```
#### Running the server #### Running the server