Running Your Own Mostro Node
Mostro v0.16.3 โ Community Guide ยท February 2026
1. What is Mostro and Why Should Your Community Run One?
Mostro is a peer-to-peer Bitcoin exchange that lets people buy and sell Bitcoin using local currencies (dollars, euros, pesos โ any currency) without needing to provide identity documents (KYC). Think of it as a decentralized marketplace where buyers and sellers can trade directly.
It works using two technologies:
- Lightning Network โ a fast, low-cost Bitcoin payment layer (think of it as Bitcoin's express lane for small, quick payments)
- Nostr โ a censorship-resistant communication protocol (think of it as a messaging system that nobody can shut down)
Mostro acts as an escrow coordinator โ it holds the seller's Bitcoin in a temporary "lock box" (called a hold invoice) until the buyer confirms they've sent the local currency payment. Mostro never actually controls anyone's funds; it just holds them briefly during the trade.
Why Would Your Community Want to Run a Mostro Node?
- Fee Income โ Every trade earns you a fee (default 0.6%). If your community does $10,000 in monthly trades, that's ~$60/month in fees.
- P2P Trading Without KYC โ Your community members can buy and sell Bitcoin without providing identity documents.
- Disputes in Your Language โ When a trade goes wrong, your community resolves it, in your language.
- Independence โ No company can shut down your exchange. No government can pressure a single operator to close it.
- Customization โ You choose which currencies to support, what payment methods to allow, and what fees to charge.
How Mostro Works (Simplified)
- Alice wants to SELL Bitcoin for $50 USD โ She creates an order on Mostro
- Bob wants to BUY Bitcoin with $50 USD โ He sees Alice's order and takes it
- Mostro creates a "lock box" (hold invoice) โ Alice sends her Bitcoin into the lock box
- Bob sends $50 to Alice via bank transfer, Zelle, cash, etc. โ Bob clicks "Fiat Sent"
- Alice confirms she received the $50 โ She clicks "Release"
- Mostro releases the Bitcoin from the lock box to Bob โ Trade complete! โ
If something goes wrong, either party can open a dispute, and your community's assigned arbiters investigate and resolve it.
2. Prerequisites โ What You Need Before Starting
2.1 A Server (VPS)
A VPS (Virtual Private Server) is a computer in a data center that runs 24/7. You'll rent one to host your Mostro node.
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 2 vCPUs (shared) | 2+ vCPUs |
| RAM | 2 GB | 4 GB |
| Storage | 60 GB SSD | 100 GB SSD |
| Bandwidth | 3 TB/month | 3+ TB/month |
| OS | Ubuntu 22.04+ LTS | Ubuntu 24.04 LTS |
Estimated monthly cost: $10โ$24/month.
Popular VPS providers:
- Hostinger โ from ~$7/month ยท Accepts Bitcoin
- Hetzner โ โฌ3.49-8/month (good value, EU-based)
- Digital Ocean โ $24/month
- Lunanode โ Accepts Bitcoin payments
Many VPS providers accept Bitcoin payments. Look for that option if you want to keep things consistent with the Bitcoin ethos.
2.2 A Lightning Network Node (LND)
To run Mostro, you need an LND node (Lightning Network Daemon) โ the specific Lightning software that Mostro works with.
| Option | Difficulty | Cost | Notes |
|---|---|---|---|
| Use an existing LND node | Easy | Free | Best if someone already runs one |
| Run LND on the same VPS | Hard | Same VPS + liquidity | Requires 4GB+ RAM |
| Node-in-a-box | Medium | $200-600 + liquidity | Start9, Umbrel, RaspiBlitz |
| StartOS with Mostro package | Easiest | $300-600 + liquidity | One-click Mostro package |
| Voltage.cloud | Easy | From ~$20/month | Hosted LND |
Mostro specifically requires LND (not CLN/Core Lightning, not Eclair, not LDK). Make sure your Lightning node runs LND.
What you need from your LND node:
- The
tls.certfile (a security certificate) - The
admin.macaroonfile (an authentication token) - The gRPC address (typically
https://127.0.0.1:10009)
2.3 Lightning Liquidity
To facilitate trades, your Lightning node needs channels with Bitcoin in them.
| Trading Volume | Suggested Liquidity | Approx. BTC |
|---|---|---|
| Small community | 1โ5 million sats | 0.01โ0.05 BTC |
| Medium community | 5โ20 million sats | 0.05โ0.20 BTC |
| Active community | 20โ100 million sats | 0.20โ1.0 BTC |
Start small, grow incrementally. Begin with enough for your community's initial needs. When traders report orders failing, that's your signal to add more.
2.4 Nostr Keys
Your Mostro node needs its own identity on the Nostr network.
Never reuse Nostr keys between Mostro instances. Each node needs its own unique identity.
Generating secure Nostr keys locally with rana:
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Install rana - local Nostr key generator
cargo install rana
# Generate a new key pair
rana 3. Step-by-Step Setup
All installation options share the same first steps. Then choose your preferred option:
- Option A (Docker Hub): Fastest. No compiling, no cloning. Recommended for most.
- Option B (Docker Build): Build the image locally from the repository.
- Option C (Native Build): More control, better for experienced sysadmins.
Common Steps (for all 3 options)
Step 1: Connect to your VPS
ssh root@YOUR_VPS_IP_ADDRESS Step 2: Update the system
# Download the latest package information
apt update
# Install all available updates
apt upgrade -y Step 3: Install Docker and Docker Compose
Docker is required for options A and B. If you are compiling manually (Option C), you can skip this step.
# Install Docker using the official convenience script
curl -fsSL https://get.docker.com | sh
# Verify Docker is installed
docker --version
# Verify Docker Compose
docker compose version Step 4: Install additional tools
apt install -y git make โ Common steps completed. Now choose your installation option:
Option A: Docker Hub (Fastest โ Recommended)
Run Mostro directly from Docker Hub without cloning the repository or compiling.
Step 5: Create configuration directory
mkdir -p ~/mostro-config/lnd Step 6: Get the configuration template
curl -sL https://raw.githubusercontent.com/MostroP2P/mostro/v0.16.3/settings.tpl.toml \
-o ~/mostro-config/settings.toml Step 7: Copy LND credentials
cp /path/to/your/tls.cert ~/mostro-config/lnd/tls.cert
cp /path/to/your/admin.macaroon ~/mostro-config/lnd/admin.macaroon Step 8: Edit the configuration
nano ~/mostro-config/settings.toml Required changes:
[lightning]
lnd_cert_file = '/config/lnd/tls.cert'
lnd_macaroon_file = '/config/lnd/admin.macaroon'
lnd_grpc_host = 'https://host.docker.internal:10009'
[database]
url = "sqlite:///config/mostro.db"
[nostr]
nsec_privkey = 'YOUR_NSEC_KEY_HERE'
relays = ['wss://relay.mostro.network', 'wss://nos.lol']
[mostro]
fee = 0.006
max_order_amount = 1000000
min_payment_amount = 100
fiat_currencies_accepted = ['USD', 'EUR'] Step 9: Fix permissions
Avoid chmod 777. Use least privilege.
sudo chown -R 1000:1000 ~/mostro-config
chmod 700 ~/mostro-config
chmod 600 ~/mostro-config/settings.toml
chmod 600 ~/mostro-config/lnd/admin.macaroon Step 10: Run the container
If LND is on the same VPS:
docker run -d --name mostro \
--restart unless-stopped \
--add-host=host.docker.internal:host-gateway \
-v ~/mostro-config:/config \
mostrop2p/mostro:v0.16.3 If LND is on a different server:
docker run -d --name mostro \
--restart unless-stopped \
-v ~/mostro-config:/config \
mostrop2p/mostro:v0.16.3 Step 11: Check the logs
docker logs -f mostro Look for these messages:
- Settings correctly loaded โ Configuration is valid
- Connected to LND โ Lightning connection successful
- Connected to relay โ Nostr relay established
If you see Permission denied (os error 13), re-apply permissions: chown -R 1000:1000 ~/mostro-config and restart: docker restart mostro.
๐ Congratulations! If you see successful connections in the logs, your Mostro node is running!
Updating (Docker Hub)
export MOSTRO_TAG=v0.16.3
docker pull mostrop2p/mostro:$MOSTRO_TAG
docker stop mostro
docker rm mostro
docker run -d --name mostro \
--restart unless-stopped \
--add-host=host.docker.internal:host-gateway \
-v ~/mostro-config:/config \
mostrop2p/mostro:$MOSTRO_TAG Prefer explicit version tags (e.g., mostrop2p/mostro:v0.16.3) over :latest for controlled updates.
Option B: Docker Build (Build image locally)
Step 5: Download Mostro
cd /opt
git clone https://github.com/MostroP2P/mostro.git
cd mostro Step 6: Set up configuration files
cd docker
mkdir -p config
cp ../settings.tpl.toml config/settings.toml Step 7: Edit the configuration file
nano config/settings.toml Edit the same settings as Option A, Step 8.
Step 8: Build the Docker image
cd ..
LND_CERT_FILE=/root/.lnd/tls.cert \
LND_MACAROON_FILE=/root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon \
make docker-build Step 9: Set Database Password (Optional)
# Create docker/.env file
echo "MOSTRO_DB_PASSWORD='YourStrongPassword'" > docker/.env Step 10: Start Mostro
make docker-up
# Check if running
docker compose -f compose.yml ps
# View logs
docker compose -f compose.yml logs -f mostro ๐ Congratulations! If you see successful connections, your Mostro node is running!
Option C: Native Build (For Technical Operators)
Step 5: Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source /root/.cargo/env
rustc --version
cargo --version Do NOT install Rust via apt install rustc. Always use rustup. The system package is often outdated.
Step 6: Install build dependencies
apt install -y cmake build-essential libsqlite3-dev libssl-dev \
pkg-config git sqlite3 protobuf-compiler Step 7: Download and compile Mostro
cd /opt
git clone https://github.com/MostroP2P/mostro.git
cd mostro
cargo build --release If compilation fails due to low RAM, add swap space:
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile Step 8โ10: Install, initialize, and clean
install target/release/mostrod /usr/local/bin
cargo install sqlx-cli --version 0.6.2
./init_db.sh
cargo clean # Saves 2+ GB Step 11โ12: Create user and configure
adduser --disabled-login mostro
mkdir -p /opt/mostro
cp settings.tpl.toml /opt/mostro/settings.toml
nano /opt/mostro/settings.toml Edit the same settings as Option A, Step 8.
Step 13โ15: Test, permissions, and systemd service
# Test run
/usr/local/bin/mostrod -d /opt/mostro
# Set permissions
chown -R mostro:mostro /opt/mostro Create the systemd service:
# /etc/systemd/system/mostro.service
[Unit]
Description=Mostro daemon
After=network.target
[Service]
Type=simple
User=mostro
WorkingDirectory=/home/mostro
Environment=RUST_LOG=info
ExecStart=/usr/local/bin/mostrod -d /opt/mostro
Restart=on-failure
[Install]
WantedBy=multi-user.target systemctl daemon-reload
systemctl enable mostro.service
systemctl start mostro.service
systemctl status mostro.service ๐ Congratulations! Your Mostro node is running as a system service!
4. Configuration In Depth
4.1 Fees โ How You Earn Revenue
[mostro]
fee = 0.006
dev_fee_percentage = 0.30 Trading fee (fee): Percentage charged per trade, split between buyer and seller.
0.006= 0.6% (each party pays 0.3%)0.01= 1.0% (each party pays 0.5%)0= free (good for growing your user base)
Development fee (dev_fee_percentage): A percentage of your fee earnings that goes to Mostro development.
0.30= 30% (default) โ out of 600 sats, 180 go to dev fund- Minimum: 10%, Maximum: 100%
- All payments publicly auditable via Nostr events (kind 8383)
4.2 Order Limits and Currencies
[mostro]
max_order_amount = 1000000
min_payment_amount = 100
fiat_currencies_accepted = ['USD', 'EUR', 'ARS', 'CUP'] 4.3 Node Profile (Optional but Recommended)
[mostro]
name = "LatAm Mostro"
about = "P2P Bitcoin exchange for Latin America. Spanish support."
picture = "https://example.com/your-logo.png"
website = "https://your-community-site.com" 4.4 Timing and Expiration
[mostro]
expiration_hours = 24 # How long an order stays open
expiration_seconds = 900 # Time for taker to complete (15 min)
hold_invoice_expiration_window = 300 # Hold invoice validity (5 min) 4.5 Anti-Spam
[mostro]
pow = 0 # 0 = disabled; 10-20 = moderate. Start with 0. 5. Operating Your Mostro Node
5.1 How Disputes Work
Disputes are your most important operational responsibility.
When do disputes happen?
- Buyer claims they sent payment, seller says they didn't receive it
- Seller refuses to release Bitcoin after receiving payment
- Either party becomes unresponsive
The dispute process:
- User opens a dispute โ Either party clicks "Dispute" in their client
- Mostro flags the order โ Status changes to "Dispute", funds remain locked
- Arbiter takes the case โ An admin assigned to your node investigates
- Investigation โ Communicates with both parties, requests evidence
- Resolution โ Arbiter decides: settle to buyer, or refund to seller
Choose arbiters carefully. They have power to decide where locked funds go. Pick trusted, impartial community members. Having 2โ3 arbiters is recommended.
5.2 Mostrix โ Your Admin Tool
Mostrix is a terminal-based (TUI) client for dispute resolution. If you run a Mostro node, you need Mostrix.
# Install dependencies
sudo apt install -y cmake build-essential pkg-config
# Clone and build
git clone https://github.com/MostroP2P/mostrix.git
cd mostrix
cargo build --release
cargo run Configure Mostrix for admin mode in ~/.mostrix/settings.toml:
mostro_pubkey = "YOUR_MOSTRO_PUBKEY_HEX"
nsec_privkey = "nsec1your_personal_key"
admin_privkey = "nsec1your_admin_key"
relays = ["wss://relay.mostro.network", "wss://nos.lol"]
currencies = ["USD", "EUR", "ARS"]
user_mode = "admin" 5.3 mostro-watchdog โ Dispute Notifications
mostro-watchdog monitors your Mostro node for disputes and sends instant alerts to Telegram. Essential for fast response times.
git clone https://github.com/MostroP2P/mostro-watchdog.git
cd mostro-watchdog
cargo build --release
cp config.example.toml config.toml
nano config.toml [mostro]
pubkey = "YOUR_MOSTRO_PUBKEY"
[nostr]
relays = ["wss://relay.mostro.network", "wss://nos.lol"]
[telegram]
bot_token = "YOUR_BOT_TOKEN"
chat_id = "YOUR_CHAT_ID" Run mostro-watchdog as a systemd service alongside your Mostro node for 24/7 monitoring.
./target/release/mostro-watchdog ๐ You're all set! Welcome to the Mostro network.