How to run MapTiler Server on macOS

Installation for macOS 11 (Big Sur) and higher

  1. Download the .zip file,
  2. Unpack the file,
  3. Run the maptiler-server file: either right-click on the file and select Open or run in the command line (for details scroll below).
  4. The very first time you open the maptiler-server, you will see a window asking for permissions to open an app from an unidentified developer. In order to resolve this, you have to head to the Security & Privacy section of the System & Preferences, log in as administrator and allow to run the maptiler-server.

5. At this stage, the program should open in the Terminal with info about where to access the admin endpoint. The system trusts MapTiler Server now, you can click it open or use the terminal.

Double-click on the maptiler-server file.
Terminal window will open. You can see address and ports where the MapTiler Server runs
By default, it is http://localhost:3650.
Administration is available on http://localhost:3650/admin.
Further information is available in this follow-up article: sign in to the administration, add tiles, and do all the fun stuff.

Installation for macOS 10 (Catalina) and lower

  1. Download the .zip file,
  2. Unpack the file,
  3. Run the maptiler-server file: either right-click on the file and select Open or run in the command line (for details scroll below).

Double-click on the maptiler-server file.
A warning message will pop up.

Close the warning message.Right-click on the maptiler-server file.
Click the Open button.

A warning message will pop up.
Click to Cancel.

Right-click on the node_sqlite3.node file.
Select Open or Open With.
Select text editor.
Confirm to open the file. 

DO NOT make any changes.
DO NOT save the file.
CLOSE IT.

The system trusts MapTiler Server now, you can click it open or use the terminal.Double-click on the maptiler-server file.
Terminal window will open. You can see address and ports where the MapTiler Server runs
By default, it is http://localhost:3650.
Administration is available on http://localhost:3650/admin.
Randon-generated password is also shown there.
Save your password.It appears only in the first run.

Your MapTiler Server is now up and running.
You can sign in to the administration, add tiles, and do all the fun stuff.

Run from the command line

MapTiler Server can also run from the command line.

  1. Open your favorite terminal, go to the folder with unzipped MapTiler Server and run
./maptiler-server

You can also specify a different working directory (using a --workDir option), change the default port (--port) or set to administration password to a specific value (--adminPassword).

Run maptiler-server --help to see all the available options.

Running MapTiler Server from a command line uses a different directory then if you only double-click the Maptiler Server icon.

Run MapTiler Server as a service using launchd

To run maptiler-server as a background daemon that will start on boot or after login,
you can leverage the power of launchd! Just take the following steps:

  1. Define a property list file describing the daemon
  2. Register it using launchctl

Defining the .plist file

Property list files describing daemons are installed in /Library/LaunchDaemons. There you can see the structure of property list files for already installed services. We are going to create a new one for the MapTiler Server in this location.

The contents of the file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.maptiler.server</string>
    <key>Program</key>
    <string>${PATH_TO_MAPTILER_SERVER}</string>
    <key>ProgramArguments</key>
    <array>
        <string>--workDir=${WORK_DIR}</string>
        <string>--port=${PORT}</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>WorkingDirectory</key>
    <string>${WORK_DIR}</string>
    <key>StandardOutPath</key>
    <string>/var/log/maptiler-server.log</string>
    <key>StandardErrorPath</key>
    <string>/var/log/maptiler-server.err</string>
</dict>
</plist>
You have to replace variables enclosed in ${ } with your own values.

Registering the MapTiler Server as a service gives us the ability to set custom log paths using the .plist file. This is equivalent to setting the paths in the admin section of the MapTiler Server.

Outline of the steps:

# create the .plist file 
sudo nano /Library/LaunchDaemons/com.maptiler.server.plistd

# add the text content manually

# register the service 
sudo launchctl load /Library/LaunchDaemons/com.maptiler.server.plist

# check the srevice, everything works as expected if you see a PID column. Otherwise, check the logs otherwise
sudo launchctl list | grep com.maptiler

# check out the logs
tail -f /var/log/maptiler-server.log

Sign in to the administration and publish your maps

After you finish the installation, you can sign in to the administration and start publishing your maps.