Skip to content

First Setup

What to do after installing LNbits - create your admin account, configure your instance, and connect a Lightning backend.

You've installed LNbits and it's running at http://localhost:5000. Here's what to do next.

Step 1: Open the Admin UI

On first launch LNbits opens a setup wizard in the browser. Navigate to your instance and you'll be prompted to create a Super User account.

  1. Open http://localhost:5000 (or your server's address)
  2. Create a username and password - this becomes the Super User
  3. You're logged in with full admin privileges

The Super User identity is stored in data/.super_user and persists across restarts.

TIP

The Super User is the highest-privilege account. It's the only account that can add or remove other admins. See Super User for details.

Step 2: Configure your instance

LNbits has two configuration layers:

LayerWhat it controlsHow to edit
.env fileHost, port, database URL, debug modeEdit the file, restart LNbits
Admin UISite name, funding source, fees, themes, extensionsChange at runtime in the browser

When the Admin UI is enabled (default), settings like the funding source and site title are managed in the browser - editing them in .env has no effect. See Configuration for the full reference.

Minimum .env settings

Most users only need to set a few values in .env:

bash
# Host and port (defaults shown)
HOST=0.0.0.0
PORT=5000

# Database - SQLite is fine for testing, use PostgreSQL for production
# LNBITS_DATABASE_URL=postgres://user:pass@localhost:5432/lnbits

Everything else can be configured through the Admin UI after login.

Step 3: Connect a Lightning backend

LNbits needs a funding source - a Lightning node or service that handles real payments.

  1. Open Admin UI → Funding
  2. Select your backend (LND REST, CLNRest, etc.)
  3. Enter the connection details (endpoint, certificate, macaroon)
  4. Save and verify the connection

TIP

No Lightning node yet? LNbits ships with FakeWallet for testing. It simulates payments without real sats. See FakeWallet.

See Wallet Backends for setup guides for each supported backend.

Step 4: Production checklist

For a production deployment, work through these:

Next steps

News · Shop · SaaS · Telegram · Released under the MIT License.