My site is ad supported.

How To Auto Update MaxMind GeoIP Databases On Windows

Download Script Template (Requirements Included)


The MaxMind GeoIP Databases are a freely available lookup to map an IP address to a geographical location. Naturally, this makes for ideal use in analytical systems such as AWStats (when configured to use GeoIP). These databases are updated, typically, once per month which makes it a great candidate for a "set it and forget it" automated update process.


  • Update From the Web - Batch script available on this site.
  • Requirements for the above script (listed on the respective page). This process does require compressed file extraction.


Tested on Windows Server 2003 and 2008.

The process or automatically updating the MaxMind GeoIP Databases is all handled by a single call to the Update From the Web batch script. All that is needed is for you provide the location where the resulting binary file should be extracted.

This batch script handles the update process:


REM Edit the directory path below appropriately.
SET Directory="C:\Path\To\Save\Files"

REM Leave everything below here alone.
ECHO Script by: Jason Faulkner (

SET Switches=/F %Directory% /Z /A /W

CALL UpdateFromWeb %BaseURL%/GeoLiteCity.dat.gz %Switches%
CALL UpdateFromWeb %BaseURL%/GeoLiteCountry/GeoIP.dat.gz %Switches%
CALL UpdateFromWeb %BaseURL%/asnum/GeoIPASNum.dat.gz %Switches%

  1. Save the above script to a batch file. Alternately, you can download the script template with required utilities included using the link at the top.
  2. Set a Windows Scheduled Task to run the respective batch file monthly.
  3. Test to ensure updates work.

Note: The URLs referenced above are current at the time of this writing. They are subject to change at any time.

My site is ad supported.