Skip to content

Docker and other hosting panels ​

The same framework can be deployed with Docker Compose, another panel or manually managed containers. Use the topology below rather than treating every folder as a mandatory separate container.

Topology ​

text
Players → HTTPS reverse proxy → web (public site + UCP + ACP)
Players → game UDP port       → game + agent
web     → private MariaDB
game    → private MariaDB
web     → private agent HTTP
web     → your authenticated SMTP service

The optional Fastify API is not the ACP agent. It is a separate scaffold with /health; normal web controls use Next.js routes that call the agent.

Build the supplied web image ​

From the framework root:

sh
docker build -f web-platform/web/Dockerfile -t openrp-web:local web-platform

Use an environment file outside the image or your host’s secret/environment settings. Publish port 3000 to a reverse proxy. The container runner starts server.js directly and listens on all container interfaces; the non-container npm start launcher uses WEB_BIND.

The web image contains static public assets. If you introduce persistent user storage later, provide dedicated mounts for it; do not overwrite all of /app with a blank volume.

Prepare a game/agent image ​

There is no bundled, universally validated game image. Prepare a clean build context with:

  • Linux open.mp, its components and matching legacy plugins;
  • the compiled gamemode, your local configuration and required UI assets;
  • scriptfiles/ runtime resources, including the ColAndreas database;
  • the agent source and production dependencies;
  • Node.js and libraries required by the game and node-pty.

Use a non-root runtime user with write access to runtime data. Run the agent as the foreground service, with SAMP_DIR pointing to the game root. Supply secrets at deployment time. Keep one replica and allow the agent to create the game process.

If a hosting panel insists on directly owning the game process, ACP Start/Stop cannot automatically take ownership. Either configure the panel to supervise the agent instead, or use the panel’s game controls and treat ACP process control as unavailable. File access alone is insufficient.

Storage and networking ​

Use a private service network. Set AGENT_BIND=0.0.0.0 only within that private network and point the web app to the agent service name. Match the private database hostname in both game and web configurations.

Back up database volumes and persistent model/runtime directories. Keep compiled application files separate from mutable storage. Preserve bans.json if using engine-level bans through ACP.

Publish only the game UDP port, the configured artwork TCP port when used, and web HTTP/HTTPS through the proxy. Do not publish the database or agent port publicly.

Validate lifecycle behaviour ​

Containers restarting, the game stopping and the web redeploying are different events. A container restart does not restore the web app’s in-memory scheduled-start timer. An agent restart does not adopt an old independent game process. Check your supervisor and test stop/redeploy/restart with a private server before relying on them in production.

Open-source roleplay foundations for open.mp. Bring your own world.