Architecture Components
A complete ArcHive deployment consists of the following components:Backend Application
- Node.js Backend: Hono-based REST API running on Bun runtime
- Background Workers:
- Screenshot Worker: Captures webpage screenshots using Puppeteer
- Tag Worker: Processes automatic tagging for content items
- Process Manager: PM2 for process management and monitoring
Databases
- MongoDB: Primary database for storing users, collections, and content items
- Redis: In-memory cache and job queue for BullMQ workers
Web Server
- Nginx: Reverse proxy handling SSL termination and request routing
- SSL/TLS: Let’s Encrypt certificates for HTTPS
Optional: CloudPanel
CloudPanel is a web-based control panel that simplifies:- Nginx configuration management
- SSL certificate automation
- User and site isolation
- Database management UI
- File management
Server Specifications
Minimum Requirements
- CPU: 1 vCPU Core
- RAM: 4 GB
- Storage: 50 GB SSD/NVMe
- Bandwidth: 2-4 TB
- OS: Ubuntu 22.04 LTS (recommended)
Recommended for Production
- CPU: 2+ vCPU Cores
- RAM: 8 GB
- Storage: 100 GB SSD/NVMe
- Bandwidth: 4+ TB
Deployment Models
Standard VPS Deployment
Deploy all components on a single VPS:- Backend API (port 3000)
- MongoDB (port 27017)
- Redis (port 6379)
- Nginx as reverse proxy
- PM2 managing Node.js processes
CloudPanel Deployment
Use CloudPanel for simplified management:- Automatic Nginx configuration
- One-click SSL certificates
- Site isolation with dedicated users
- Web-based file and database management
Network Architecture
Directory Structure
Typical deployment structure:Security Considerations
Deployment Workflow
The typical deployment process follows these steps:Next Steps
Continue with the deployment process:Prerequisites
System requirements and software installation
Database Setup
Configure MongoDB and Redis
Backend Deployment
Deploy the Node.js backend with PM2
Configuration
Environment variables and settings