
</a>
Basic installation
[!NOTE] Default DB: LNbits uses SQLite by default (simple & effective). You can switch to PostgreSQL — see the section below.
Table of contents
- Option 1: AppImage (Linux)
- Option 2: UV (recommended for developers)
- Option 2a (Legacy): Poetry — Replaced by UV
- Option 3: Install script (Debian/Ubuntu)
- Option 4: Nix
- Option 5: Docker
- Option 6: Fly.io
- Troubleshooting
- Optional: PostgreSQL database
- Using LNbits
- Additional guides
Option 1: AppImage (Linux)
Quickstart
- Download latest AppImage from releases or run:
sudo apt-get install jq libfuse2
wget $(curl -s https://api.github.com/repos/lnbits/lnbits/releases/latest | jq -r '.assets[] | select(.name | endswith(".AppImage")) | .browser_download_url') -O LNbits-latest.AppImage
chmod +x LNbits-latest.AppImage
LNBITS_ADMIN_UI=true HOST=0.0.0.0 PORT=5000 ./LNbits-latest.AppImage # most system settings are now in the admin UI, but pass additional .env variables here
- LNbits will create a folder for DB and extension files in the same directory as the AppImage.
[!NOTE] Next steps
Install complete → Running LNbits
Update LNBits → Update LNbits (all methods)
Option 2: UV (recommended for developers)
[!IMPORTANT] It is recommended to use the latest version of UV & Make sure you have Python version 3.12 installed.
Verify Python
python3 --version
Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
Install LNbits
git clone https://github.com/lnbits/lnbits.git
cd lnbits
git checkout main
uv sync --all-extras
cp .env.example .env
# Optional: set funding source and other options in .env (e.g., `nano .env`)
Run the server
uv run lnbits
# To change port/host: uv run lnbits --port 9000 --host 0.0.0.0
# Add --debug to the command above and set DEBUG=true in .env for verbose output
LNbits CLI
# Useful for superuser ID, updating extensions, etc.
uv run lnbits-cli --help
Update LNbits
cd lnbits
# Stop LNbits with Ctrl + X or your service manager
# sudo systemctl stop lnbits
# Update code
git pull --rebase
uv sync --all-extras
uv run lnbits
Use Admin UI → Extensions → “Update All” to bring extensions up to the proper level
[!NOTE] Next steps
Install complete → Running LNbits
Update LNBits → Update LNbits (all methods)