# Updating the geoLite2 Database

**URL:** <https://discuss.elastic.co/t/updating-the-geolite2-database/264722>\
**Category:** Logstash\
**Created:** [February 18, 2021, 2:51pm UTC](https://discuss.elastic.co/t/updating-the-geolite2-database/264722 "2021-02-18T14:51:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Falikou1](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@Falikou1](https://discuss.elastic.co/u/Falikou1)\
**Post date:** [February 18, 2021, 2:51pm UTC](https://discuss.elastic.co/t/updating-the-geolite2-database/264722/1 "2021-02-18T14:51:59Z")

</div>

I have configured the geoLite2 Database in logstash.

geoip {  
default\_database\_type =\> 'City'  
database =\> '/usr/share/logstash/GeoLite2-City/GeoLite2-City.mmdb'  
source =\> "src"  
target =\> "src\_geoip"   
}

Is there a way to update this Database automatically?  
If so, I need your help please.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 18, 2021, 4:54pm UTC](https://discuss.elastic.co/t/updating-the-geolite2-database/264722/2 "2021-02-18T16:54:59Z")

</div>

You could schedule a job to copy an updated database from the GeoLite web site, but the last time I looked (a couple of years ago) the GeoLite library code did not support reloading the database when it changed, so logstash would have to be restarted to see the new database.

---

<div class="post-metadata">

**Author:** ![Falikou1](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@Falikou1](https://discuss.elastic.co/u/Falikou1)\
**Post date:** [February 19, 2021, 9:03am UTC](https://discuss.elastic.co/t/updating-the-geolite2-database/264722/3 "2021-02-19T09:03:15Z")

</div>

> [@Badger](#):
>
> You could schedule a job to copy an updated database from the GeoLite web site, but the last time I looked (a couple of years ago) the GeoLite library code did not support reloading the database when it changed, so logstash would have to be restarted to see the new database.

If I understood correctly, I have to download the database on the site and then put it in logstash?  
And then restart logstash.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 19, 2021, 5:36pm UTC](https://discuss.elastic.co/t/updating-the-geolite2-database/264722/4 "2021-02-19T17:36:51Z")

</div>

> [@Falikou1](#):
>
> If I understood correctly, I have to download the database on the site and then put it in logstash?  
> And then restart logstash.

Yes.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [February 19, 2021, 6:16pm UTC](https://discuss.elastic.co/t/updating-the-geolite2-database/264722/5 "2021-02-19T18:16:24Z")

</div>

@Falikou1 @Badger BTW I understand in the not too distant future elasticsearch itself will start automatically updating the geoLite2 Database. Stay Tuned. When that is the case I would create a ingest pipeline and use that.

---

<div class="post-metadata">

**Author:** ![Falikou1](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@Falikou1](https://discuss.elastic.co/u/Falikou1)\
**Post date:** [February 19, 2021, 6:41pm UTC](https://discuss.elastic.co/t/updating-the-geolite2-database/264722/6 "2021-02-19T18:41:08Z")

</div>

> [@stephenb](#):
>
> BTW I understand in the not too distant future elasticsearch itself will start automatically updating the geoLite2 Database. Stay Tuned. When that is the case I would create a ingest pipeline and use that.

Thank you Badger

---

<div class="post-metadata">

**Author:** ![Falikou1](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@Falikou1](https://discuss.elastic.co/u/Falikou1)\
**Post date:** [February 19, 2021, 6:42pm UTC](https://discuss.elastic.co/t/updating-the-geolite2-database/264722/7 "2021-02-19T18:42:30Z")

</div>

I will be happy to be informed.  
thank you in advance

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 19, 2021, 6:43pm UTC](https://discuss.elastic.co/t/updating-the-geolite2-database/264722/8 "2021-03-19T18:43:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
