DEV Community

Daniel Ioni
Daniel Ioni

Posted on

🚀 Deploying the MyZubster Ecosystem on a VPS: Gateway, Marketplace, and Monero

🚀 Deploying the MyZubster Ecosystem on a VPS: Gateway, Marketplace, and Monero

How I transformed an idea into a functioning infrastructure for Monero payments and a decentralized marketplace.
🌱 The Vision

MyZubster is an open-source ecosystem for a decentralized marketplace that uses Monero (XMR) as its primary currency to guarantee privacy and security. The architecture consists of three core pillars:

Gateway: Monero payment engine (Node.js + MongoDB)

Marketplace: RESTful API backend for users, orders, and skills (Node.js + SQLite)

Security Bot: Automated scanning with Kali Linux and DeepSeek AI
Enter fullscreen mode Exit fullscreen mode

This post documents my journey deploying the entire system on a VPS, from initial configuration to final validation.
🗺️ Roadmap and Priorities

The goal was to build a robust, scalable infrastructure following these priorities:
Priority Task Status
🔴 High Deploy Gateway with Docker in production ✅ Completed
🔴 High Connect Marketplace to Gateway ✅ Completed
🟡 Medium Update Mobile App with new API URL In Progress
🟡 Medium Deploy NFT template on Tari In Progress
🟢 Low Centralized documentation Planned
🛠️ Technology Stack
Layer Technology Purpose
Languages JavaScript (Node.js), Python (Security Bot), Rust (NFTs) Backend, automation, blockchain
Databases MongoDB (gateway), SQLite (marketplace) Transactional data, user data
Containerization Docker & Docker Compose Reproducible deployments
Blockchain Monero (mainnet), Tari Private payments, NFT assets
Security Kali Linux, nmap, nikto, sqlmap, DeepSeek (Ollama) Vulnerability scanning, AI analysis
🔧 Step 1: Gateway Configuration
1.1 Dockerfile

I created a multi-stage Dockerfile to containerize the gateway for production:
dockerfile

Stage 1: Build dependencies

FROM node:20-slim AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production && npm cache clean --force
COPY . .

Stage 2: Production image

FROM node:20-slim
RUN groupadd -r myzubster && useradd -r -g myzubster myzubster
WORKDIR /app
COPY --from=builder --chown=myzubster:myzubster /app/node_modules ./node_modules
COPY --from=builder --chown=myzubster:myzubster /app ./
EXPOSE 3000
USER myzubster
CMD ["node", "server.js"]

Key decisions:

Multi-stage build reduces final image size

Non-root user for security

Production-only dependencies to minimize attack surface
Enter fullscreen mode Exit fullscreen mode

1.2 docker-compose.yml

To orchestrate all services:
yaml

services:
mongodb:
image: mongo:7-jammy
container_name: myzubster-mongodb
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER:-admin}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD:-securepassword}
MONGO_INITDB_DATABASE: myzubster
volumes:
- mongodb_data:/data/db
ports:
- "27018:27017"
networks:
- myzubster-network
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 30s
timeout: 10s
retries: 5

gateway:
build:
context: .
dockerfile: Dockerfile
container_name: myzubster-gateway
restart: unless-stopped
environment:
- NODE_ENV=${NODE_ENV:-production}
- PORT=${PORT:-3000}
- MONGO_URI=mongodb://${MONGO_USER:-admin}:${MONGO_PASSWORD:-securepassword}@mongodb:27017/myzubster?authSource=admin
- MONERO_RPC_URL=${MONERO_RPC_URL:-http://node.moneroworld.com:18081}
- MONERO_NETWORK=${MONERO_NETWORK:-mainnet}
- JWT_SECRET=${JWT_SECRET}
- API_KEY=${API_KEY}
ports:
- "3001:3000" # Internal 3000 mapped to external 3001
depends_on:
mongodb:
condition: service_healthy
networks:
- myzubster-network
volumes:
- ./public:/app/public
- gateway_logs:/app/logs

volumes:
mongodb_data:
driver: local
gateway_logs:
driver: local

networks:
myzubster-network:
driver: bridge

Why port 3001? I mapped internal port 3000 to external port 3001 to avoid conflicts with other services on the VPS.
1.3 Environment Variables (.env)

Sensitive configuration is stored in a .env file (excluded from Git):
env

Node.js

NODE_ENV=production
PORT=3000

Database

MONGO_USER=admin
MONGO_PASSWORD=your_secure_password

Monero

MONERO_NETWORK=mainnet
MONERO_RPC_URL=http://node.moneroworld.com:18081
MONERO_WALLET_ADDRESS=your_wallet_address
MONERO_WALLET_PASSWORD=your_wallet_password
MONERO_MIN_CONFIRMATIONS=10

JWT Authentication

JWT_SECRET=your_jwt_secret
API_KEY=your_api_key

1.4 Launch the Gateway
bash

cd ~/MyZubsterGateway
docker compose up -d --build
docker compose ps
curl http://localhost:3001/api/health

{"status":"ok","timestamp":"2026-07-25T..."}

🔗 Step 2: Connecting the Marketplace

The marketplace is a separate Node.js application that connects to the gateway for payment processing and order management.
2.1 Marketplace .env Configuration
env

PORT=4000
NODE_ENV=production

Database (SQLite for simplicity)

DB_DIALECT=sqlite
DB_STORAGE=./data/marketplace.sqlite

Gateway Integration

MYZUBSTER_API_URL=http://localhost:3001/api
MYZUBSTER_API_TOKEN=your_api_token

Monero (inherited from gateway)

MONERO_NETWORK=mainnet
MONERO_RPC_URL=http://node.moneroworld.com:18081
MONERO_WALLET_ADDRESS=your_wallet_address
MONERO_WALLET_PASSWORD=your_wallet_password
MONERO_MIN_CONFIRMATIONS=10

JWT

JWT_SECRET=your_jwt_secret
JWT_EXPIRES_IN=7d

2.2 Launch the Marketplace
bash

cd ~/MyZubster-Marketplace
npm install
node server.js &

2.3 Verify Integration
bash

Health check

curl http://localhost:4000/api/health

{"status":"ok","service":"MyZubster-Marketplace","database":"sqlite"}

Gateway status

curl http://localhost:4000/api/gateway/status

{"gateway":{"status":"ok"},"status":"connected"}

Key insight: The marketplace successfully communicates with the gateway via REST API, confirming the integration works.
🛡️ Step 3: Security Bot Integration

I integrated a security bot that performs automated vulnerability scanning and analysis using Kali Linux tools and DeepSeek AI.
3.1 Security Bot Architecture
python

!/usr/bin/env python3

import subprocess
import requests
import json
import logging

logging.basicConfig(filename='/var/log/security_bot.log', level=logging.INFO)

def scan_gateway():
"""Run nmap scan on gateway ports"""
result = subprocess.run(['nmap', '-p', '3001', 'localhost'],
capture_output=True, text=True)
return result.stdout

def ask_deepseek(prompt):
"""Send scan results to DeepSeek for analysis"""
try:
response = requests.post('http://localhost:11434/api/generate',
json={
"model": "deepseek-r1:1.5b",
"prompt": prompt,
"stream": False
},
timeout=30)
return response.json().get('response', '')
except Exception as e:
logging.error(f"DeepSeek error: {e}")
return ""

def block_ip(ip):
"""Block suspicious IP using ufw"""
subprocess.run(['ufw', 'deny', 'from', ip], check=False)

def main():
scan_results = scan_gateway()
analysis = ask_deepseek(
f"Analyze this nmap scan and list security concerns:\n{scan_results}"
)
logging.info(f"Analysis: {analysis}")
# Additional logic for automated responses

if name == "main":
main()

3.2 Automate with Cron
bash

Run every hour

0 * * * * /usr/bin/python3 /root/MyZubsterGateway/security/security_bot.py >> /var/log/security_bot.log 2>&1

📊 Step 4: Admin Dashboard

I built a simple but functional admin dashboard to monitor the ecosystem in real time.
4.1 Dashboard Features

System Health: Real-time status of all services

Database Stats: Collection counts, document totals

Payment Monitoring: Pending/completed transactions

Order Management: Open/completed orders

User Analytics: Total users, activity metrics
Enter fullscreen mode Exit fullscreen mode

4.2 Access the Dashboard
text

http://your-vps-ip:3001/dashboard.html

✅ Final Results

After completing the deployment, all services were operational and communicating:
Service Endpoint Status
Gateway /api/health {"status":"ok"}
Marketplace /api/health {"status":"ok"}
Integration /api/gateway/status "connected"
Database MongoDB + SQLite ✅ Connected
Security Bot Cron job ✅ Running hourly
System Overview
text

┌─────────────────────────────────────────────────────────────┐
│ MyZubster VPS Infrastructure │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────────┐ ┌───────────────┐ ┌──────────────────┐ │
│ │ Gateway │ │ Marketplace │ │ Security Bot │ │
│ │ (Port 3001) │◄─┤ (Port 4000) │ │ (Cron job) │ │
│ │ - MongoDB │ │ - SQLite │ │ - nmap scans │ │
│ │ - Monero RPC │ │ - JWT Auth │ │ - DeepSeek AI │ │
│ └───────────────┘ └───────────────┘ └──────────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Monero Public Node (node.moneroworld.com) │ │
│ └────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘

📚 Repository & Documentation

All code is available on GitHub:

Gateway: DanielIoni-creator/MyZubsterGateway

Marketplace: DanielIoni-creator/MyZubster-Marketplace

Mobile App: DanielIoni-creator/MyZubster-App

NFT Template: DanielIoni-creator/tari-nft-template
Enter fullscreen mode Exit fullscreen mode

💡 Lessons Learned

Docker simplifies deployment – Containerizing the gateway made the process reproducible, scalable, and easier to manage.

Environment variables are critical – Separating configuration from code is essential for security and flexibility.

Monero payment monitoring requires a reliable node – Using node.moneroworld.com as a public node worked well for testing; consider self-hosting for production.

Integration is seamless – The REST API communication between gateway and marketplace works without issues.

Automated security is a long-term investment – The Security Bot with DeepSeek AI reduces response time to potential threats.
Enter fullscreen mode Exit fullscreen mode

🔮 Next Steps

Deploy the Mobile App to Google Play Store

Integrate NFC payments for physical interactions

Implement DAO Governance for community decisions

Complete Security Audit with third-party tools

Add more NFT functionality for real-world asset tokenization
Enter fullscreen mode Exit fullscreen mode

🤝 Contribute

If you're interested in blockchain, privacy-first payments, or decentralized markets, contribute to the repositories on GitHub or open an issue to discuss new features.

Key areas for contribution:

Frontend: Improve the admin dashboard

Testing: Add webhook integration tests

Documentation: Write tutorials for new users

Security: Conduct penetration testing
Enter fullscreen mode Exit fullscreen mode

🌐 Connect with Me

Follow the development of MyZubster and connect on social media:

Blog: DEV.to - Daniel Ioni

X (Twitter): @myzubster

LinkedIn: Daniel Ioni

GitHub: DanielIoni-creator
Enter fullscreen mode Exit fullscreen mode

Built with ❤️ for Monero, Tari, and the open-source community. 🌱

Originally published on DEV.to
📋 Quick Reference: All Commands Used
bash

Deploy Gateway

cd ~/MyZubsterGateway
docker compose up -d --build
docker compose ps

Deploy Marketplace

cd ~/MyZubster-Marketplace
npm install
node server.js &

Verify Integration

curl http://localhost:4000/api/gateway/status

Access Dashboard

http://your-vps-ip:3001/dashboard.html

Top comments (0)