Skip to content

panzer-punk/bioserver-docker

 
 

Repository files navigation

Open Source Outbreak Server

This project is an all-in-one Docker build for Bioserver1 and Bioserver2, bundling the game server together with DNS services, the built-in DNAS server, and a MySQL database, based on original work by dev ghostline.
It is aimed at fans and fellow enthusiasts, and supports both local server and self-hosted deployments.
The goal is to keep the game alive and accessible for the community by modernizing the stack and making private or local server deployment easy.
Development and testing are focused primarily on local server usage, so self-hosted environments may require custom image adjustments.

Project Status

As of version 2.4, this project is positioned as a stable base for your own local or production-like server setup, including custom extensions on top of it.

  • The core stack is in maintenance mode.
  • Mainline development is focused on bug fixes, dependency updates, and compatibility/security maintenance.
  • Bug reports and critical issues are handled on an ASAP basis.
  • Dependency refreshes are planned for each major PHP and MySQL release cycle.
  • Pull requests with new functionality are still welcome, especially when they improve extensibility for downstream/custom server deployments.

Recommended Download Source

It is recommended to download source archives from the Releases tab for regular usage. The master branch may contain in-progress changes or partially finished functionality.

Setup

DO THIS BEFORE RUNNING THE GAME SERVER

  1. Set your server IP in .env (SERVER_IP=)
  2. Set your router IP or secondary DNS in .env (ROUTER_IP=)
  3. (Optional) Change exposed ports in .env (HTTP_PORT=, HTTPS_PORT=, DNS_PORT=)
  4. Build containers with make build

Running the game server

For local server usage, set FORCE_DEV_LOGIN=true in .env

  1. If you use the default DNS port (DNS_PORT=53), disable systemd-resolved before startup (make disable-systemd-resolved).
  2. Start the stack with make run-daemon or make run.
    • If you get network bio-network declared as external, but could not be found, create it manually: docker network create bio-network (the stack starts multiple compose files at once).
  3. If you use a non-default DNS port, disabling systemd-resolved is not required.

After shutdown

If you disabled systemd-resolved for DNS_PORT=53, enable it again after shutdown: make enable-systemd-resolved

Upgrade to 2.4 with database preservation

To keep your existing MySQL data when upgrading to 2.4 (without dump migration), run the stack with DB mounted to the host directory:

  1. Stop current containers: make down
  2. Copy the compatibility override: cp docker/docker-compose.override.mounted-db.yaml docker-compose.override.yaml
  3. Start the stack again

The MySQL files will be stored in ./dbdata on the host, so database content is preserved across updates and image changes.

Gateway certificates

The gateway uses a local CA and one SAN server certificate for all DNAS hostnames.

  • Certificates are generated inside the gateway container in /etc/dnas.
  • If certificate files are missing, the gateway generates them automatically on container startup.
  • If you need persistent certificates between container recreations, add a host volume for /etc/dnas, for example:
    services:
      biogateway:
        volumes:
          - ./gateway_certs:/etc/dnas
  • Required certificate files in /etc/dnas:
    • ca-cert.pem
    • cert.pem
    • cert-key.pem

To reissue certificates manually:

  1. Run inside container: docker compose -f docker-compose.infra.yaml exec biogateway /var/www/reissue-certs.sh
  2. Restart gateway container: docker compose -f docker-compose.infra.yaml restart biogateway

Develop

Web

By default, the web application is built in production mode and changes in the code will not be applied until the application is rebuilt.
To make changes to the code without rebuilding, follow these steps:

  1. Set APP_ENV=development in .env (production mode is APP_ENV=production)
  2. Override biofpm volume by cp docker/docker-compose.override.dev.yaml docker-compose.override.yaml
  3. Install Composer dependencies with make composer-install

Testing

IMPORTANT: Before running tests, make sure to start the biomysql container, otherwise you may encounter database connection errors on first run.
You can start it with: docker compose -f docker-compose.infra.yaml up -d biomysql

To run tests, two commands are available:

  • make test - runs PHPUnit tests
  • make stan - runs PHPStan static analysis

Environment variables by container

bio1server / bio2server

  • SERVER_IP
  • DB_USER
  • DB_PASSWORD
  • DB_DATABASE
  • DB_HOST
  • JAVA_DB_PARAMS

biodns

  • SERVER_IP
  • ROUTER_IP
  • DNS_PORT (compose port mapping for DNS service; when set to 53, systemd-resolved must be disabled on host)

biogateway

  • HTTP_PORT (compose port mapping for HTTP)
  • HTTPS_PORT (compose port mapping for HTTPS)

biomysql

  • DB_USER
  • DB_PASSWORD
  • DB_DATABASE

biofpm (web)

  • APP_ENV (build arg + runtime behavior)
  • FORCE_DEV_LOGIN
  • DB_HOST
  • DB_DATABASE
  • DB_USER
  • DB_PASSWORD
  • LOG_ERROR (optional)
  • LOG_ERROR_DETAILS (optional)
  • LOG_LEVEL (optional)
  • UID (build arg used for correct file permissions during web development, defaults to 1000)
  • GID (build arg used for correct file permissions during web development, defaults to 1000)

Final Note

This project was built through sleepless nights, confusion, trial-and-error, and persistence.
From the first successful launch to the first forks and stars, every step meant a lot.

Special thanks to my friends and testers, Domi-Domik and ShooterTory, and to all contributors and everyone who showed interest in this project. And special thanks to YouTuber siroldschool for introducing me to this amazing game.

About

Dockerized Biohazard: Outbreak Server

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 86.9%
  • PHP 10.8%
  • Twig 0.7%
  • Shell 0.7%
  • Dockerfile 0.6%
  • Makefile 0.2%
  • HTML 0.1%