Euphoria Development
BuiltByBitSourceXchange
  • Home
  • General Guides
    • Licensing
    • Licensed Resources
    • Site and API
    • Installation
    • Uninstalling
  • Euphoria Theme
    • Theme Customiser
  • Game API
    • Setup Guide
  • Setup
    • Player Listing
    • Refresh Theme
    • MC Logs
    • Server Backgrounds
    • Translations
  • Resource Alerts
  • Legal & Terms
    • Terms & Conditions
Powered by GitBook
On this page
  • Downloading the Game API
  • .ENV Configuration
  • Reverse Proxy (NGINX)
  1. Game API

Setup Guide

PreviousTheme CustomiserNextPlayer Listing

Last updated 1 month ago

Downloading the Game API

You can get the Game API files from our site , you are required to have purchased one of our resources (Theme or Addon) to Access this site. Once downloaded either upload it to your Server or Pterodactyl Panel Node.JS Server, Extract the files & Wait for the Dependencies to Install.

.ENV Configuration

PORT= 2000
PANEL_URL= https://panel.euphoriatheme.uk

PORT: The Port you are running the Server On or the one set by Pterodactyl to your Server Container. PANEL_URL: The Domain your Pterodactyl Panel is running on, this is used for CORS.

Reverse Proxy (NGINX)

Below you can find an Example of Reverse Proxying the Game API to a URL.

# Redirect HTTP traffic to HTTPS
server {
    if ($host = api.euphoriatheme.uk) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
    listen 80;
    server_name api.euphoriatheme.uk;
}

# Handle HTTPS traffic
server {
    listen 443 ssl;
    http2 on;
    server_name api.euphoriatheme.uk;

    # SSL Configuration
    ssl_certificate /etc/letsencrypt/live/api.euphoriatheme.uk/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/api.euphoriatheme.uk/privkey.pem; # managed by Certbot
    ssl_protocols TLSv1.2 TLSv1.3; # Support TLS 1.2 and 1.3
    ssl_prefer_server_ciphers on;
    ssl_ciphers HIGH:!aNULL:!MD5;
    
    # Proxy Configuration
    location / {
        proxy_pass http://localhost:2000;  # Backend server
        proxy_http_version 1.1;                # Explicitly set to HTTP/1.1
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Connection "keep-alive";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $server_name;

        # Handle preflight requests
        if ($request_method = OPTIONS) {
            return 204;
        }
    }
}

here
Euphoria Theme Site Dashboard