Public | Automated Build

Last pushed: 7 months ago
Short Description
Dockerized twofishes -
Full Description

Dockerized Twofishes

This is a dockerized version of Twofishes.

Twofishes is a coarse, splitting geocoder and reverse geocoder in scala; built and maintained by Foursquare.

Coarse means its geo-indices do NOT include full address data but merely data about neighborhoods, cities, counties and up. It is highly optimized for coarse geocoding and thus makes it the perfect tool for your searches for cities, counties, etc.. You can for example translate something like 'Berlin' into lat/long coordinates and then search your database for the K nearest neighbors. It also provides autocomplete endpoints which you can use to suggest cities to users as they type.

start a twofishes instance

docker run -d -p 8080:8080 -p 8081:8081 --name twofishes zmyle/twofishes

NOTE: this image will download and unzip the revgeo index on the first run (~1.6GB). Therefore, the first startup of this image might take a bit longer.

use a different version/index

docker run -d -p 8080:8080 -p 8081:8081 --name twofishes \

This will download and install the binary at and download and install the prebuilt revgeo index from

jvm settings

Twofishes consumes a bit under 2GB of memory for the full index. The jvm in this image runs with those settings by default: Dockerfile JVM Options. We recommend running it with at least 6G when you run it for real:

docker run -d -p 8080:8080 -p 8081:8081 -e "TWOFISHES_JAVA_OPTS=-Xmx6g -Xms6g" --name twofishes zmyle/twofishes

env options

ENV What? Default
TWOFISHES_BINARY_URL A fqdn of a prebuilt twofishes binary; must be downloadable from within the docker container.
TWOFISHES_DATAINDEX_URL A fqdn of a tar archive that contains a prebuilt twofishes revgeo index; must be downloadable from within the docker container
TWOFISHES_JAVA_OPTS Java options that get passed to the twofishes java-process -Xmx2g -Xms2g

See also: Dockerfile

docker compose

There's a compose file ready for you to use.


The twofishes website ( that provides prebuilt binaries and indicies has been down for several months now. We are starting to host data in S3. Here's an overview of available binaries and indicies:



Docker Pull Command
Source Repository