Skip to content

Hardware Recommendations

Scott Lamb edited this page Jun 14, 2020 · 67 revisions

Note: Moonfire NVR will run on almost any hardware, under Linux, macOS, or likely any other POSIX-compatible system. It should support recording (if not on-camera motion detection) from any RTSP camera. And it currently has only one developer working very part-time toward its "minimum viable product" (see open issues), so it's not yet recommended as your first (or even only) NVR. Those are all good reasons to try it on hardware you already own before spending money!

Full example budget setup

Here's an example setup with prices as of 10 Jul 2019. It totals $810, includes 4 cameras, and has room for expansion. You'll also need: some determination, Ethernet cables, a free port on your main home switch, and the effort to wire the cameras through your walls. You may also want: a fan and real-time clock for the Raspberry Pi.

Note that even though at its core this runs on a $55 single-board computer, this setup is expected to perform well with Moonfire NVR today.

Full example nicer setup

This setup is a couple steps up in quality of every component, for a total of $1,467 as of 8 Jun 2020. Here are the components and some of their advantages over the budget setup.

NVR machine

Here are some machines which would work well:

  1. Raspberry Pi 4 Model B, 2 GiB or 4 GiB models. This is the cheapest hardware you're likely to find. You'll need a board, case, power supply, flash, USB enclosure, and hard drive. Consider buying and installing a real-time clock module. This blog entry suggests you'll also want a fan.
  2. ODROID-N2. This machine is noticeably faster than the Raspberry Pi 4 and comes with a real-time clock and adequate cooling. You'll also need the power supply, case, RTC backup battery, and flash (eMMC or perhaps a SATA SSD alongside your hard drive in a 2-bay USB SATA enclosure).
  3. a used Intel NUC. New Intel NUCs are considerably more expensive than new ARM single-board computers. But you can likely find a used older model for $200–$300 with RAM, SSD, case, and power supply included that will be considerably faster than brand-new ARM SBCs.
  4. a HPE MicroServer, whether new/latest generation or not.

A few things to consider:

  • software support. x86-64 (Intel/AMD) machines are clearly the best (always well-supported by the mainline kernel). Among ARM vendors, Raspberry Pi and ODROID have good reputations.
  • RAM. Moonfire NVR can run on a 1 GiB machine. However, given that there there are no prebuilt binaries available yet, you will also need to compile it. 1 GiB likely isn't enough but may work with zram to stretch it. 2 GiB should work today; 4 GiB is more comfortable and future-proof.
  • CPU speed. Again, Moonfire NVR is undemanding to run, but compiling it on the Raspberry Pi is noticeably slow (20+ minutes). x86-64 processors are still the best.
  • USB3. On-NVR motion detection is still unimplemented (see issue #30) but likely will work best with a Coral USB Accelerator or similar plugged into a USB port. You'll likely also connect the hard drive via USB. USB2 bandwidth would be tight, so look for systems with at least two USB3 ports.
  • Real-time clock with battery backup. It's best if your system can start up from power failure with no Internet connection and have an accurate time immediately.
  • Low power draw. You'll likely run your NVR 24x7, so larger used hardware that seems like a good bargain at first may not be so cheap in the long term.

Hard drives

Consider carefully:

  • SMR (shingled magnetic recording)
    • Pro: these drives are cheap.
    • Con: you have to be careful to ensure they can keep up with your workload. As a rule of thumb, they can probably handle the main and sub streams of 2 cameras; more may cause problems. Look at the specification sheet's "rated workload" (in terabytes per year), divide by 4 to approximate Mbps, and compare to what you're recording. Eg 55 TB/year is about 14 Mbps, or two cameras with their main streams capped to 6 Mbps and their sub streams capped to 1 Mbps.
    • Drives may not advertise if they use SMR or not, so try online searches for the model number and SMR. For example, the Seagate ST4000DM004 is not advertised as SMR, but a Google search for "ST400DM004 SMR" reveals several threads in which folks conclude from its observed performance, per-platter density, cache size, and rated workload that it is an SMR drive.
    • After setting up Moonfire NVR with the drive, run iostat -dx 10 and watch the %util column. If goes over 10%, you're pushing the drive's limits. These devices do not expose all their I/O to the operating system, so you need to leave plenty of slack for their hidden book-keeping operations.

Look for:

Doesn't matter:

  • rotational speed. You don't need more expensive 7200-rpm drives; 5400 rpm is fine.

If connecting via USB, prefer USB3 over USB2.

You might buy an internal hard drive and USB3 enclosure separately. If so, consider a 2-bay enclosure or docking station. (Note: I recommend disabling UAS when using the linked model. I've had reliability problems that were fixed by doing this.) This gives you the ability to add a second hard drive or put your database on a SATA SSD rather than the slower and less reliable SD-Card or eMMC common with ARM single-board computers.

PoE switches and networking

YuanLey has a couple switch models that are quite inexpensive for their specifications. (Note however this writer hasn't tried them, and their VLAN functionality is unusual if not broken. They definitely don't support IEEE 802.1q VLAN tagging.)

There's a PoE switch suggestion list thread on ipcamtalk.

Look for a switch with:

  • PoE ports for the cameras. Note it's common for switches to have PoE on only some ports; make sure there are enough for your planned camera use.
    • You don't need gigabit Ethernet for the cameras; "fast Ethernet" (100 Mbit/sec) is plenty.
  • one or two free ports to connect to the NVR and/or to the rest of your LAN.
    • be careful: many switches have uplink ports that are 1000baseX (for fiber optic cabling) or SFP (which requires an adapter) rather than 1000baseT (for more familiar cat6 cables and RJ-45 connectors). You'll need matching hardware to use them. Additionally, sometimes there's a pair of ports of different types where only one can be used at a time.
    • prefer gigabit Ethernet—the total bandwidth of your cameras to the NVR will probably be under 100 Mbit/sec unless you have more than 8 cameras, but you may want faster transfer between the NVR and your LAN.
  • sufficient per-port and total power capacity. Some PTZ (pan, tilt, zoom) cameras may need more than the standard 15.4W.
  • fanless operation or quiet fans. Some PoE switches can be uncomfortably loud for a home closet. This is likely a trade-off with power capacity, so decide what's most important to you.
  • nice-to-have: a good warranty. However, name-brand PoE switches are costly enough that it may be worth just rolling the dice.
  • nice-to-have: IEE 802.1q VLAN tagging support.

Note that IP cameras are notoriously insecure. You'll likely want the ability to isolate them from the rest of your network. There are a few ways you could do this:

  • have two NICs on your NVR. One connects to your main network; the other connects to the dedicated camera switch.
  • use a camera PoE switch with support for IEEE 802.1q VLAN tagging and at least two more ports than you have cameras. Connect one extra to your NVR and another to the rest of your network. Configure main network port under one VLAN, all the cameras under another, and use tagging to configure the NVR's port for both.
  • use a separate main switch with support for IEEE 802.1q VLAN tagging. (A OpenWRT-based wireless router with a built-in switch would work well.) Configure the dedicated camera switch's port to use its own VLAN. Configure the NVR's port to allow talking with both VLANs via tagging.

Cameras

Look at the IP Cam Talk Cliff Notes and browse their IP Cameras forum. Look at the "Cameras: <brand>" pages here for any Moonfire NVR-specific notes, but any newer Dahua or Hikvision camera is likely to work reasonably well with Moonfire NVR.

Clone this wiki locally