Quickstart Guide
This guide walks you through deploying your own Rebel Pay instance. Self-hosted means you control your data and keep 100% of your payments.
Prerequisites
- A server (VPS, dedicated, or local machine)
- Node.js 18+ or Docker
- A running Monero wallet RPC (monero-wallet-rpc)
Option A: Docker Compose (Recommended)
# Clone the repository
git clone https://github.com/rebelpay/rp2.git
cd rp2
# Copy example environment file
cp .env.example .env
# Edit .env with your configuration
# Required: DB_ENCRYPTION_KEY, FIELD_ENCRYPTION_KEY, JWT_SECRET, SESSION_SECRET
# Start with Docker Compose
docker compose up -d
Option B: Manual Setup
# Clone and install dependencies
git clone https://github.com/rebelpay/rp2.git
cd rp2
npm install
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Start the services
npm run start:api # API server (port 4000)
npm run start:web # Website (port 3200)
Environment Configuration
Required environment variables:
# Generate each with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# Required — encryption & auth
DB_ENCRYPTION_KEY=your_random_hex_here
FIELD_ENCRYPTION_KEY=your_random_hex_here
JWT_SECRET=your_random_hex_here
SESSION_SECRET=your_random_hex_here
# Required — set to your domain
CORS_ORIGINS=https://your-server.com
# Optional — Monero wallet RPC
MONERO_RPC_URL=http://127.0.0.1:18083/json_rpc
First-Run Setup
- Visit your server URL (e.g.,
https://your-server.com) - You'll be redirected to the setup wizard
- Create your admin account (email, password, store name)
- Set your XMR payout address in Settings
Create Your First Charge
# Create a $25 charge
curl -X POST https://your-server.com/api/charges \
-H "Content-Type: application/json" \
-H "x-api-key: rp_live_your_key_here" \
-d '{
"amount": 25.00,
"currency": "USD",
"metadata": {
"order_id": "order_789"
}
}'
Reverse Proxy (Production)
For production, use a reverse proxy like nginx:
server {
listen 443 ssl http2;
server_name your-server.com;
ssl_certificate /etc/letsencrypt/live/your-server.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-server.com/privkey.pem;
location /api {
proxy_pass http://127.0.0.1:4000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
proxy_pass http://127.0.0.1:3200;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Monero Wallet Setup
rp2 requires a running monero-wallet-rpc instance.
This wallet receives all incoming XMR and sweeps it to merchant payout addresses.
Quick start (using a trusted public node — no local blockchain needed):
monero-wallet-rpc \
--non-interactive \
--wallet-file /path/to/your/wallet \
--password "your-wallet-password" \
--rpc-bind-port 18083 \
--rpc-bind-ip 127.0.0.1 \
--disable-rpc-login \
--daemon-address node.monerodevs.org:18089
For full setup instructions — including how to create the wallet, run your own node, set up a systemd service, Docker deployment, and backup/recovery — see docs/monero-wallet-setup.md.
Next Steps
- API Reference - All available endpoints
- Webhooks - Payment notifications
- Payment Buttons - Embeddable payment links