Deployment
Self-Hosting Guide
Deploy your scanlation website on your own server or VPS for full control.
Server Requirements
Minimum
- • 1 vCPU
- • 2GB RAM
- • 20GB SSD
- • Ubuntu 22.04 LTS
Recommended
- • 2+ vCPU
- • 4GB+ RAM
- • 50GB+ SSD
- • Ubuntu 22.04 LTS
Recommended VPS Providers
Pricing Disclaimer
The prices shown below are approximate and may not reflect current pricing. Always check the provider's official website for up-to-date pricing information.
DigitalOcean
From $4/mo
- Simple UI
- Good documentation
- Free credits
Hetzner
From €3.79/mo
- Great value
- European servers
- Fast network
Vultr
From $5/mo
- Global locations
- Hourly billing
- Fast deployment
Installation Steps
- 1
Update system and install dependencies
sudo apt update && sudo apt upgrade -ysudo apt install -y curl git nginx certbot python3-certbot-nginx - 2
Install Node.js 20
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -sudo apt install -y nodejssudo npm install -g pnpm - 3
Install MongoDB
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmorecho "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.listsudo apt update && sudo apt install -y mongodb-orgsudo systemctl start mongod && sudo systemctl enable mongod - 4
Clone and setup the project
cd /var/wwwgit clone https://github.com/YOUR_USERNAME/scanlation-template.gitcd scanlation-templatepnpm installcp .env.example .env.productionnano .env.production # Configure your variables - 5
Build and start the application
pnpm buildpnpm start # or use PM2 for process management
Using PM2 for Process Management
PM2 keeps your application running and restarts it automatically if it crashes:
# Install PM2sudo npm install -g pm2# Start the applicationpm2 start npm --name "scanlation" -- start# Enable startup on bootpm2 startuppm2 saveSSL Certificate Setup
Use Let's Encrypt for free SSL certificates:
# Obtain SSL certificatesudo certbot --nginx -d yourdomain.com -d www.yourdomain.com# Auto-renewal (already configured by certbot)sudo certbot renew --dry-runStorage Considerations
For storing manga images, you have several options:
- Local storage - Simple but limited by disk space
- MinIO - Self-hosted S3-compatible storage (see Storage Setup)
- Cloud storage - AWS S3, Cloudflare R2, or DigitalOcean Spaces
Security Tips
- Enable UFW firewall and only allow ports 22, 80, 443
- Use SSH keys instead of password authentication
- Keep your system and packages updated regularly
- Set up fail2ban to prevent brute force attacks
- Never expose MongoDB to the public internet
- Use strong, unique passwords for all services
- Regular backups of your database and uploads