Installation
MAC OS 11 Big Sur and higher
Download the .zip file, unpack, and run the maptiler-server
file: either right-click on the file and select Open or run in the command line (for details scroll below).
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
.
At this stage, the program should open in the Terminal with info about where to access the admin endpoint.
MAC OS 11 Catalina and lower
Download the .zip file, unpack, and run the maptiler-server
file: either right-click on the file and select Open or run in the command line (for details scroll below).
If you just double-click on the maptiler-server
file, a warning message will pop up. Close it.
You need to right-click on the maptiler-server
file and click on the Open button.
Another warning message might pop up. Close it again.
Right-click on the node_sqlite3.node file, select Open or Open With and select your favorite text editor. Confirm you want to really open the file.
Do NOT do any changes, do NOT save the file, just close it. Now, the system knows you trust this software and it can be opened by double click or from the terminal.
If you double-click on the maptiler-server
file, a terminal window will open. Here you can see on which address and port the MapTiler Server instance is running. By default, it is the http://localhost:3650 address and administration is available on http://localhost:3650/admin (with a randomly generated password which is also displayed there).
Note: save your password because it will not be visible in the terminal window on the second 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. 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.
Note: if you run the MapTiler Server from a command line, it uses by default different working directory than if you just double click on the maptiler-server icon.
Run as a service using launchd
If you are interested in running maptiler-server
as a background daemon that will start on boot or after login you can leverage the power of launchd! The process of adding your custom service is pretty simple.
-
Define a property list file describing the daemon
-
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>
Note: 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.
Comments
0 comments
Please sign in to leave a comment.