Enable Enketo location search - Where to put Google API key?

Hi there,

we’re trying to figure out where to put the Google API key for geocoding to make location search in Enketo work.

Installation is based on Docker Images (KPI Version 2.018.32), before kobo-install was available (where you can paste the API Key during installation process).

Can anyone point out where to add the key on a running server?

Thanks,
Daniel

Hi @DSimon,

It’s in a file called config.json. Edit it on your Docker host, not inside the Enketo container, to make your changes persist. I’m not sure how you have your volumes mapped, but a command like

$ docker inspect kobodocker_enketo_express_1 | grep 'Source.*config.json'

should return the answer, e.g.

"Source": "/mnt/data/kobo/kobo-deployments/enketo_express/config.json",

You may need to replace kobodocker_enketo_express_1 with the actual name of your Enketo container (get this from docker ps).

Have a look at the template config.json used by kobo-install for the place where you should place the Google API key:

Other things that can go in config.json are described by https://enketo.github.io/enketo-express/tutorial-10-configure.html.

3 Likes

Hi @jnm,

thanks a lot! I will pass your answer to our IT, I’m sure they will be able to solve the issue now.

Best regards
Daniel

1 Like