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.
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.
DO THIS BEFORE RUNNING THE GAME SERVER
- Set your server IP in
.env(SERVER_IP=) - Set your router IP or secondary DNS in
.env(ROUTER_IP=) - (Optional) Change exposed ports in
.env(HTTP_PORT=,HTTPS_PORT=,DNS_PORT=) - Build containers with
make build
For local server usage, set FORCE_DEV_LOGIN=true in .env
- If you use the default DNS port (
DNS_PORT=53), disablesystemd-resolvedbefore startup (make disable-systemd-resolved). - Start the stack with
make run-daemonormake run. - If you use a non-default DNS port, disabling
systemd-resolvedis not required.
If you disabled systemd-resolved for DNS_PORT=53, enable it again after shutdown: make enable-systemd-resolved
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.pemcert.pemcert-key.pem
To reissue certificates manually:
- Run inside container:
docker compose -f docker-compose.infra.yaml exec biogateway /var/www/reissue-certs.sh - Restart gateway container:
docker compose -f docker-compose.infra.yaml restart biogateway
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:
- Set the
APP_PRODUCTION_BUILDvariable tofalsein.env(APP_PRODUCTION_BUILD=false) - Override biofpm volume by
cp docker/docker-compose.override.dev.yaml docker-compose.override.yaml - Install Composer dependencies with
make composer-install
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 testsmake stan- runs PHPStan static analysis
SERVER_IPDB_USERDB_PASSWORDDB_DATABASEDB_HOSTJAVA_DB_PARAMS
SERVER_IPROUTER_IPDNS_PORT(compose port mapping for DNS service; when set to53,systemd-resolvedmust be disabled on host)
HTTP_PORT(compose port mapping for HTTP)HTTPS_PORT(compose port mapping for HTTPS)
DB_USERDB_PASSWORDDB_DATABASE
APP_PRODUCTION_BUILD(build arg + runtime behavior)FORCE_DEV_LOGINDB_HOSTDB_DATABASEDB_USERDB_PASSWORDLOG_ERROR(optional)LOG_ERROR_DETAILS(optional)LOG_LEVEL(optional)UID(build arg used for correct file permissions during web development, defaults to1000)GID(build arg used for correct file permissions during web development, defaults to1000)