···195195196196**Raspberry Pi4**
197197198198-
198198+
199199200200**Raspberry Pi5**
201201202202-
202202+
203203204204**i5-6500T**
205205206206-
206206+
207207208208**i5-13400T**
209209210210-
210210+
211211212212</details>
213213···254254255255</details>
256256257257-## Architecture Overview
257257+## Crowdsec at Homelab Scale
258258259259-Architecture will be similar to https://docs.crowdsec.net/u/user_guides/multiserver_setup/
259259+Now, we'll take all the above context to design a Crowdsec implementataion for our contrived homelab that respects the heterogenous compute power of machines in our network.
260260261261-* Management instance (docker)
262262- * located on most stable server
263263- * potentially on VPS if any services also live there
264264-* Log Process instances (docker)
265265- * Location based on
266266- * type of data source (docker containers can be tailed from anywhere)
267267- * expected traffic load
268268- * Use centralized log processor on beefy machine for high load, docker data sources
269269- * Use on-host log processor for low load or data sources that can't be tailed from docker
270270- * Showcase load testing stack to determine log processor feasability
271271- * Avoid log processor on same machine as Management unless lots of overhead
272272-* Bouncer on each point of ingress
273273- * Use firewall if possible
274274- * cloudflare tunnel fallback to reverse proxy bouncer
261261+### Scenario
262262+263263+* You have four machines in your lab:
264264+ * **High Power Server (HPS)** that is the main "workhorse". It has the most memory and most compute.
265265+ * **Low Power Server 1 (LPS1)** is a rasberry pi 4. You use it to **SSH** into your lab remotely.
266266+ * It is the most stable machine because remote access needs to be available, always
267267+ * **Low Power Server 2 (LPS2)** is a rasberry pi 4. It runs a **reverse proxy** where all external traffic is routed from. The traffic comes in through a router, or otherwise *not* a tunnel.
268268+ * **Low Power Server 3 (LPS3)** is a mini pc. It runs **Nextcloud**, but not through the reverse proxy (for our contrived example). The traffic comes in through a router.
269269+* All of the externally accessible machines (LPS1-3)
270270+ * have firewalls
271271+ * You want to use crowdsec to protect these machines based on the activity they get from external traffic
272272+273273+### Architecture
274274+275275+
276276+277277+* To prevent [compute-intensive log processing](#log-processing-is-compute-intensive) from occurring on LPS1/LPS2 we will use a "centralized" [log processor](#log-processor) on HPS to ingest logs from LPS1/LPS2 using [Docker](https://docs.crowdsec.net/docs/next/log_processor/data_sources/docker) [acquistion data sources](#log-processor).
278278+279279+* SSH log volume is unlikely to be as high as web traffic, and its more difficult (but not impossible) to offload this to HPS, so we will process SSH using a separate log processor directly on LPS1.
280280+281281+* LPS1 is our more stable machine so we will deploy our [CS Management Instance](#management-instance-lapi) here as well, so that it's more likely all other components will always be able to reach it.
282282+283283+* On each LPS machine we will install a CS [Firewall](https://docs.crowdsec.net/u/bouncers/firewall) [Bouncer](#bouncers) that will talk to our Management Instance on LPS1.
284284+285285+Using the above plan best takes advantage of what our homelab has to offer:
286286+287287+* Log processing and Management are independent instances which makes our [system more reliable](#separate-components-make-everything-more-reliable).
288288+* Offloading log processing where possible avoids [bottlenecking](#log-processing-is-compute-intensive) the hosts running critical services, and takes advantage of the higher compute from our HPS machine.
289289+290290+Additionally, connecting our Management Instance to the Central API (Crowdsec cloud) means we get access to the [community blocklist](https://docs.crowdsec.net/docs/next/central_api/community_blocklist/) to proactively block threats with our firewall bouncers.
275291276292## Implementation
277293