MotionEye works very well. Read all the docs first before messing with the settings as they are not intuitive - trying to tweak the motion trigger settings is a bit of a pain (frames threshold, timeout, etc.) but can be done and there is a debug frame setting which is helpful. Works with the Raspberry Pi cameras but also with any USB cam as long as you choose the correct driver. I have an IR nightview USB cam that gives superior night shots and doesn't require additional power outside the USB connection. You can save all files locally or send them to any number of services - I have all my photos and videos dropped into Google Drive. I'm also using DuckDNS for external access to the IP cam port for a real-time view into my home whenever I am out and about. The network stream feature in VLC on mobile works really well for that. The only issue I've come across (and this was ~4 months ago) is that 8GB RAM Raspberry Pi 4's are more trouble than they're worth for this application - software support was very much lacking but the 4GB Pi's work very well.