Files
Archive/retro/DOCKER_README.md

6.5 KiB

Habbo Retro Docker Deployment

This directory contains a complete Docker containerization of the Habbo Retro server setup.

Services Included

  • MySQL Database (Port 3306) - Habbo database with all translations
  • Arcturus Emulator (Ports 30000, 2096) - Game server with 84 plugins
  • Cool UI (Port 5174) - Primary Nitro client
  • Standard Nitro (Port 5173) - Alternative Nitro client
  • Asset Server (Port 8080) - Static assets (images, gamedata, sounds)
  • AtomCMS (Ports 80, 443) - Website and admin panel

Prerequisites

  • Docker Engine 20.10+
  • Docker Compose 2.0+
  • At least 4GB RAM available
  • 10GB free disk space

Quick Start

1. Configure Environment

Copy the example environment file:

cp .env.docker .env

Edit .env and update the following:

  • MYSQL_ROOT_PASSWORD - Set a secure root password
  • MYSQL_PASSWORD - Set a secure user password
  • APP_KEY - Generate Laravel app key (see below)

Generate Laravel app key:

# Option 1: Using existing Laravel installation
cd atomcms && php artisan key:generate --show

# Option 2: Generate manually (base64 encoded 32 character string)
echo "base64:$(openssl rand -base64 32)"

2. Build Containers

Build all Docker images:

docker-compose build

This will take 5-10 minutes on first build.

3. Start Services

Start all services:

docker-compose up -d

Check service status:

docker-compose ps

View logs:

# All services
docker-compose logs -f

# Specific service
docker-compose logs -f emulator
docker-compose logs -f mysql

4. Verify Services

Check each service is running:

MySQL Database:

docker-compose exec mysql mysql -u habbo_user -p -e "SHOW DATABASES;"
# Password: habbo_password_2024 (or your custom password)

Emulator:

# Check emulator logs
docker-compose logs emulator | tail -50

Cool UI:

curl -I http://localhost:5174
# Should return 200 OK

Asset Server:

curl http://localhost:8080/gamedata/UITexts.json | head -20
# Should return JSON data

CMS:

curl -I http://localhost
# Should return 200 OK

Service URLs

Management Commands

Start Services

docker-compose up -d

Stop Services

docker-compose down

Restart a Service

docker-compose restart emulator
docker-compose restart mysql

View Logs

# All services
docker-compose logs -f

# Specific service
docker-compose logs -f emulator
docker-compose logs -f cool-ui

Access Container Shell

# MySQL
docker-compose exec mysql bash

# Emulator
docker-compose exec emulator bash

# CMS
docker-compose exec cms bash

Database Backup

docker-compose exec mysql mysqldump \
  -u habbo_user -p habbo_retro \
  --routines --triggers > backup_$(date +%Y%m%d).sql

Database Restore

docker-compose exec -T mysql mysql -u habbo_user -p habbo_retro < backup.sql

Troubleshooting

MySQL Won't Start

Check if port 3306 is already in use:

lsof -i :3306
# Kill existing MySQL if needed

View MySQL logs:

docker-compose logs mysql

Emulator Can't Connect to Database

  1. Check MySQL is healthy:
docker-compose ps mysql
# Should show "healthy"
  1. Verify database credentials in emulator/config.ini:
db.hostname=mysql  # Must be "mysql" (container name)
db.username=habbo_user
db.password=habbo_password_2024
db.database=habbo_retro
  1. Restart emulator:
docker-compose restart emulator

Cool UI Shows Blank Page

  1. Check asset server is running:
curl http://localhost:8080/gamedata/UITexts.json
  1. Check browser console for errors
  2. Verify CORS is enabled on asset server

CMS Shows 500 Error

  1. Check Laravel logs:
docker-compose exec cms tail -f /var/www/html/storage/logs/laravel.log
  1. Clear cache:
docker-compose exec cms php artisan cache:clear
docker-compose exec cms php artisan config:clear
docker-compose exec cms php artisan view:clear
  1. Check database connection:
docker-compose exec cms php artisan tinker
# Then: DB::connection()->getPdo();

Port Already in Use

If you get "port already in use" errors, edit docker-compose.yml and change the port mappings:

ports:
  - "5175:80"  # Changed from 5174:80

Data Persistence

All important data is stored in Docker volumes:

  • mysql_data - Database data
  • mysql_logs - MySQL logs
  • emulator_logs - Emulator logs
  • cms_storage - CMS uploaded files
  • cms_cache - CMS cache files

To remove all data (⚠️ WARNING: This deletes everything):

docker-compose down -v

Updating

Update a Service

  1. Make changes to the service files
  2. Rebuild the specific service:
docker-compose build emulator
  1. Restart the service:
docker-compose up -d emulator

Update All Services

docker-compose build
docker-compose up -d

Production Deployment

For production deployment:

  1. Change all default passwords in .env
  2. Set APP_DEBUG=false in .env
  3. Generate new APP_KEY for Laravel
  4. Enable SSL/HTTPS for CMS (configure nginx SSL)
  5. Set up automatic backups for MySQL
  6. Configure firewall rules to restrict access
  7. Use Docker secrets for sensitive data
  8. Enable resource limits in docker-compose.yml:
services:
  mysql:
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 2G

Health Monitoring

All services include health checks. View health status:

docker-compose ps

Healthy services show healthy in the status column.

Network Architecture

All services communicate on the habbo-network bridge network:

  • Subnet: 172.20.0.0/16
  • Internal DNS resolution by container name
  • Isolated from host network (except exposed ports)

Support

For issues:

  1. Check logs: docker-compose logs -f [service-name]
  2. Verify health: docker-compose ps
  3. Check resources: docker stats
  4. Review configuration files for typos

Database Information

  • Database: habbo_retro
  • Tables: 174
  • Catalog Items: 51,678 (99.93% English)
  • Catalog Pages: 2,311 (100% English)
  • Size: ~51 MB

The database dump includes all translations completed on December 6, 2025.