This page is about Caddy 1 and will stay here forever.

User Guide


geoip is a Caddy plugin that allow to determine user Geolocation by IP address using MaxMind database.

Full documentation


Proxy pass headers to backend
localhost geoip /path/to/db/GeoLite2-City.mmdb proxy / localhost:3000 { header_upstream Country-Name {geoip_country_name} header_upstream Country-Code {geoip_country_code} header_upstream Country-Eu {geoip_country_eu} header_upstream City-Name {geoip_city_name} header_upstream Latitude {geoip_latitude} header_upstream Longitude {geoip_longitude} header_upstream Time-Zone {geoip_time_zone} }

This will pass Country-Name/Country-Code.. etc. headers to you backend and you must get it like r.Header.Get("Country-Name") or other way related to you backend language/framework

Related Links

Access the full documentation for this plugin off-site:

Plugin Help

Get help from the maintainers of the http.geoip plugin:

Plugin Website

Visit http.geoip's website for more information:

Plugin Author: Andrey Blinov
Last Updated: 27 Mar 2018, 7:38 AM
This plugin is independent of the Caddy project and is not endorsed or maintained by Caddy developers. Use at your own risk. Do not file issues for this plugin on Caddy's bug tracker.