Complete guide for integrating Monero with wallet RPC into your Bicrypto Ecosystem
This guide covers the Monero (XMR) integration in Bicrypto Ecosystem. Monero is a privacy-focused cryptocurrency that uses ring signatures, stealth addresses, and RingCT for anonymous transactions. The integration uses the wallet RPC service to manage wallets, monitor deposits, and handle withdrawals.
# Update system packages
sudo apt update && sudo apt upgrade -y
# Install required dependencies
sudo apt install -y wget bzip2
# Create directory for Monero
mkdir -p ~/monero && cd ~/monero
# Download latest Monero release
MONERO_VERSION="0.18.3.1"
wget https://downloads.getmonero.org/cli/monero-linux-x64-v$MONERO_VERSION.tar.bz2
# Extract the archive
tar -xvf monero-linux-x64-v$MONERO_VERSION.tar.bz2
# Move to system directory
sudo mv monero-x86_64-linux-gnu-v$MONERO_VERSION /opt/monero
# Create symbolic links for easy access
sudo ln -sf /opt/monero/monerod /usr/local/bin/monerod
sudo ln -sf /opt/monero/monero-wallet-rpc /usr/local/bin/monero-wallet-rpc
sudo ln -sf /opt/monero/monero-wallet-cli /usr/local/bin/monero-wallet-cli
# Verify installation
monerod --version
monero-wallet-rpc --version
Always check getmonero.org for the latest stable version.
# Create Monero data directory
mkdir -p ~/.bitmonero
# Create configuration file
cat > ~/.bitmonero/bitmonero.conf << EOF
# Monero Daemon Configuration
# Network settings
data-dir=/home/$USER/.bitmonero
log-file=/home/$USER/.bitmonero/monero.log
log-level=0
# P2P network settings
p2p-bind-ip=0.0.0.0
p2p-bind-port=18080
# RPC settings for daemon
rpc-bind-ip=127.0.0.1
rpc-bind-port=18081
restricted-rpc=false
confirm-external-bind=true
# RPC authentication (CHANGE THESE!)
rpc-login=monero_rpc:your_secure_password_here
# Performance settings
db-sync-mode=safe
max-concurrency=4
block-sync-size=10
# Security settings
no-igd=true
# Use mainnet (default)
# For testnet, uncomment: testnet=true
# For stagenet, uncomment: stagenet=true
EOF
# Set proper permissions
chmod 600 ~/.bitmonero/bitmonero.conf
Important configuration options:
rpc-login: Set secure username and password for RPC accessrpc-bind-ip: Use 127.0.0.1 for local access onlydb-sync-mode: Use "safe" for data integrityrestricted-rpc: Set to false for wallet operations# Create systemd service file for daemon
sudo tee /etc/systemd/system/monerod.service > /dev/null << EOF
[Unit]
Description=Monero Daemon
After=network.target
[Service]
Type=simple
User=$USER
Group=$USER
ExecStart=/usr/local/bin/monerod --config-file=/home/$USER/.bitmonero/bitmonero.conf --non-interactive
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target
EOF
# Enable and start daemon
sudo systemctl daemon-reload
sudo systemctl enable monerod.service
sudo systemctl start monerod.service
# Check daemon status
sudo systemctl status monerod.service
# Create wallet directory
mkdir -p ~/monero-wallets
# Create wallet RPC service file
sudo tee /etc/systemd/system/monero-wallet-rpc.service > /dev/null << EOF
[Unit]
Description=Monero Wallet RPC
After=network.target monerod.service
Requires=monerod.service
[Service]
Type=simple
User=$USER
Group=$USER
ExecStart=/usr/local/bin/monero-wallet-rpc \
--rpc-bind-ip 127.0.0.1 \
--rpc-bind-port 18083 \
--daemon-address 127.0.0.1:18081 \
--rpc-login wallet_rpc:your_wallet_rpc_password \
--wallet-dir /home/$USER/monero-wallets \
--log-level 2 \
--confirm-external-bind \
--trusted-daemon
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target
EOF
# Enable and start wallet RPC
sudo systemctl daemon-reload
sudo systemctl enable monero-wallet-rpc.service
sudo systemctl start monero-wallet-rpc.service
# Check wallet RPC status
sudo systemctl status monero-wallet-rpc.service
The initial blockchain sync can take 24-48 hours. Monitor progress with: sudo journalctl -u monerod.service -f
# Monero RPC Configuration
XMR_RPC_USER="wallet_rpc"
XMR_RPC_PASSWORD="your_wallet_rpc_password"
# Optional: Wallet password if you want to encrypt wallets
# XMR_WALLET_PASSWORD="your_wallet_encryption_password"
Environment variable descriptions:
XMR_RPC_USER: Username for wallet RPC authenticationXMR_RPC_PASSWORD: Password for wallet RPC authenticationXMR_WALLET_PASSWORD: Optional password to encrypt wallet files~/monero-wallets/ directory# Check daemon sync status
curl -X POST http://127.0.0.1:18081/json_rpc \
-d '{"jsonrpc":"2.0","id":"0","method":"get_info"}' \
-H 'Content-Type: application/json' \
-u monero_rpc:your_secure_password_here
# Get current block height
curl -X POST http://127.0.0.1:18081/json_rpc \
-d '{"jsonrpc":"2.0","id":"0","method":"get_block_count"}' \
-H 'Content-Type: application/json' \
-u monero_rpc:your_secure_password_here
# Create a test wallet
curl -X POST http://127.0.0.1:18083/json_rpc \
-d '{"jsonrpc":"2.0","id":"0","method":"create_wallet","params":{"filename":"test_wallet","password":"","language":"English"}}' \
-H 'Content-Type: application/json' \
-u wallet_rpc:your_wallet_rpc_password
# Open the wallet
curl -X POST http://127.0.0.1:18083/json_rpc \
-d '{"jsonrpc":"2.0","id":"0","method":"open_wallet","params":{"filename":"test_wallet","password":""}}' \
-H 'Content-Type: application/json' \
-u wallet_rpc:your_wallet_rpc_password
# Get wallet address
curl -X POST http://127.0.0.1:18083/json_rpc \
-d '{"jsonrpc":"2.0","id":"0","method":"get_address","params":{"account_index":0}}' \
-H 'Content-Type: application/json' \
-u wallet_rpc:your_wallet_rpc_password
Go to Admin → Extensions → Ecosystem → Master Wallet
Go to Admin → Extensions → Ecosystem → Tokens
Go to Admin → Extensions → Ecosystem → Markets
# Monitor daemon logs
sudo journalctl -u monerod.service -f
# Monitor wallet RPC logs
sudo journalctl -u monero-wallet-rpc.service -f
# Check blockchain sync progress
monerod status
# Check disk usage
df -h ~/.bitmonero
# Monitor system resources
htop
# Check service status
systemctl status monerod
systemctl status monero-wallet-rpc
# Restart services if needed
sudo systemctl restart monerod
sudo systemctl restart monero-wallet-rpc
# Backup wallet files
cp -r ~/monero-wallets ~/monero-wallets-backup-$(date +%Y%m%d)
# Create automated backup script
cat > ~/backup-monero.sh << 'EOF'
#!/bin/bash
BACKUP_DIR="/backup/monero/$(date +%Y%m%d-%H%M%S)"
mkdir -p $BACKUP_DIR
cp -r ~/monero-wallets $BACKUP_DIR/
cp ~/.bitmonero/bitmonero.conf $BACKUP_DIR/
echo "Backup completed to $BACKUP_DIR"
EOF
chmod +x ~/backup-monero.sh
# Add to crontab for daily backups
(crontab -l 2>/dev/null; echo "0 2 * * * /home/$USER/backup-monero.sh") | crontab -
Always backup wallet files before system maintenance. Each wallet file contains the private keys for that specific wallet. Lost wallet files cannot be recovered without backups!
Chain not synchronized:
systemctl status monerodmonerod statusWallet RPC connection refused:
systemctl status monero-wallet-rpcFailed to open wallet:
High memory usage:
max-concurrency in daemon configdb-sync-mode=safe:sync instead of fast--prune-blockchainbackend/src/blockchains/xmr.ts - Monero service implementationbackend/src/api/(ext)/ecosystem/utils/wallet.ts - Wallet integrationbackend/src/api/(ext)/ecosystem/utils/withdrawalQueue.ts - Withdrawal handlingYou've successfully set up Monero integration for your Bicrypto Ecosystem. The system now supports:
Remember to monitor system resources, maintain regular backups, and keep the Monero software updated for optimal security and performance.