Skip to content

Commit

Permalink
doc: update enable-ip-logging guide (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnu-narayanan committed Jul 8, 2023
1 parent 8fba74c commit 06504d7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/self-hosted/configuration/enable-ip-logging.md
Expand Up @@ -3,22 +3,25 @@ sidebar_label: "How to enable IP identification in Chatwoot?"
title: "How to enable IP identification in Chatwoot?"
---

Chatwoot allows you to identify the location of the user by geocoding the IP address. For IP Address geocoding, we support MaxmindDB services. This lookup provides methods for geocoding IP addresses without making a call to a remote API everytime. To setup your self-hosted instance with the geocoding, follow the steps below.
Chatwoot lets you identify the user's location by geocoding the IP address. For IP Address geocoding, we support MaxmindDB services. This lookup provides methods for geocoding IP addresses without calling a remote API every time. You can follow the steps below to set up your self-hosted instance with the geocoding.

**Step 1:** Create an account at [MaxmindDB](https://www.maxmind.com) and create an API key.

**Step 2:** Add the following environment variables.

```bash
IP_LOOKUP_SERVICE=geoip2
IP_LOOKUP_API_KEY=your-api-key
```

With this step, Chatwoot would automatically download the [MaxmindDB downloadable databases](https://dev.maxmind.com/geoip/geoip2/downloadable/) and cache it locally.

**Step 3:** Enable IP Lookup on your account.
**Step 3:** Enable IP Lookup on your account. You can do this in two ways.

Login to Rails console
- Method 1 via Superadmin console UI

Log into the super admin and select accounts. Select your account, click edit, and toggle the `ip_lookup` feature.

- Method 2 via Rails console

```
RAILS_ENV=production bundle exec rails console
Expand Down

0 comments on commit 06504d7

Please sign in to comment.