Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.


Running a GeoIP Server

In order to allow geolocation lookups using the geoip_client.repy library, we have provided a GeoIP XML-RPC server for remote procedure call. While an instance of the server is running persistently at and, the server program is available at geoip_server/


$ python /path/to/GeoIP.dat PORT requires the Python library  pygeoip and a valid MaxMind geolocation database, such as  GeoLite City. The command-line arguments to are the path to the GeoIP.dat file and the port on which to host the server.

To Start the server

Log in to the appropriate GeoIP server machine and make sure you have the latest version of the pygeoip module installed. If not, install it

$ sudo pip install pygeoip

Now, run the program from the geoipserver account as follows:

$ screen -S geoipserver -d -m sh /home/geoipserver/

Once the server is up and running, you can connect to it using the geoip_client.repy function geoip_init_client(), passing in the address (http://HOSTNAME:PORT) of the server.


Please refer to the file itself for further information.