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 download requires an account ID and a license key
Please set DISCOURSE_MAXMIND_ACCOUNT_ID and DISCOURSE_MAXMIND_LICENSE_KEY. See https://meta.discourse.org/t/configure-maxmind-for-reverse-ip-lookups/173941 for more details.
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 setup a MaxMind account and generate a license 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 setup a MaxMind account and obtain an Account ID and a license key?
See Maxmind’s https://support.maxmind.com/hc/en-us/articles/4407111582235-Generate-a-License-Key page for up-to-date instructions, but you need to
- Visit the GeoLite2 Sign Up page.
- generate a license key on the Manage License Keys tab in the left navigation bar once you’ve logged in. Generate a new key, and copy the account ID and the license key. 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:
DISCOURSE_MAXMIND_ACCOUNT_ID: your-account-id-here
DISCOURSE_MAXMIND_LICENSE_KEY: your-key-here
Or via discourse-setup
when prompted.
Notes for IPv6 users
The Standard install doesn’t fully support IPv6 out of the box. If you have a server with IPv6 configured and need Maxmind information for IPv6 addresses, you’ll need to make sure that the user’s actual IP address is what is getting to Discourse, normally by using an external proxy that passes the remote IP address to Discourse. This requires more systems administration expertise than the standard install.