Sulu CMS with a local geocoder

Content editors place offices, events and stores by typing an address into a location field. In Sulu that lookup goes to the endpoint in one line of configuration.

Run it yourself Self-hosted apps Server, Docker Websites, help desks

What you have

Sulu's location bundle, read November 10, 2026 in its configuration: the geolocator is nominatim by default and its endpoint can be set. The configuration file (in config/packages/), and a check that makes Sulu's request and reads Sulu's fields:

sulu_location.yamlfile
sulu_location:
    geolocator: nominatim
    geolocators:
        nominatim:
            endpoint: "http://127.0.0.1:8080/search"
sulu_check.phpfile
<?php
// The request and the fields of Sulu's NominatimGeolocator, against the local server.
$q = http_build_query(["q" => "600 N Michigan Ave, Chicago, IL 60611", "format" => "json", "addressdetails" => 1, "key" => ""]);
foreach (json_decode(file_get_contents("http://127.0.0.1:8080/search?" . $q), true) as $r) {
    echo $r["address"]["road"], " ", $r["address"]["house_number"], ", ", $r["address"]["postcode"], " ",
         $r["address"]["city"], ", ", $r["address"]["country_code"], " | ", $r["lat"], ",", $r["lon"], " | id ", $r["place_id"], "\n";
}

Steps

1. Start the server for the country of your content:

terminalCLI
$ gridpin serve usa.bin --port 8080

2. Make the request Sulu makes (q, format=json, addressdetails=1) and read the fields it reads:

terminalCLI
$ php sulu_check.php
North MICHIGAN Avenue 600, 60611 Chicago, us | 41.8929239,-87.6248765 | id 5178767862071953

What you get

Every field Sulu copies into a location is there: road, house_number, postcode, city, country_code, the point and a place_id. Clear Sulu's cache after changing the configuration. Sulu itself was not run for this page; the check above follows its geolocator's code.

Why it works

Sulu sends a plain GET to the endpoint and maps the Nominatim fields of each result, so a server that answers Nominatim's /search with addressdetails is enough.

Limits

  • Addresses only: a venue by name is answered with its town, not its building.
  • One country per server.
  • Other CMS and help desks are not covered here: only Sulu's setting was read in its code.

All its keys: command reference. The function: local server.