The comments here are interesting, as I'm helping with a project developing the software stack for mini servers we hope to sell that are preconfigured with Home Assistant (home automation) and Frigate NVR (camera control and recording) with local storage, local control, and no cloud component.
The hardware we're using for prototyping are off-lease Dell 7050 Micros running Proxmox, with 500gb Crucial MX500 ssds and an NVME Coral TPU that Frigate uses for object detection, which reduces CPU usage. 500gb is enough, because Frigate can be set to auto delete recorded clips after a set period of time, and clips can easily be saved.
Frigate can be installed via docker or as an add-on to Home Assistant. If you want to use Home Assistant, you can install Home Assistant OS directly on the SSD via these instructions.
We're using Amcrest WiFi cameras (IP4M-1041B) that connect to an on-board WiFi network controlled by an OpenWRT VM that uses the WiFi card in the system (not the ones that come with the Dells). Everything on our systems is locked down by an Opnsense firewall vm, so it should be safe to use even in an existing unsecured network.
Personally, for my own system, I've been running 4 Amcrest ethernet turret cameras (IP5M-T1179EW) for about 4 years now with no problems. You just need a cheap PoE switch (mine was $20) and then run some cables.
To use Frigate, the cameras must support both ONVIF and RTSP. Pro tip: the Amcrest Smart Home line of cameras won't work - you need a camera with a built-in web server for direct configuration.
For remote access, you could set up Wireguard (via an official Home Assistant add-on), or you could pay Nabu Casa (Home Assistant's parent company) $65/year (or 75 EUR), enter your credentials in the Home Assistant app and you're good to go, while helping fund future Home Assistant development.