On-premises users must obtain and configure their own Google Maps API keys to use Google Maps features. Google charges usage fees according to its pricing. Without this configuration, the following features are affected:
Existing address data will remain intact.
1. Go to the Google Cloud Console, create or select a project, and link a billing account, as Google Maps Platform requires billing to be enabled. Then enable the following APIs:
Maps JavaScript API
Places API (New)
Geocoding API
Maps Static API
2. Next, create two API keys, one for browser access and one for the Ragic server, and configure the following restrictions for each key:
| Key | Application restrictions | API restrictions |
|---|---|---|
| Browser Key | Select Websites and add the website URLs used to access Ragic. | Maps JavaScript API, Places API (New), Geocoding API, Maps Static API |
| Server Key | Select IP addresses and add the public IP address used by your Ragic server for outbound connections. | Places API (New), Geocoding API, Maps Static API |
Notes:
1. The Browser Key is visible in web pages, so make sure to restrict it to your authorized websites.
2. Keep the Server Key confidential and do not expose it publicly.
For more information, refer to Google's API security best practices.
Log in as SYSAdmin and go to On-premises config to enter the following values, or edit conf/ragic.properties directly. After saving, restart the Ragic service for the changes to take effect.
GOOGLE_MAPS_BROWSER_KEY=Your Browser Key GOOGLE_MAPS_SERVER_KEY=Your Server Key GOOGLE_MAPS_PROXY_SECRET=Your randomly generated secretGOOGLE_MAPS_PROXY_SECRET is a random secret that you generate yourself. You do not need to obtain it from Google. It protects the map image URLs that are made accessible externally. We recommend using a secure random generator. For example, you can run the following command:
openssl rand -hex 16
Notes:
1. Keep GOOGLE_MAPS_PROXY_SECRET safe and avoid changing it after configuration unless necessary. Changing it will invalidate previously generated map image URLs, including map images in emails that have already been sent.
2. If GOOGLE_MAPS_PROXY_SECRET is not configured, static maps in email notifications, print previews, homepage widgets, certain reports, and formatted API output will be replaced with plain address text. As long as both Google API keys are correctly configured, static maps on Form Pages and in PDF exports are not affected.
3. Map images in emails are loaded through your Ragic server. Recipients must be able to access your server to view them. If your server is only accessible through an internal network, external recipients will not be able to see the map images.