Skip to content

Prerequisites

poiromaniax edited this page Sep 11, 2025 · 1 revision

Before starting your TableSlayer self-hosting journey, ensure you have the required system resources and service accounts.

System Requirements

Server Specifications

  • 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

Software Requirements

  • 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)

Installation Commands

# 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 --version

Required Service Accounts

You'll need accounts with the following services. Most offer generous free tiers suitable for small deployments.

1. Turso (Database)

  • 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

2. Cloudflare R2 (File Storage)

  • 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

3. PartyKit (Real-time Features)

  • 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

4. Resend (Email Services)

  • 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

5. Google Cloud Console (OAuth)

  • 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

Domain and DNS Setup

Domain Requirements

  • Primary Domain: yourdomain.com (main application)
  • Files Subdomain: files.yourdomain.com (for R2 storage)

DNS Configuration

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

Security Considerations

SSL/TLS Certificates

  • Recommended: Use Let's Encrypt for free SSL certificates
  • Alternative: Use Cloudflare's SSL proxy

Firewall Configuration

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

Environment Security

  • Never commit .env files to version control
  • Use strong, unique passwords for all services
  • Enable 2FA on all service accounts
  • Regularly rotate API keys and secrets

Preparation Checklist

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

Estimated Costs

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.

Performance Expectations

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

Next Steps

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.