You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ Start the system and wait for it to update *(or create a [service](#install-as-a
61
61
62
62
```Shell
63
63
cd /var/www/ip-location-api
64
-
./ip-location-api
64
+
sudo ./ip-location-api
65
65
```
66
66
67
67
## Configuration
@@ -83,7 +83,7 @@ UPDATE_TIME=01:30
83
83
84
84
If you wish to expose the system without a reverse proxy, you may wish to update `SERVER_HOST` to `0.0.0.0`.
85
85
86
-
`API_KEY` allows a very basic protection of the system to be applied, a header named `API_KEY` with a matching value must be passed if this variable is populated. If left blank, the API is open.
86
+
`API_KEY` allows a very basic protection of the system to be applied, a header named `API-KEY`*(hyphen not underscore!)* with a matching value must be passed if this variable is populated. If left blank, the API is open.
87
87
88
88
`COUNTRY`, `CITY` and `ASN` are the databases that will be loaded. **If you don't need cities or ASNs, just leave them blank.** The values / names used should mirror the directory values found in the [ip-location-db](https://github.com/sapics/ip-location-db) project:
89
89
@@ -119,6 +119,8 @@ The MMDB adaption doesn't need any initialisation, it just needs to be told to u
119
119
DB_TYPE=mmdb
120
120
```
121
121
122
+
**N.B. If you choose MMDB, you will need enough RAM to read the entirety of each file into memory *(briefly)* before it is saved to disk. MaxMind don't have a partial method to write their files.** For city files, this can be quite a lot *(more than my favourite AWS `t4g.small` have spare if there's other programs running!)*.
123
+
122
124
### PostgreSQL
123
125
124
126
The PostgreSQL adaption will create 3 tables *(`ip_country`, `ip_asn` and `ip_city`)* in a database of your choice:
0 commit comments