Alternatives to n8n-nodes-geoip for fast/local (not web API) geolocation?

Does anyone know of alternatives to @pemontto’s https://www.npmjs.com/package/n8n-nodes-geoip ?

That package looks nearly complete for my needs, but it seems to have been abandoned. Github repo now yields a 404.

The only improvement I would make on it would be to allow specifying user-provided MMDB files (we enrich the public files with data of our own).

Hey @hukel Use @maxmind/geoip2-node in n8n’s Code Node

2 Likes

I’ve been using the IP2Location Node.js library in my project, and it’s been very useful. You should try it out in your own code to see if it works for you.

@hukel apologies I didn’t mean to make it private, I’ve made it public again GitHub - pemontto/n8n-nodes-geoip .

The node is from the early days of community nodes, so probably needs love an attention. More than happy to take PRs :+1:

The best option i’d say is to use the code node, with standard maxmind npm liabrary, this way you can directly use your own MMBD files.
first just install the maxmind package on your n8n server, then using a function node perform lookups against your database file.

1 Like

Using these excellent guides

I was able to get this working.

dockerfile

ARG tag=latest
FROM docker.n8n.io/n8nio/n8n:$tag
USER root

RUN npm install -g maxmind

USER node

docker compose

set NODE_FUNCTION_ALLOW_EXTERNAL variable

Demo workflow to use MMDBs

Workflow to fetch MMDBs and save to /var/tmp (which obviously needs to be run before the workflow above)

Command to sanity check the files were downloaded

docker exec -it n8n-n8n-1 ls -l /var/tmp
1 Like

Thanks for the shoutout!
Didn’t know about this package, glad it works for you

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.