be-BOP is a free and open-source, peer-to-peer monetization platform built for communities and creators. It combines e-commerce, point-of-sale (PoS), subscriptions, crowdfunding/peerfunding, ticketing, donations, and pay-what-you-want models — all under one roof.
- A S3-compatible object storage. There are hundreds of solutions, including https://min.io/, an open source solution that can be run inside docker, or paid services like AWS, Scaleway, ...
- SMTP credentials, for sending emails
- A MongoDB replica set. You can run it inside docker or use MongoDB Atlas.
- A bitcoin node, and lnd
- Node version 18+, corepack enabled with
corepack enable - Git LFS installed with
git lfs install
The app will automatically configure the S3 bucket to accept CORS PUT calls.
Add .env.local or .env.{development,test,production}.local files for secrets not committed to git and to override the .env
LINK_PRELOAD_HEADERS- Set totrueto enable theLink rel=preloadheader, see explanation. If you do so, you may need to configure nginx to allow bigger header withproxy_buffer_size 16k, see explanation.MONGODB_URL- The connection URL to the MongoDB replicasetMONGODB_DB- The DB name, defaulting to "bebop"NOSTR_PRIVATE_KEY- To send notificationsORIGIN- The url where be-BOP will be deployed. For example, https://dev-bootik.pvh-labs.chS3_BUCKET- The name of the bucket for the S3-compatible object storageS3_ENDPOINT_URL- The endpoint for the S3-compatible object storage - eg http://s3-website.us-east-1.amazonaws.com or http://s3.fr-par.scw.cloudS3_KEY_ID- Credentials for the S3-compatible object storageS3_KEY_SECRET- Credentials for the S3-compatible object storageS3_REGION- Region from the S3-compatible object storageSMTP_HOST- Specify all the SMTP variables to enable email notificationsSMTP_PASSWORD- Specify all the SMTP variables to enable email notificationsSMTP_PORT- Specify all the SMTP variables to enable email notificationsSMTP_USER- Specify all the SMTP variables to enable email notificationsSMTP_FROM- Optional, defaults toSMTP_USER. Sender email address for email notifications
🚨 You can use phoenixd for lightning and bitcoin nodeless directly from the UI, without setting up these env vars.
BITCOIN_RPC_URL- The RPC url for the bitcoin node. Set to http://127.0.0.1:8332 if you run a bitcoin node locally with default configurationBITCOIN_RPC_USER- The RPC userBITCOIN_RPC_PASSWORD- The RPC passwordBIP84_XPUB- with derivation path m/84'/0'/0'. If you have a ZPub, use https://jlopp.github.io/xpub-converter/ to convert to xpub. This enables a completely trustless setup, where the be-BOP server does not need to know the private key. You can generate the xpub from the sparrow wallet, for example.LND_REST_URL- The LND Rest interface URL. Set to http://127.0.0.1:8080 if you run a lnd node locally with default configurationLND_MACAROON_PATH- Where the credentials for lnd are located. For example,~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon. Leave empty if lnd runs with--no-macaroons, or if you're usingLND_MACAROON_VALUE. You can useinvoices.macarooninstead ofadmin.macaroon, but then the admin LND page in the be-BOP will not work. Orders should work fine.LND_MACAROON_VALUE- Upper-case hex-encoded represenetation of the LND macaroon. Leave empty if lnd runs with--no-macaroons, or if you're usingLND_MACAROON_PATH. Example command:cat .lnd/data/chain/bitcoin/mainnet/admin.macaroon | hexdump -e '16/1 "%02X"'. You can useinvoices.macarooninstead ofadmin.macaroon, but then the admin LND page in the be-BOP will not work. Orders should work fine.TOR_PROXY_URL- Url of the SOCKS5 proxy used to access TOR. If set, and the hostname forBITCOIN_RPC_URLis a.onionaddress, the app will use the proxy to access the bitcoin node. In the same manner, ifLND_REST_URLis a.onionaddress, TOR will be used to access the lightning node.
You can also set the following environment variables to allow SSO. Set your redirect url to https://<...>/api/callback/<provider>, where <provider> is one of github, google, facebook, twitter, when you create your app on the provider's website:
GITHUB_IDGITHUB_SECRETGOOGLE_IDGOOGLE_SECRETFACEBOOK_IDFACEBOOK_SECRETTWITTER_IDTWITTER_SECRET
pnpm run build
node --enable-source-maps build/index.js
# If behind a reverse proxy, you can use the following config:
# ADDRESS_HEADER=X-Forwarded-For XFF_DEPTH=1 node build/index.jsYou can set the PORT environment variable to change from the default 3000 port to another port.
You can also use pm2 to manage your node application, and run it on multiple cores.
NODE_OPTIONS=--enable-source-maps pm2 start --name bebop --update-env build/index.js
# If behind a reverse proxy, you can use the following config:
# NODE_OPTIONS=--enable-source-maps ADDRESS_HEADER=X-Forwarded-For XFF_DEPTH=1 pm2 start --name bebop --update-env build/index.jsNote: for uploading large payloads you may want to set the BODY_SIZE_LIMIT=20000000 environment variable to allow 20MB payloads for example. It should not be needed for normal usage.
- Build the docker image
docker build -t bebop .- Run the docker image with environment variables
export DOTENV_LOCAL=$(cat .env.local)
docker run -p 3000:3000 --env DOTENV_LOCAL=$DOTENV_LOCAL bebop --add-host=host.docker.internal:host-gatewayor
# Be careful, double-quotes surrounding values in .env.local will not be ignored
docker run -p 3000:3000 --env-file .env.local bebop --add-host=host.docker.internal:host-gatewayIf you want to access a local BTC node or LND node, use host.docker.internal as the hostname instead of localhost:
BITCOIN_RPC_URL=http://host.docker.internal:8332Docker compose is used for local development, but you can also use it for production. It will launch a mongodb and minio container.
Edit .env.local to add a S3 access key and secret if not already present, for example:
echo "S3_KEY_ID=$(openssl rand -base64 63 | tr -d '\n')" >> .env.local
echo "S3_KEY_SECRET=$(openssl rand -base64 63 | tr -d '\n')" >> .env.localMake sure to have a fairly recent version of docker & docker compose.
# Optional: update dependencies
docker compose pull
# --build will rebuild the docker image when you change the code. Use --force-recreate to force a rebuild (eg after updating dependencies).
docker compose --env-file .env.local up --build -d
It will still use the .env.local file for the environment variables if present, overriding the values for MongoDB and S3.
Minio will be available on http://localhost:9000 and be-BOP on http://localhost:3000.
Some helper commands:
# See the containers
docker compose ps
# Get the logs
docker compose logs bebop -f
# Enter the container
docker compose exec bebop sh
# Stop the containers
docker compose downSee the beginning of the README for other environment variables you can set in .env.local, including the SMTP credentials.
If you run in production, you will need to set the ORIGIN environment variable to the URL of your be-BOP instance:
# .env.local - replace with your be-BOP url
ORIGIN=https://bebop.example.comAs well as the object storage (minio) url:
# .env.local - replace with your minio url
S3_ENDPOINT_URL=https://minio.bebop.example.comIf you want to access a local BTC node or LND node, use host.docker.internal as the hostname instead of localhost:
BITCOIN_RPC_URL=http://host.docker.internal:8332When placing the beBOP behind a reverse proxy, to get your user's IPs, you will need to set the ADDRESS_HEADER to X-Forwarded-For and the XFF_DEPTH header to 1 (or appropriate value depending on your config) in the environment.
It's possible to enable maintenance mode in the admin.
To correctly recognize your IP, if you are behind a reverse proxy like nginx, you will need to set the ADDRESS_HEADER to X-Forwarded-For and the XFF_DEPTH header to 1 in the environment.
You can run the following command to copy the DB and S3 to another instance:
export OLD_DB_URL="..."
export OLD_DB_NAME="..."
export NEW_DB_URL="..."
export NEW_DB_NAME="..."
export OLD_S3_ENDPOINT="..."
export OLD_S3_BUCKET="..."
export OLD_S3_REGION="..."
export OLD_S3_KEY="..."
export OLD_S3_SECRET="..."
export NEW_S3_BUCKET="..."
export NEW_S3_REGION="..."
export NEW_S3_KEY="..."
export NEW_S3_SECRET="..."
export NEW_S3_ENDPOINT="..."
pnpm run copy-db-s3- Node.js 18+
- pnpm (install with
sudo corepack enable) - Git LFS (
git lfs install)
pnpm install
pnpm devbe-BOP requires a MongoDB replica set and an S3-compatible object storage. There are two ways to set them up:
The fastest way to get started — use cloud-hosted MongoDB, and either a cloud S3 or a single local MinIO container:
- MongoDB: Get a free tier on MongoDB Atlas. A free M0 cluster is more than enough for development.
- S3-compatible storage — pick one:
- Quickest local option: Run a single MinIO container (see below) — this is the only Docker container you'll need
- AWS S3 free tier
- Scaleway Object Storage free tier
- Or any other S3-compatible service
To run MinIO locally:
mkdir -p ${HOME}/minio/data
docker run -d \
-p 9000:9000 \
-p 9090:9090 \
--name minio \
-e "MINIO_ROOT_USER=ROOTUSER" \
-e "MINIO_ROOT_PASSWORD=CHANGEME123" \
-v ${HOME}/minio/data:/data \
quay.io/minio/minio server /data --console-address ":9090"MinIO console will be available at http://127.0.0.1:9090. The S3 bucket will be created automatically by be-BOP on first run.
Add to your .env.local:
# MongoDB Atlas
MONGODB_URL="mongodb+srv://<user>:<password>@<cluster>.mongodb.net/..."
MONGODB_DB="bebop"
# Your app URL
ORIGIN="http://localhost:5173"
# MinIO (local) — or replace with your cloud S3 credentials
S3_BUCKET="bebop"
S3_ENDPOINT_URL="http://127.0.0.1:9000"
PUBLIC_S3_ENDPOINT_URL="http://127.0.0.1:9000"
S3_REGION="localhost"
S3_KEY_ID="ROOTUSER"
S3_KEY_SECRET="CHANGEME123"
# Mock emails in development
SMTP_FAKE="true"Run pnpm dev and you're ready to go.
Run both MongoDB and MinIO locally using Docker Compose — no cloud accounts needed:
docker compose -f docker-compose.dev.yml up -dThis starts a MongoDB replica set (port 27017) and MinIO (ports 9000, 9090). No be-BOP container — you run the app with pnpm dev.
Add to your .env.local:
MONGODB_URL=mongodb://localhost:27017
MONGODB_DIRECT_CONNECTION=true
MONGODB_DB="bebop"
ORIGIN="http://localhost:5173"
S3_BUCKET="bebop"
S3_ENDPOINT_URL="http://localhost:9000"
PUBLIC_S3_ENDPOINT_URL="http://localhost:9000"
S3_REGION="localhost"
S3_KEY_ID="minio"
S3_KEY_SECRET="minio123"
SMTP_FAKE="true"Note:
MONGODB_DIRECT_CONNECTION=trueis required when connecting to a MongoDB replica set running inside Docker from the host machine.
Helper commands:
docker compose -f docker-compose.dev.yml ps # See running containers
docker compose -f docker-compose.dev.yml logs -f # View logs
docker compose -f docker-compose.dev.yml down # Stop containersTo add personal services like mongo-express or mailhog, you can either add them directly to your local docker-compose.dev.yml (changes will show in git diff), or create a separate docker-compose.override.yml (gitignored) and run both with:
docker compose -f docker-compose.dev.yml -f docker-compose.override.yml up -dSelf install plausible : Plausible
Then, go in the config page : /admin/config
And : Copy/paste your Plausible URL in the plausible input #for example: https://plausible.your-domain.com/js/script.js
To have emails, for example to have multiple users, you need to configure SMTP with environment variables and set DISABLE_REGISTRATION=invite_only.