A decentralized platform that enables users to rent virtual machines from other users globally, powered by Stellar blockchain payments and ZeroTier networking.
RenVM provides a secure, global marketplace for renting compute resources. Hosts can monetize their hardware, and renters can access VMs anywhere in the world through a simple CLI interface.
graph TB
subgraph "Host Machine"
A[setup-renvm.sh] --> B[Docker Container]
A --> C[ZeroTier Network]
A --> D[monitor-containers.sh]
D --> E[Activity Logs API]
end
subgraph "Backend Services"
F[Express API] --> G[NeonDB Database]
F --> H[JWT Auth]
F --> I[Payment Processing]
end
subgraph "User Interface"
J[CLI Application] --> K[VM Selection]
J --> L[Payment Flow]
K --> F
L --> M[Freighter Wallet]
end
B --> N[ZeroTier IP]
N --> O[Global SSH Access]
M --> P[Stellar Blockchain]
P --> Q[Transaction Verification]
Automated script that prepares a host machine for renting out VMs:
- Detects system specs (CPU, RAM, GPU, OS)
- Installs Docker if needed
- Installs and configures ZeroTier
- Builds and starts VM containers
- Registers host with backend API
- Sets up automatic monitoring
Usage:
./setup-renvm.shContinuous monitoring that tracks container status and logs activity:
- Runs every 15 minutes
- Updates database with container status
- Logs uptime and activity events
- Handles graceful shutdowns
- Automatic database updates
Usage:
# One-time check
./monitor-containers.sh --check
# Continuous monitoring
./monitor-containers.sh --watchRESTful API built with Node.js and Express:
- Authentication: JWT-based user authentication
- VM Management: CRUD operations for virtual machines
- Payment Processing: Stellar blockchain integration
- Activity Logging: Track container uptime and status changes
- Database: PostgreSQL (NeonDB) for persistent storage
API Endpoints:
GET /api/vms # List all available VMs
GET /api/vms/:id # Get VM details
PUT /api/vms/:id/status # Update VM status (monitoring)
GET /api/vms/:id/logs # Get activity logs
POST /api/vms/:id/rent # Rent a VM
POST /api/auth/register # Register new user
POST /api/auth/login # User login
Rust-based command-line interface for renters:
- Browse available VMs
- Select and rent VMs
- Process Stellar payments
- Receive SSH credentials
- Clean, intuitive interface
Features:
- Sorted VM listings by ID
- Prices in USD and XLM
- Payment verification on Stellar testnet
- One-command SSH access
Usage:
./cli.shStellar blockchain payment integration:
- Freighter wallet extension support
- Real-time payment verification
- XLM/USD conversion tracking
- Secure payment processing
React-based web interface:
- Landing page with features
- Pricing information
- User and host dashboards
- Modern, responsive design
-
Clone the repository:
git clone https://github.com/yourusername/vmrentals cd vmrentals -
Run the setup script:
./setup-renvm.sh
-
Enter credentials when prompted:
- Password
-
That's it! Your machine is now listed and available for rent.
-
Install dependencies (if needed):
cd cli cargo build --release -
Run the CLI:
./cli.sh
-
Select a VM and pay:
- Browse available VMs
- Choose rental duration
- Send payment via Freighter
- Receive SSH credentials
sequenceDiagram
participant User
participant CLI
participant Freighter
participant Stellar
participant Backend
User->>CLI: Select VM
CLI->>User: Show payment details
User->>Freighter: Send payment
Freighter->>Stellar: Execute transaction
User->>CLI: Type 'done'
CLI->>Stellar: Verify payment
Stellar->>CLI: Payment confirmed
CLI->>User: Display SSH credentials
users
- Stores host and renter information
- Tracks system specifications
- Manages authentication
vms
- VM hardware specifications
- Current status and pricing
- Ownership and rental information
vm_activity_logs
- Tracks container status changes
- Records uptime
- Event logging for monitoring
vm_rentals
- Rental transactions
- Duration and costs
- Active/inactive status
transactions
- Payment records
- Stellar transaction IDs
- Transaction status
- Container Isolation: Read-only filesystem, non-root user
- Network Security: ZeroTier VPN for encrypted connections
- Payment Verification: Blockchain-based payment validation
- JWT Authentication: Secure API access
- Activity Monitoring: Real-time status tracking
- Network ID:
a09acf0233f929f2 - Global connectivity
- Encrypted VPN tunnels
- Automatic IP assignment
- No port forwarding required
- Node.js 18+
- Rust 1.70+
- Docker
- ZeroTier
- Freighter wallet extension
cd backend
npm install
cp env.example .env
# Edit .env with your DATABASE_URL
npm startcd cli
cargo build --release
cargo run- β Automated Host Setup: Single script to get started
- β Global Connectivity: ZeroTier for worldwide access
- β Real-time Monitoring: 15-minute status updates
- β Blockchain Payments: Stellar network integration
- β Activity Logging: Complete uptime tracking
- β Secure Containers: Read-only filesystem, isolated
- β Clean CLI: Intuitive user interface
- β Auto-Scaling: Dynamic pricing based on specs
Monitor your containers with built-in tracking:
# View logs
tail -f /tmp/renvm-monitor.log
# Check status (Linux)
systemctl status renvm-monitor
# Manual check
./monitor-containers.sh --checkContributions welcome! Please read our contributing guidelines first.
MIT License - see LICENSE file for details
- Stellar Network for blockchain infrastructure
- ZeroTier for global networking
- Docker for containerization
- Freighter for wallet integration
Built with β€οΈ by the RenVM Team