How to install MapTiler Server as a Docker image
Installation
To install MapTiler Server as a Docker image, use the following command:
docker pull maptiler/server
Get Started
There is one command to run MapTiler Server from the command line, anywhere with your GeoPackage or MBTiles in the current working directory:
docker run -p 3650:3650 -v "$(pwd)":/data/ maptiler/server
License activation
Your license can be passed with the -e MAPTILER_SERVER_LICENSE=...
parameter to the Docker image. The software will be automatically deactivated at the end of execution (for example, sending a SIGTERM signal). You can get your MapTiler Server license token from the Data dashboard.
# Get your MapTiler Server license token from Data dashboard: data.maptiler.com/server/
export MAPTILER_SERVER_LICENSE=ABCDEF-ABCDEF-ABCEDF-ABCDEF
docker run -p 3650:3650 -e MAPTILER_SERVER_LICENSE -v "$(pwd)":/data/ maptiler/server
You can prepare an alias for running MapTiler Server
alias maptiler-server="docker run -p 3650:3650 -e MAPTILER_SERVER_LICENSE=ABCDEF-ABCDEF-ABCEDF-ABCDEF -v $(pwd):/data/ maptiler/server"
maptiler-server
Custom working directory
To start serving tiles and maps from your local dir $WORK_DIR
, use:
docker run -p 3650:3650 -v $WORK_DIR:$WORK_DIR maptiler/server --workDir=$WORK_DIR
Help
Check all supported arguments for the command line:
docker run maptiler/server --help
License Deactivation
If you put your license in as an environment variable, it will be automatically deactivated during each shutdown of the Docker container. If you fail to shut down your Docker container correctly, your license activation will be “stuck in limbo”. If this happens, don’t hesitate to contact MapTiler Support for help; they will deactivate your license key.