To expose your Epicbox Docker service securely on your own domain, use a simple nginx reverse proxy. This allows you to use SSL and a custom domain name.
EPICBOX_DOMAIN=your-epicbox-domain.example docker compose up -d --buildPlace this in your nginx config (e.g., /etc/nginx/sites-available/epicbox.conf):
upstream epicbox_backend {
ip_hash;
server 127.0.0.1:8888 max_fails=3 fail_timeout=10s;
server 127.0.0.1:8889 max_fails=3 fail_timeout=10s;
}
server {
server_name your-epicbox-domain.example www.your-epicbox-domain.example;
root /var/www/html/epicbox/;
index index.html index.htm;
location / {
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-Proto $scheme;
proxy_pass http://epicbox_backend;
proxy_read_timeout 90;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
access_log /var/log/nginx/epicbox.access.log;
error_log /var/log/nginx/epicbox.error.log;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/your-epicbox-domain.example/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-epicbox-domain.example/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
- Replace
your-epicbox-domain.examplewith your actual domain. - Adjust SSL certificate paths as needed.
sudo nginx -s reloadNow, your domain will securely proxy to your Epicbox Docker service!
Epicbox Relay Server for Epic Cash, built with Node.js and Rust.
-
Clone the repository and initialize submodules:
git clone <repo-url> cd epicboxnodejs-source git submodule update --init --recursive
-
Build and start all services with Docker Compose:
docker compose up -d --build
-
Custom configuration via environment variables: You can override key settings at runtime:
EPICBOX_DOMAIN=my.domain.com docker compose up -d --build
EPICBOX_DOMAIN: Sets the domain for epicbox services (default: epicbox.your-domain.com)EPICBOX_PORT: Sets the port for epicbox services (default: 443)NGINX_PORT: Sets the external port for nginx (default: 8443)
-
Access the service:
- Open
http://localhost:8443(or your chosen NGINX_PORT) in your browser.
- Open
-
Scaling and failover:
- Two epicbox instances are started by default (epicbox1 and epicbox2).
- nginx will automatically route requests to available instances.
All major settings can be configured via environment variables or a .env file:
EPICBOX_DOMAIN=my.domain.com
EPICBOX_PORT=443
- MongoDB, nginx, and epicbox instances are all managed via
docker-compose.yml. - For custom setups, edit
docker-compose.ymlanddefault_config.jsonas needed.