Configure MAXMIND for reverse IP lookups

What is MAXMIND and why would I want it?

Discourse uses MAXMIND to provide geographical information for reverse IP lookups.


Without Maxmind’s database you’ll see something like this:

Or perhaps you’ve noticed this message fly by when you rebuild your container:

MaxMind IP database updates require a license
Please set DISCOURSE_MAXMIND_LICENSE_KEY to one you generated at

Why Would I Care?

It’s often useful for moderators to see where someone is logging in from to determine if the person is who (and where) they say they are or to diagnose problems with your site. (“Oh, we frequently see problems with Special-ISP”.)

Also, as of 2.2.0.beta4, Discourse also uses this information to notify admins if a login is seen from a new location. Without the Maxmind database, Discourse cannot provide this notification.

What if I don’t get a key?

You won’t be able to do reverse lookups. If the issues above do not concern you, then it is a good bet that nothing bad will happen if you just ignore this.

How Do I Get a Key?

See Maxmind’s page for up-to-date instructions, but you need to

  • Visit the GeoLite2 Sign Up page.
  • generate a license key on the “My License Keys” link on the left navigation bar once you’ve logged in. Generate a new key, and copy the value. If you lose it, you’ll need to generate a new one.

You then add that key to the ENV section of your app.yml with a line like this:


Or via discourse-setup when prompted.


This link is now dead.

The link is now “Manage Licence Keys”. It also asks the following:

Old versions of our GeoIP Update program use a different license key format. Will this key be used for GeoIP Update?

For Discourse, is the answer Yes or No? I guessed No and will now see whether it works :slight_smile: (Update: it seems to!)

It would be good to add cd /var/discourse/ and nano containers/app.yml to save people like me looking it up elsewhere! And also to mention the need to ./launcher rebuild app at the end.


Thanks! I’ll update the page tomorrow.


Thanks, @Jonathan5. I updated the OP.

1 Like