PLAY.REN.BD
LibraryPricingDocs

PLAY.REN.BD

Play premium games in your browser

Product

  • Library
  • Pricing
  • Changelog
  • Status

Resources

  • Documentation
  • Blog
  • About
  • Contact

Legal

  • Terms
  • Privacy
  • Acceptable Use
  • Cookies
  • DMCA
© 2026 PLAY.REN.BD
OverviewPrerequisitesInstallationConfigurationMonitoring
DocsServer GuideInstallation

Server Installation

This guide walks you through setting up a new PlayRen game server from a fresh Ubuntu installation.

Prerequisites

Before starting, make sure your server meets the prerequisites. You'll need:

  • A fresh Ubuntu 22.04+ server with root access.
  • A DNS record pointing a hostname to the server (e.g., gs01.play.ren.bd).
  • SSH access to the server.

Step 1: Download the Setup Script

SSH into your server and download the game server setup script:

ssh root@gs01.play.ren.bd
 
# Download the setup script
curl -O https://play.ren.bd/deploy/setup-game-server.sh
chmod +x setup-game-server.sh

Step 2: Run the Setup Script

Execute the script with the required parameters:

./setup-game-server.sh \
  --hostname gs01.play.ren.bd \
  --platform-url https://play.ren.bd \
  --agent-secret your-agent-secret-here

What the Script Does

The setup script automates the entire installation:

  1. System updates — runs apt update && apt upgrade.
  2. Docker installation — installs Docker Engine and configures the Docker daemon.
  3. Docker image — pulls or builds the xgame9-cloud:latest container image.
  4. Python environment — installs Python 3.10+, creates a virtual environment, and installs pool agent dependencies.
  5. Pool agent deployment — copies the agent code to /home/play.ren.bd/pool-agent/ and configures it.
  6. Systemd service — creates and enables the xgame9-agent service for automatic startup.
  7. Nginx configuration — sets up a reverse proxy for the pool agent API.
  8. SSL certificates — runs Certbot to provision Let's Encrypt certificates for your hostname.
  9. Firewall — configures ufw to allow SSH, HTTP, HTTPS, and WebRTC UDP ports.
  10. Directories — creates game cache and temporary directories.

The script takes approximately 5-10 minutes to complete.

Step 3: Verify the Agent

After the script completes, verify that the pool agent is running:

# Check systemd service status
systemctl status xgame9-agent
 
# Test the health endpoint
curl https://gs01.play.ren.bd/api/health

The health endpoint should return:

{
  "status": "ok",
  "containers": 0,
  "cpu_percent": 5.2,
  "memory_percent": 12.8,
  "disk_percent": 15.0
}

Step 4: Register the Server

Add the server to PlayRen's database so the scheduler can assign sessions to it. This is done through the admin panel:

  1. Log in to the PlayRen admin panel at https://play.ren.bd/admin.
  2. Navigate to Servers.
  3. Click Add Server.
  4. Enter:
    • Name: A friendly identifier (e.g., "Game Server 01").
    • Hostname: The server's hostname (e.g., gs01.play.ren.bd).
    • Agent URL: https://gs01.play.ren.bd (the Nginx-proxied agent endpoint).
    • Agent Secret: The same secret you used in the setup script.
    • Max containers: The recommended concurrent session limit for this server.
  5. Click Save.

The server is now live and will start receiving game sessions.

Step 5: Test a Launch

To verify everything works end-to-end:

  1. Go to the PlayRen website and launch a game.
  2. Check if the session is assigned to your new server (visible in the admin session list).
  3. Verify the game streams correctly in the browser.

Troubleshooting

  • Agent won't start — check logs with journalctl -u xgame9-agent -f.
  • SSL fails — ensure DNS is properly configured and port 80 is accessible for the ACME challenge.
  • Docker issues — run docker info to verify Docker is running. Check docker ps for container status.
  • Firewall blocking — run ufw status to verify the correct ports are open.

Next Steps

  • Configuration — Fine-tune agent settings and review firewall rules.
  • Monitoring — Set up health checks and monitor server metrics.
PrerequisitesConfiguration