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: INSTALL.md
+90-52Lines changed: 90 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,42 +32,13 @@ ssh -p 2222 user@your-server
32
32
33
33
You must open up your firewall (if present) to expose ports 22, 80 or 443, and potentially your real SSH port. This is specific to your network configuration, so the exact steps are not presented here.
34
34
35
-
### GeoIP Databases
35
+
### MaxMind Account (GeoIP)
36
36
37
37
Knock-Knock uses MaxMind GeoLite2 databases for IP geolocation. You need a free MaxMind account.
38
38
39
-
1. Install geoipupdate:
40
-
41
-
**Debian/Ubuntu:**
42
-
```bash
43
-
apt install -y geoipupdate
44
-
```
45
-
46
-
**RHEL/CentOS/Fedora:**
47
-
```bash
48
-
dnf install -y geoipupdate
49
-
```
50
-
51
-
2. Create a free account at https://www.maxmind.com/en/geolite2/signup
52
-
3. Generate a license key in your account dashboard. Either download the config file and save it as `/etc/GeoIP.conf`, or edit the existing `/etc/GeoIP.conf` (created by the install) and add your `AccountID` and `LicenseKey`.
53
-
54
-
Then download the databases:
55
-
```bash
56
-
geoipupdate
57
-
58
-
# Ensure databases are at /usr/share/GeoIP (some distros use /var/lib/GeoIP)
nano .env # Fill in your Account ID and License Key
78
+
```
79
+
80
+
### Start
115
81
116
-
# Build and start from Dockerfile
117
-
docker compose up -d --build
82
+
```bash
83
+
# Pull and start (uses pre-built image from ghcr.io)
84
+
docker compose up -d
118
85
```
119
86
87
+
The `geoipupdate` container downloads the GeoIP databases on first start and refreshes them weekly. The monitor waits until the databases are ready before processing knocks — you'll see `⏳ Waiting for GeoIP databases...` in the logs until the download completes.
88
+
120
89
### Verify
121
90
122
91
```bash
123
-
docker compose logs honeypot-monitor # Should show "Monitor Active"
124
-
docker compose logs web # Should show uvicorn startup
92
+
docker compose logs -f honeypot-monitor
93
+
# Should show:
94
+
# ⏳ Waiting for GeoIP databases... (briefly, during first-time download)
95
+
# ✅ GeoIP databases loaded
96
+
# 🚀 Maximalist Monitor Active...
97
+
98
+
docker compose logs web # Should show uvicorn startup
125
99
```
126
100
127
-
That's it. Three containers (Redis, honeypot+monitor, web) start automatically and restart on failure.
101
+
That's it. Four containers (Redis, geoipupdate, honeypot+monitor, web) start automatically and restart on failure.
128
102
129
103
**Useful commands:**
130
104
```bash
@@ -142,6 +116,35 @@ See [Optional Configuration](#optional-configuration) for various site-specific
142
116
143
117
Complete the [Prerequisites](#prerequisites) above first.
144
118
119
+
### GeoIP Databases
120
+
121
+
```bash
122
+
apt install -y geoipupdate
123
+
```
124
+
125
+
Configure your MaxMind credentials in `/etc/GeoIP.conf`:
126
+
```
127
+
AccountID your_account_id
128
+
LicenseKey your_license_key
129
+
DatabaseDirectory /usr/share/GeoIP
130
+
```
131
+
132
+
Download the databases and set up weekly auto-updates (MaxMind updates databases every Tuesday):
133
+
```bash
134
+
geoipupdate
135
+
136
+
# Ensure databases are at /usr/share/GeoIP (some distros use /var/lib/GeoIP)
0 commit comments