SkyPanelV2 is an open-source, white-label cloud service billing panel that provides a complete control plane for cloud hosting businesses. It enables service providers to offer VPS hosting services through a unified interface with integrated billing, customer management, and comprehensive administrative tools.
β οΈ Important: This is a standalone billing and management platform, NOT a reseller panel. You must have your own infrastructure provider accounts (Linode, etc.) to use this system.
Unlike traditional reseller panels, SkyPanelV2 gives you complete control over your cloud business:
- White-label branding - Your company, your identity
- Direct infrastructure access - Connect directly to providers like Linode
- Custom pricing models - Set your own rates and margins
- Automated billing - Hourly billing with wallet-based payments
- Multi-tenant architecture - Serve multiple customers from one platform
- Architecture Overview
- Key Features
- Getting Started
- Development Guide
- Deployment
- API Documentation
- Contributing
SkyPanelV2 is a complete billing and management platform for cloud service providers. Think of it as your own "DigitalOcean" or "Linode dashboard" - but white-labeled and controlled by you.
Key Concept: You own the customer relationship, billing, and branding. We provide the platform to manage infrastructure, billing, and customer operations.
How You Make Money:
Your Cost from Provider β Your Markup β Customer Price
Example: $5/month Linode β +$5 Your Margin β $10/month to Customer
Revenue Streams:
- VPS Hosting: Resell cloud infrastructure with your pricing
- Backup Services: Additional revenue from backup configurations
- Wallet Prepayments: Customers preload wallets β better cash flow
- Value-Added Services: SSH access, monitoring, support
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend Layer β
β React 18 + TypeScript + Vite + shadcn/ui + TanStack Query β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Customer β β Admin β β Public β β
β β Portal β β Dashboard β β Pages β β
β β β β β β β β
β β - VPS Mgmt β β - User Mgmt β β - Login β β
β β - Billing β β - System β β - Register β β
β β - Console β β Config β β - Pricing β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HTTP/WebSocket
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Backend API Layer β
β Express.js + TypeScript β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β Auth β β VPS β β Billing β β Admin β β
β β Middlewareβ β Servicesβ β Services β β Routes β β
β β β β β β β β β β
β β - JWT β β - Create β β - Wallet β β - Users β β
β β - RBAC β β - Monitorβ β - Hourly β β - Orgs β β
β β - Rate β β - SSH β β - Invoicesβ β - Plans β β
β β Limit β β Bridge β β β β β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Data & Services Layer β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β PostgreSQL β β WebSocket β β External β β
β β Database β β SSH Bridge β β APIs β β
β β β β β β β β
β β - Users β β - Real-time β β - Linode β β
β β - VPS Inst. β β Terminal β β - PayPal β β
β β - Billing β β - Activity β β - SMTP2GO β β
β β - Wallets β β Streams β β β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β (Your Infrastructure + Payment Providers) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
What it does: Everything your users see and interact with
Key Components:
- Customer Portal: Where users manage their VPS instances, view bills, access console
- Admin Dashboard: Where you manage users, configure system, view analytics
- Public Pages: Login, registration, pricing (can be white-labeled)
How it works:
User Action β React Component β API Call β Show Response
β β β β
Click Button Update State Backend Process Update UI
What it does: Processes requests, enforces rules, talks to external services
Key Services:
- Authentication: Validates users, issues tokens, controls access
- VPS Services: Creates/destroys VPS instances, manages operations
- Billing Services: Calculates costs, processes payments, manages wallets
- Admin Services: User management, system configuration, reporting
How it works:
API Request β Middleware β Route Handler β Service Layer β Response
β β β β β
User Action Validate Execute Business Logic Return Data
Auth/Rules Endpoint + Database
What it does: Stores data and connects to external services
Key Components:
- PostgreSQL Database: All persistent data (users, VPS instances, billing)
- External APIs: Linode (VPS infrastructure), PayPal (payments), SMTP (email)
- WebSocket Bridge: Real-time SSH terminal access to VPS instances
How it works:
Service Layer β Database Query β PostgreSQL β Return Results
β β β β
Need Data SQL Query + Execute Process &
Parameters Query Return
Step 1: Registration
βββββββββββββββββββββ
User β Sign Up Form β POST /api/auth/register
β
Create User Record
β
Generate JWT Token
β
Send Welcome Email
β
Return Token + User Data
Step 2: Add Funds to Wallet
ββββββββββββββββββββββββββββ
User β Add Funds β PayPal Payment β POST /api/payments/create
β
Create PayPal Order
β
User Completes Payment
β
PayPal Webhook Confirmation
β
Update Wallet Balance
β
Send Confirmation Email
Step 3: Create VPS Instance
βββββββββββββββββββββββββββ
User β Select Plan β POST /api/vps/instances
β
Validate Wallet Balance
β
Call Linode API
β
Create VPS Instance
β
Save Instance Record
β
Setup SSH Bridge
β
Start Hourly Billing
β
Send Provisioning Email
Every Hour:
βββββββββββ
Cron Job β Active VPS Instances β Calculate Hourly Cost
β β
For Each Instance Plan Hourly Rate
β β
Deduct from Wallet Γ Hours Since Last Billing
β β
Create Transaction Record
β
Update Instance Last Billing
β
Check Low Balance β Send Warning if Needed
β
Generate Invoice (if billing period complete)
User β Open Console β WebSocket Connection
β
Authenticate User + Instance
β
Establish SSH Connection to VPS
β
Bridge WebSocket β SSH
β
Real-time Terminal in Browser
β
Handle Terminal Resize, Copy/Paste
β
Clean up Connection on Close
Admin β User Management β GET /api/admin/users
β
Fetch Users with Pagination
β
Display in Data Table
β
Admin β Click User β GET /api/admin/users/:id
β
Fetch User Details + Resources
β
Show Impact Analysis (VPS, Billing, Orgs)
β
Admin β Edit User β PUT /api/admin/users/:id
β
Validate Changes
β
Update User Record
β
Audit Log Entry
β
Send Notification (if applicable)
API Routes β Services β Database
β β β
Thin Business Logic Data Access
Layer & Rules & Queries
Benefits: Reusable logic, easy testing, clear separation
Service β Repository β Database
β β β
Business Data Access SQL Queries
Logic Abstraction & Connection
Benefits: Database abstraction, easier migration, testable
Database Event β PostgreSQL LISTEN/NOTIFY β Server-Sent Events β Client Update
Benefits: Real-time UI updates, efficient, scalable
Request β Auth Middleware β Rate Limit β Validation β Route Handler β Response
Benefits: Reusable request processing, security, validation
- React 18 - Modern component-based UI framework
- TypeScript - Type-safe development
- Vite - Lightning-fast build tool and dev server
- TanStack Query - Powerful server state management
- Zustand - Lightweight client state management
- React Router v7 - Client-side routing with protection
- shadcn/ui - Beautiful, accessible component library
- Tailwind CSS - Utility-first styling
- React Hook Form + Zod - Form handling and validation
- Node.js 20+ - JavaScript runtime
- Express.js - Fast, minimalist web framework
- TypeScript - End-to-end type safety
- PostgreSQL - Robust relational database
- JWT - Secure authentication
- WebSocket - Real-time SSH terminal access
- SSH2 - SSH protocol implementation
- Linode/Akamai API - VPS infrastructure management
- PayPal REST SDK - Payment processing
- SMTP2GO - Email notifications
- PostgreSQL LISTEN/NOTIFY - Real-time database events
- Provider Integration: Direct Linode/Akamai API integration with normalized operations
- SSH Console Access: Browser-based terminal with WebSocket bridge for real-time VPS access
- Automated Provisioning: One-click VPS deployment with configurable specifications
- Backup Management: Flexible backup options (daily/weekly/none) with custom pricing
- Real-time Monitoring: Live status updates and resource usage tracking
- Plan Management: Customizable VPS plans with provider-specific configurations
- Wallet System: Prepaid wallet with automatic balance deduction
- Hourly Billing: Automated hourly billing with detailed usage tracking
- PayPal Integration: Seamless payment processing with PayPal REST API
- Invoice Generation: Automatic invoice creation with PDF downloads
- Payment History: Complete transaction history with detailed breakdowns
- Usage Analytics: Resource usage monitoring and cost analysis
- Multi-tenant Architecture: Organization-based data separation and access control
- Role-based Permissions: Admin, owner, and member roles with granular permissions
- Advanced User Management: Comprehensive admin interface with enhanced error handling
- Organization Workflows: Complete CRUD operations with validation and safety checks
- Member Management: Add, edit, and remove organization members with role controls
- Impersonation: Admin capability to impersonate users for support
- JWT Authentication: Secure token-based authentication with configurable expiration
- Rate Limiting: Tiered API rate limits (anonymous/authenticated/admin)
- Password Security: Bcrypt hashing with secure reset workflows
- Access Control: Role-based access control throughout the application
- Audit Logging: Comprehensive activity tracking for security and compliance
- Complete Customization: Environment-driven branding configuration
- Theme System: Multiple theme presets with custom color schemes
- Provider Abstraction: Hide upstream provider names from end users
- Custom Domain Support: Full white-label experience for your brand
- Live Notifications: PostgreSQL LISTEN/NOTIFY with Server-Sent Events
- SSH Terminal: Real-time terminal access with WebSocket bridge
- Activity Feeds: Live activity streams for all system events
- Status Updates: Real-time VPS status and resource monitoring
- Dashboard: System overview with key metrics and quick actions
- User Management: Enhanced user CRUD with resource impact analysis
- Organization Management: Advanced modal-based UI with comprehensive validation
- Provider Configuration: Multi-provider setup with API token management
- Platform Settings: System configuration, themes, and branding options
- Support System: Ticket management and customer support tools
- FAQ Management: Help documentation and knowledge base
- Responsive Design: Mobile-first approach with adaptive layouts
- Accessibility: ARIA-compliant components with keyboard navigation
- Dark/Light Themes: Multiple theme presets with system preference detection
- Modal-based Interactions: Enhanced dialogs with proper validation feedback
- Drag & Drop: Intuitive interfaces for configuration management
- Loading States: Proper loading indicators and error handling
- TypeScript: End-to-end type safety across frontend and backend
- Hot Reload: Fast development with Vite HMR and Nodemon
- API Documentation: Comprehensive API reference with examples
- Testing Suite: Vitest, React Testing Library, and Supertest
- Code Quality: ESLint, TypeScript strict mode, and automated formatting
- Database Migrations: Versioned schema management with rollback support
- Scenario: You manage IT infrastructure for small businesses
- Use Case: Offer branded VPS hosting services to your clients
- Benefit: Additional revenue stream, better client retention
- Scenario: You build websites and need hosting for clients
- Use Case: Provide managed hosting as part of your service packages
- Benefit: Complete control over client environments, recurring revenue
- Scenario: You provide comprehensive IT services
- Use Case: Bundle VPS hosting with your existing services
- Benefit: One platform for all client services, simplified billing
- Scenario: You want to start a hosting business
- Use Case: Launch your own branded hosting service
- Benefit: No infrastructure costs, focus on sales and support
- Scenario: You need hosting for your application clients
- Use Case: Offer hosting as part of your platform
- Benefit: Additional revenue, better customer experience
Before SkyPanelV2:
- Client asks for hosting β You buy VPS from Linode β Client pays you manually
- No proper billing, no dashboard, manual everything
After SkyPanelV2:
- Client signs up on your branded portal
- Client selects plan and pays via PayPal
- VPS automatically provisioned
- Hourly billing deducts from wallet
- Client manages their own VPS
- You focus on support, not administration
New Website Project:
1. Create client organization in admin panel
2. Add client team members with appropriate roles
3. Create VPS instance for staging environment
4. Client tests staging site
5. Create production VPS instance
6. Client funds wallet for monthly billing
7. Automated billing handles everything
8. Client has self-service portal
Growth Phases:
Phase 1 (Startup):
- 10-20 clients
- Manual onboarding
- Basic VPS plans
- PayPal payments only
Phase 2 (Growth):
- 50-100 clients
- Automated onboarding
- Multiple plan tiers
- Advanced billing features
- Client self-service
Phase 3 (Scale):
- 100+ clients
- Multiple payment gateways
- Advanced features
- White-label mobile app
- API integrations
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client State (Zustand) β
β - User authentication status β
β - Theme preferences β
β - UI states (modals, sidebars) β
β - Temporary form data β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Server State (TanStack Query) β
β - VPS instances and status β
β - Wallet balance and transactions β
β - User profiles and organizations β
β - System configuration and settings β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Backend API β
β - Express.js routes β
β - Service layer business logic β
β - Database queries β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PostgreSQL Database β
β - Persistent data storage β
β - ACID transactions β
β - Real-time events (LISTEN/NOTIFY) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Database Change β PostgreSQL NOTIFY β Server-Sent Events β Client Update
β β β β
User Creates VPS Trigger fires SSE sends event UI updates
Record Notification to connected automatically
to channel clients
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Authentication Flow β
β β
β 1. User Login β POST /api/auth/login β
β 2. Validate credentials β Users table β
β 3. Generate JWT token β Contains user ID, role, org ID β
β 4. Return token to client β
β 5. Client stores token β localStorage/cookie β
β 6. All subsequent requests β Include JWT in headers β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Authorization Flow β
β β
β Protected Request β JWT Middleware β Extract User Context β
β β β
β Role-Based Access Control β
β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Role Permissions: β β
β β - Admin: Full system access β β
β β - Owner: Organization management β β
β β - Member: Limited access within organization β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β Allow/Deny Request β 403 if unauthorized β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Tiered Rate Limiting β
β β
β Anonymous Users: 200 requests / 15 minutes β
β Authenticated: 500 requests / 15 minutes β
β Admin Users: 1000 requests / 15 minutes β
β β
β Implementation: β
β - Redis-backed counters (in production) β
β - IP-based identification for anonymous β
β - User-based for authenticated β
β - Sliding window algorithm β
β - Custom limits per endpoint type β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Encryption Layers β
β β
β 1. Data at Rest: β
β - SSH credentials: AES-256 encryption β
β - API tokens: AES-256 encryption β
β - Environment variables: Encrypted storage β
β β
β 2. Data in Transit: β
β - HTTPS/TLS for all communications β
β - WebSocket over secure connection (WSS) β
β - Database connection over SSL β
β β
β 3. Authentication: β
β - Passwords: Bcrypt hashing β
β - JWT tokens: Signed with secret key β
β - Session management: Secure cookies β
β β
β 4. Audit Trail: β
β - All admin actions logged β
β - User activity tracking β
β - Failed authentication attempts β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
skypanelv2/
βββ api/ # Backend API (Express.js)
β βββ routes/ # API route definitions
β β βββ admin/ # Admin-only endpoints
β β βββ auth.ts # Authentication routes
β β βββ vps.ts # VPS management
β β βββ payments.ts # Payment processing
β β βββ ...
β βββ services/ # Business logic layer
β β βββ vpsService.ts # VPS operations
β β βββ billingService.ts # Billing logic
β β βββ emailService.ts # Email notifications
β β βββ ...
β βββ middleware/ # Express middleware
β β βββ auth.ts # JWT authentication
β β βββ rateLimiting.ts # API rate limiting
β β βββ security.ts # Security headers
β βββ lib/ # Utility libraries
β β βββ database.ts # Database helper
β β βββ crypto.ts # Encryption utilities
β β βββ validation.ts # Input validation
β βββ server.ts # Server entry point
βββ src/ # Frontend (React)
β βββ components/ # React components
β β βββ ui/ # shadcn/ui base components
β β βββ admin/ # Admin-specific components
β β βββ layouts/ # Layout components
β β βββ ...
β βββ pages/ # Page components
β βββ contexts/ # React contexts (Auth, Theme)
β βββ services/ # API client services
β βββ lib/ # Frontend utilities
β β βββ api.ts # API client
β β βββ validation.ts # Form validation schemas
β β βββ ...
β βββ main.tsx # React entry point
βββ migrations/ # Database migrations
β βββ 001_initial_schema.sql
β βββ 002_*.sql
β βββ ...
βββ scripts/ # Utility scripts
β βββ generate-ssh-secret.js # Generate encryption keys
β βββ run-migration.js # Apply migrations
β βββ create-test-admin.js # Create admin users
β βββ test-smtp.js # Test email configuration
βββ public/ # Static assets
βββ package.json # Dependencies and scripts
Before you begin, ensure you have the following installed:
You'll need accounts with:
- Linode/Akamai - For VPS infrastructure (get API token from account settings)
- PayPal - For payment processing (create REST API credentials in developer dashboard)
- SMTP2GO (optional) - For email notifications
# Clone the repository
git clone https://github.com/skyvps360/skypanelv2.git
cd skypanelv2
# Install dependencies
npm install# Copy environment template
cp .env.example .env
# Generate encryption secret
node scripts/generate-ssh-secret.jsEdit .env and configure these essential variables:
# Database
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/skypanelv2
# Security
JWT_SECRET=your-super-secret-jwt-key-min-32-chars
SSH_CRED_SECRET=generated-by-script-above
ENCRYPTION_KEY=your-32-character-encryption-key
# PayPal (get from PayPal Developer Dashboard)
PAYPAL_CLIENT_ID=your-paypal-client-id
PAYPAL_CLIENT_SECRET=your-paypal-client-secret
PAYPAL_MODE=sandbox
# Linode (get from Linode Account Settings)
LINODE_API_TOKEN=your-linode-api-token
# Branding (optional)
VITE_COMPANY_NAME=Your Company Name
COMPANY_NAME=Your Company Name# Reset database and apply migrations
npm run db:fresh
# Create admin user
npm run seed:adminDefault Admin Credentials:
- Email:
admin@skypanelv2.com - Password:
admin123 β οΈ Change these immediately in production!
# Start both frontend and backend
npm run devThis starts:
- Frontend: http://localhost:5173 (Vite dev server with hot reload)
- Backend: http://localhost:3001 (Express API with auto-restart)
- Open http://localhost:5173 in your browser
- Login with admin credentials
- Configure your Linode provider in Admin β Providers
- Create VPS plans in Admin β VPS Plans
- Start creating VPS instances!
PostgreSQL Setup:
# Create database
createdb skypanelv2
# Test connection
node scripts/test-connection.jsApply Migrations:
# Apply all pending migrations
node scripts/run-migration.js
# Or use npm script
npm run db:fresh- Go to PayPal Developer Dashboard
- Create a new REST API app
- Copy Client ID and Secret to
.env - Set
PAYPAL_MODE=sandboxfor testing,livefor production - Configure webhook URL:
https://your-domain.com/api/payments/webhook
- Go to Linode Account Settings
- Create a personal access token with these permissions:
- Read/Write access to Linodes
- Read access to Account, Networking, and Support
- Add token to
.envasLINODE_API_TOKEN
# SMTP2GO Configuration
SMTP2GO_API_KEY=your-api-key
SMTP2GO_USERNAME=your-username
SMTP2GO_PASSWORD=your-password
# Test email configuration
node scripts/test-smtp.js# Start both frontend and backend (recommended)
npm run dev
# Or start individually
npm run client:dev # Frontend only on port 5173
npm run server:dev # Backend only on port 3001What happens when you run npm run dev:
- Vite dev server starts with hot module replacement
- Express API server starts with auto-restart on file changes
- Both servers watch for changes and reload automatically
# Reset database completely (with confirmation)
npm run db:reset
# Reset without confirmation prompt
npm run db:reset:confirm
# Fresh start: reset + apply all migrations
npm run db:fresh
# Create admin user
npm run seed:admin# Run all tests once
npm run test
# Run tests in watch mode (during development)
npm run test:watch
# Type checking only
npm run check
# Lint code
npm run lint# Production build with TypeScript check
npm run build
# Preview production build locally
npm run previewFrontend Development:
- Use React DevTools for component debugging
- Check Network tab for API calls and responses
- TanStack Query DevTools for server state inspection
- Browser console for client-side errors
Backend Development:
- Use
console.logfor debugging (removed in production) - Check API responses in Postman or curl
- Monitor database queries during development
- Test API endpoints with proper authentication
Database Development:
- Always use parameterized queries (no SQL injection)
- Test migrations in development before production
- Use transactions for multi-step operations
- Backup database before major changes
Adding a New API Endpoint:
- Create route in
api/routes/ - Add business logic in
api/services/ - Add authentication middleware if needed
- Update API documentation
Adding a New Frontend Page:
- Create page component in
src/pages/ - Add route in
src/App.tsx - Add navigation link if needed
- Test authentication/authorization
Database Schema Changes:
- Create new migration file in
migrations/ - Write SQL for schema changes
- Test migration in development
- Update TypeScript types if needed
Adding Environment Variables:
- Add to
.env.examplewith documentation - Add to
.envwith your values - Reference in code via
process.env.VAR_NAME - Document in
repo-docs/ENVIRONMENT_VARIABLES.md
Database Scripts:
node scripts/test-connection.js # Test database connection
node scripts/run-migration.js # Apply pending migrations
node scripts/generate-ssh-secret.js # Generate encryption keysAdmin Scripts:
node scripts/create-test-admin.js # Create admin user
node scripts/promote-to-admin.js # Promote user to admin
node scripts/update-admin-password.js # Change admin passwordTesting Scripts:
node scripts/test-hourly-billing.js # Test billing workflow
node scripts/test-smtp.js # Test email configurationWhere to put things:
- UI Components:
src/components/ - Page Components:
src/pages/ - API Routes:
api/routes/ - Business Logic:
api/services/ - Shared Types: Create shared types file
- Utility Functions:
src/lib/orapi/lib/ - Database Queries:
api/services/orapi/lib/
Naming Conventions:
- Components: PascalCase (
UserProfile.tsx) - Utilities: camelCase (
formatCurrency.ts) - Services: camelCase with Service suffix (
vpsService.ts) - API Routes: kebab-case (
/vps-instances)
Before deploying to production, ensure you've completed these steps:
- Strong JWT Secret - Use a 32+ character random string
- Secure Database Password - Don't use default passwords
- HTTPS/SSL - Configure valid TLS certificate
- PayPal Live Credentials - Switch from sandbox to production
- Environment Variables - Set
NODE_ENV=production - Rate Limiting - Configure appropriate limits for your traffic
- Database Backups - Set up automated backups
- Provider API Tokens - Use production tokens with proper permissions
- Email Service - Configure production SMTP credentials
- Domain Configuration - Set
CLIENT_URLto your production domain - CORS Settings - Configure allowed origins
- Trust Proxy - Set
TRUST_PROXY=1behind reverse proxy
- Test Payment Flow - Verify PayPal integration works
- Test VPS Creation - Ensure provider integration works
- Test Email Delivery - Verify notifications are sent
- Test Admin Panel - Check all admin functionality
- Load Testing - Test with expected user load
Prerequisites:
- VPS with Ubuntu 20.04+ or similar
- Node.js 20+ and PostgreSQL 12+
- Domain name with DNS configured
Steps:
- Clone and Setup:
# Clone repository
git clone https://github.com/skyvps360/skypanelv2.git
cd skypanelv2
# Install dependencies
npm install
# Build production assets
npm run build- Configure Environment:
# Copy and edit environment file
cp .env.example .env
nano .env
# Set production values
NODE_ENV=production
CLIENT_URL=https://your-domain.com- Setup Database:
# Apply migrations
npm run db:fresh
# Create admin user
npm run seed:admin- Start with PM2:
# Install PM2 globally
npm install -g pm2
# Start application
npm run pm2:start
# Monitor processes
pm2 monit
pm2 logs skypanelv2- Configure SSL with Caddy:
# Setup Caddy reverse proxy
sudo bash scripts/setup-caddy-ssl.sh \
--domain panel.yourdomain.com \
--email admin@yourdomain.com \
--install-caddy# Dockerfile example
FROM node:20-alpine
WORKDIR /app
# Install dependencies
COPY package*.json ./
RUN npm ci --only=production
# Build application
COPY . .
RUN npm run build
# Expose ports
EXPOSE 3001 5173
# Start application
CMD ["npm", "start"]# Build and run
docker build -t skypanelv2 .
docker run -p 3001:3001 -p 5173:5173 --env-file .env skypanelv2Vercel (Frontend) + Separate Backend:
# Deploy frontend to Vercel
vercel --prod
# Deploy backend to your preferred VPS providerDigitalOcean App Platform:
- Connect your GitHub repository
- Configure build settings
- Set environment variables
- Deploy
Health Checks:
# Check application health
curl https://your-domain.com/api/health
# Check PM2 status
pm2 list
pm2 logsDatabase Backups:
# Manual backup
pg_dump skypanelv2 > backup_$(date +%Y%m%d).sql
# Automated backup (add to crontab)
0 2 * * * pg_dump skypanelv2 > /backups/db_$(date +\%Y\%m\%d).sqlLog Management:
# View logs
pm2 logs skypanelv2
# Clear logs
pm2 flush
# Log rotation (configure in PM2 ecosystem)Updates:
# Pull latest changes
git pull origin main
# Install new dependencies
npm install
# Rebuild
npm run build
# Restart PM2
npm run pm2:reloadApplication Won't Start:
- Check environment variables are set correctly
- Verify database connection is accessible
- Check ports are not already in use
- Review PM2 logs:
pm2 logs
Database Connection Issues:
- Verify PostgreSQL is running
- Check database credentials in
.env - Ensure database exists and migrations are applied
- Test connection:
node scripts/test-connection.js
Payment Processing Issues:
- Verify PayPal credentials are correct for production
- Check webhook URLs are accessible
- Ensure IPN/ webhook notifications are reaching your server
- Test PayPal connection in provider settings
VPS Provisioning Issues:
- Verify Linode API token has correct permissions
- Check provider configuration in admin panel
- Test API connection in provider settings
- Review Linode account limits and quotas
Performance Issues:
- Check database query performance
- Verify rate limiting is configured properly
- Monitor resource usage with PM2
- Consider upgrading server resources
Core API References:
- API Reference - Complete API endpoint documentation
- Admin API - Administrative operations and endpoints
- Authentication - Authentication and authorization flow
Feature Documentation:
- Organization Management - Organization CRUD operations
- Member Management - Organization member operations
- User Management - User account management
- User Search - User search and filtering
- VPS Management - Multi-provider VPS operations
- Backup Pricing - Backup configuration API
- Environment Variables - Complete configuration reference
- SSL Setup - HTTPS configuration with Caddy
- Development Setup - Development environment and coding guidelines
- Database Schema - Database structure and relationships
- Service Architecture - Backend service layer patterns
- Frontend Patterns - Frontend architecture and patterns
- Agent Instructions - Guidelines for AI agents working on this codebase
- GitHub Copilot Instructions - Copilot configuration
SkyPanelV2 includes comprehensive testing at multiple levels:
Unit Tests:
- Component logic and utilities
- Validation schemas and rules
- Service layer business logic
- API endpoint testing
Integration Tests:
- Database operations and migrations
- API authentication and authorization
- Payment processing workflows
- VPS provisioning operations
Component Tests:
- UI component behavior and interactions
- Form validation and error handling
- User workflows and navigation
- Accessibility testing
# Run all tests once
npm run test
# Run tests in watch mode (development)
npm run test:watch
# Run specific test file
npm test -- vps.test.ts
# Run tests with coverage
npm test -- --coveragetests/
βββ unit/ # Unit tests
β βββ components/ # Component logic tests
β βββ services/ # Service layer tests
β βββ utils/ # Utility function tests
βββ integration/ # Integration tests
β βββ api/ # API endpoint tests
β βββ database/ # Database operation tests
βββ e2e/ # End-to-end tests
βββ scenarios/ # User workflow tests
# Type checking
npm run check
# Linting
npm run lint
# Fix linting issues
npm run lint -- --fix
# Build verification
npm run buildWe welcome contributions from the community! Here's how you can help:
-
Fork the Repository
# Fork on GitHub and clone your fork git clone https://github.com/your-username/skypanelv2.git cd skypanelv2
-
Set Up Development Environment
# Install dependencies npm install # Setup environment cp .env.example .env # Configure your .env file # Setup database npm run db:fresh npm run seed:admin
-
Create Your Feature Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Write clean, documented code
- Follow existing code patterns
- Add tests for new functionality
- Update documentation as needed
-
Test Your Changes
# Run tests npm run test # Type checking npm run check # Linting npm run lint
-
Commit Your Changes
git add . git commit -m "feat: add your feature description"
-
Push and Create Pull Request
git push origin feature/your-feature-name # Create PR on GitHub
Code Style:
- Follow TypeScript best practices
- Use meaningful variable and function names
- Add comments for complex logic
- Maintain consistent formatting
Testing:
- Write tests for new features
- Ensure all tests pass before submitting
- Test across different browsers and devices
- Verify accessibility compliance
Documentation:
- Update README for user-facing changes
- Add API documentation for new endpoints
- Document complex business logic
- Update configuration guides
Pull Request Best Practices:
- Provide clear description of changes
- Link related issues
- Include screenshots for UI changes
- Ensure CI/CD checks pass
High Priority:
- Additional cloud provider integrations (DigitalOcean, AWS, etc.)
- Enhanced monitoring and analytics
- Performance optimization
- Security enhancements
- Documentation improvements
Medium Priority:
- Additional payment gateways (Stripe, etc.)
- Enhanced reporting and dashboards
- Mobile app development
- API integrations and webhooks
- Automation features
Low Priority:
- UI/UX improvements
- Accessibility enhancements
- Translation and internationalization
- Community plugins and extensions
This project is licensed under the MIT License - see the LICENSE file for details.
Documentation:
- Check the API Documentation
- Review Configuration Guides
- Search existing GitHub Issues
Community:
- Open an issue on GitHub
- Join our discussions
- Check existing issues and PRs
Professional Support:
- Contact us for enterprise support
- Custom development services
- Integration assistance
Built by skyvps360 for the open-source community.
Special Thanks To:
- All contributors who have helped make SkyPanelV2 better
- The open-source community for amazing tools and libraries
- Early adopters who provide valuable feedback
- Cloud providers who make VPS hosting accessible
Built With:
- React and the amazing React community
- The Vite team for the incredible build tool
- shadcn for the beautiful component library
- TanStack for the powerful state management
- All other open-source maintainers and contributors
- Website: [Your website]
- Email: [Your email]
- GitHub: skyvps360/skypanelv2
- Issues: GitHub Issues
β Star us on GitHub if you find this project helpful!
Made with β€οΈ by the SkyPanelV2 team
If you find this project useful, consider supporting its development:
Your support helps us:
- Maintain and improve the project
- Add new features and integrations
- Provide better documentation
- Support the community
Thank you for your support! π
