Automatic Updates for GeoIP Databases

Listed on this page are methods to set up automatic updates for the GeoIP Databases.

Using geoipupdate program in C API

The GeoIP C Library (1.3.6 and above) has support for performing automatic updates for the GeoIP binary databases. Please follow the instructions below.

Step 1 - Install GeoIP C Library (1.3.6 or greater)

Install GeoIP C Library (1.3.6 or greater) and place GeoIP.conf in your configuration directory (e.g., /usr/local/etc/GeoIP.conf).

Step 2 - Obtain GeoIP.conf with Account Information

Please log in to view the GeoIP.conf file with your UserId, LicenseKey and ProductIds.

Step 3 - Run geoipupdate

Run geoipupdate. To fully automate this process on Linux or Unix, use a crontab file like:

# top of crontab
MAILTO=your@email.com

0 12 * * 3 /usr/local/bin/geoipupdate
# end of crontab

This crontab file would run every Wednesday at noon, and it would email you the results. To apply the crontab file run:

$ crontab cronfile

If you are running a firewall, geoipupdate requires that the DNS and HTTP (80) ports be open.

Direct URL for downloading GeoIP Databases using Windows and other systems not using the C API

1: For GeoIP Country in binary format only

There is a direct URL to download a compressed file containing GeoIP Country database in binary format here:

http://updates.maxmind.com/app/update?license_key=LICENSE_KEY_HERE&md5=MD5_SUM_OF_EXISTING_GEOIP_DAT_FILE

This URL can be used to automate the download from Windows. The md5 parameter is optional, if it is passed, the server will return the message "No new updates available" if the MD5 of the uncompressed GeoIP.dat file on your server matches the MD5 of the latest GeoIP Country file on our server.

2: For all other GeoIP databases

For downloading other GeoIP databases, using an HTTP request, see the URLs under "Direct Download URL:" on http://www.maxmind.com/pt/download_files?direct=1. If you are using wget to fetch the file, you will need to place single quotes around the URL.

This download will return a compressed file in gzip format, which can be uncompressed using a program like gzip, GZip Component, or another GZip Component.