-
Notifications
You must be signed in to change notification settings - Fork 0
Prerequisites
Before starting your TableSlayer self-hosting journey, ensure you have the required system resources and service accounts.
- Operating System: Linux (Ubuntu 20.04+ recommended)
- CPU: 2+ cores
- Memory: 4GB+ RAM (8GB recommended for production)
- Storage: 20GB+ available disk space
- Network: Stable internet connection with public IP
- Docker: Version 20.10+
- Docker Compose: Version 2.0+
- Git: For repository management
- Domain: Your own domain with DNS control
- SSL Certificate: For HTTPS (Let's Encrypt recommended)
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Verify installations
docker --version
docker-compose --versionYou'll need accounts with the following services. Most offer generous free tiers suitable for small deployments.
- Purpose: SQLite-compatible database hosting
- Free Tier: Up to 500 databases, 1GB total storage
- Sign Up: turso.tech
- What You'll Need: Database URL and authentication token
- Purpose: S3-compatible object storage for images and assets
- Free Tier: 10GB storage, 1M Class A operations monthly
- Sign Up: cloudflare.com
- What You'll Need: Bucket name, access keys, custom domain
- Purpose: WebSocket server for real-time collaboration
- Free Tier: 100,000 messages monthly
- Sign Up: partykit.io
- What You'll Need: Deployed PartyKit server URL
- Purpose: Transactional emails (signup, password reset)
- Free Tier: 100 emails daily, 3,000 monthly
- Sign Up: resend.com
- What You'll Need: API key and verified domain
- Purpose: Google login integration
- Free Tier: OAuth is free to use
- Sign Up: console.cloud.google.com
- What You'll Need: OAuth client ID and secret
-
Primary Domain:
yourdomain.com(main application) -
Files Subdomain:
files.yourdomain.com(for R2 storage)
You'll need to configure these DNS records:
# Main application
A yourdomain.com → Your server IP
AAAA yourdomain.com → Your server IPv6 (optional)
# File storage (will be configured with Cloudflare R2)
CNAME files.yourdomain.com → your-bucket.r2.cloudflarestorage.com
- Recommended: Use Let's Encrypt for free SSL certificates
- Alternative: Use Cloudflare's SSL proxy
Open these ports on your server:
# HTTP/HTTPS
sudo ufw allow 80
sudo ufw allow 443
# SSH (change default port for security)
sudo ufw allow 22
# Docker internal communication
sudo ufw allow 3000 # Only if not using reverse proxy- Never commit
.envfiles to version control - Use strong, unique passwords for all services
- Enable 2FA on all service accounts
- Regularly rotate API keys and secrets
Before proceeding to service setup, ensure you have:
- Server Access: SSH access to your Linux server
- Domain Control: Ability to modify DNS records
- Docker Installed: Docker and Docker Compose working
- Service Accounts: All 5 required service accounts created
- SSL Plan: Method for obtaining SSL certificates
- Backup Strategy: Plan for database and file backups
Here's what you can expect for monthly costs:
| Service | Free Tier | Paid Upgrade |
|---|---|---|
| Server | N/A | $5-20/month (VPS) |
| Turso | Free (up to 500 DBs) | $29/month (pro) |
| Cloudflare R2 | 10GB free | $0.015/GB after |
| PartyKit | 100k msgs free | $20/month (pro) |
| Resend | 100 emails/day | $20/month (pro) |
| Google OAuth | Free | Free |
| Domain | N/A | $10-15/year |
Total: Free tier can support small deployments. Expect $10-50/month for production use.
With the recommended setup:
- Response Time: < 200ms for most operations
- Concurrent Users: 10-50 simultaneous players
- Storage: Handles 1000s of uploaded maps/tokens
- Real-time Sync: Sub-100ms latency for collaborative features
Once you have all prerequisites in place, proceed to Service Setup to configure each external service.
💡 Tip: Set up all service accounts first, then come back to configure them. This prevents context switching during the technical setup phase.