A Multiplayer Map for FlightGear based on node.js
- nodejs >= 18 (Express 5)
- permission to perform DNS lookup
- permission to do outbound connects (telnet to mpserverXX on port 5001)
get software
git clone https://git.code.sf.net/p/flightgear/mpmap.js flightgear-mpmap.js
enter into the directory
cd flightgear-mpmap.js
install dependencies (uses committed package-lock.json; run npm install locally after changing dependencies to refresh the lockfile)
npm ci
optional local configuration (environment variables; loaded automatically via dotenv when you run npm start)
cp .env.example .env
run
npm start
This will start the server on localhost, port 8080 and you should see the multiplayer map at http://localhost:8080/
don't like 8080? Use another port like this
app_port=4711 npm start
Optional environment variables:
MPMAP_DEBUG_WS=1— verbose WebSocket logs (otherwise only whennode_env=development).MPMAP_SHUTDOWN_MS— milliseconds before force-exit if graceful shutdown stalls (default 10000).MPMAP_EXPOSE_OBS=1— enableGET /api/obs(WebSocket observer dump); disabled by default.MPMAP_ALLOW_ANY_MPSERVER=1— allow any hostname and port range for MP status (disables SSRF-style host/port checks; not for public deployments).MPMAP_MPSERVER_HOST_SUFFIXES— comma-separated hostname suffixes allowed for/api/stat/:serverand WebSocket subscribe (defaultflightgear.org).MPMAP_MPSERVER_MIN_PORT/MPMAP_MPSERVER_MAX_PORT— allowed TCP port range for MP status (defaults5000–5999).MPMAP_OPENAIP_API_KEY— if set, enables the OpenAIP map overlay (key is not stored in the client bundle).
If you have docker and docker-compose installed, simply type
docker-compose up --build
and you are ready. Note: this exposes the app at port http://localhost:8086/ There are also ready to use docker images at https://hub.docker.com/r/flightgear/mpmap.js/. Run
docker run -p 8080:8080 flightgear/mpmap.js
to have your own private multiplayer map at localhost:8080
This software runs at http://mpmap03.flightgear.org/
Contact the author(s) at the flightgear-devel mailing list
Contributions are welcome through the gitlab project or the github project.
mpmap.js is licensed under the GPL 2.0 or later. See LICENSE
Thanks to
- the fantastic authors of Leaflet.js and it's plugins
- the authors of Bootstrap and js-cookie
- pigeon for the original fgmap software that inspired this version
- the incredible FlightGear community, especially the creators and maintainers of fgms