Home lab

Keep your shop open when the internet goes down: backup internet on UniFi

← All guides

Who it is for

A shop, office, or restaurant that runs on a UniFi gateway and one internet provider. When that provider has an outage, or a crew down the street cuts a line, everything that needs the internet stops: card readers, VoIP phones, online ordering, cloud POS, and cameras that upload to the cloud. If an hour offline on a Friday night would cost you real sales, a backup connection is worth setting up.

Why this matters

Most UniFi gateways can use more than one internet connection. Ubiquiti calls each connection a WAN. In Failover mode, the gateway uses your main connection and keeps the backup on standby. It checks the main connection all the time, and if it stops answering, the gateway moves traffic to the backup on its own. When the main connection comes back, traffic moves back. Nobody has to touch anything during the outage, which matters when the person on shift is not the person who knows the network.

What you need

  • Admin access to UniFi, either locally or through unifi.ui.com (Site Manager).
  • A UniFi gateway with a free port you can use as a second WAN, or a UniFi cellular backup device (see step 2).
  • A second internet connection from a different kind of service than your main one. If your main line is cable, a backup over the same cable on the same street usually goes down at the same time. Fiber, a different provider’s line, or a cellular (LTE or 5G) connection are the usual choices.
  • A fresh UniFi backup (see our backup guide).
  • A quiet window after close, about an hour the first time.

Steps

  1. Decide what has to keep working.
    1. Make a short list: card readers, POS, phones, online orders, the office PC that runs payroll. That is what the backup is for.
    2. Note anything heavy that does not need to run during an outage, like camera cloud uploads, guest WiFi streaming, or large backups. That matters if your backup is cellular and your plan has a data limit (step 6).
  2. Pick the backup connection.
    1. A second wired line. Plug the second provider’s modem or router into a free port on the gateway that can be set as WAN2.
    2. Cellular from Ubiquiti. Ubiquiti sells LTE and 5G backup devices that adopt into UniFi. Their help article says the simplest setup connects the device to any PoE port on your network and adopts it, and backup internet is then available to all your networks by default. That also lets you put the device near a window where signal is best instead of next to the gateway.
    3. Cellular from another vendor. A cellular router plugged into a WAN port works like a second wired line. Check with the carrier that the plan is meant for business backup use.
  3. Take a backup of your UniFi settings. Do this before changing anything about your internet ports. If a setting goes wrong, the backup is how you get back.
  4. Turn on failover.
    1. For a wired backup, open the UniFi Network application, go to Settings → Internet, and set up the second WAN on the port you plugged into. Your provider’s setup sheet tells you whether it uses automatic addressing (DHCP) or a fixed address.
    2. Set WAN Mode to Failover Only, with your main line as the primary and the new line as the backup. Ubiquiti’s help article describes this as the mode for “a main ISP and one or more backup links used only during outages.”
    3. Leave the health check on Auto to start with. By default UniFi checks each connection with a ping to ping.ui.com and two DNS lookups, and marks it down when two of the three fail. That is enough for most shops.
    4. For a Ubiquiti cellular device added as Backup Internet, adopt it and confirm it shows as connected in the UniFi app.
  5. Test it after close.
    1. With a phone on the staff WiFi, open a website so you know things work.
    2. Unplug the cable from your main internet modem to the gateway (or unplug the main modem’s power).
    3. Give it a minute or two. Watch the UniFi app: the main connection should show as down and the backup as active.
    4. Run a test card sale, place a test call, and load a website on a phone.
    5. Plug the main line back in and confirm traffic moves back to it.
    6. Write down roughly how long the switch took and what worked, so you know what to expect during a real outage.
  6. If your backup has a data limit, keep the heavy stuff off it. Data limits vary by plan, so check yours. UniFi’s policy-based routing can send specific devices or networks to a specific connection, and Ubiquiti’s help article explains how. A simpler option for cellular backup devices: Ubiquiti lets you turn off cellular backup for individual networks, such as guest WiFi or cameras, under Settings → Networks, so only your business network uses it.
  7. Protect the backup from power blips. A backup line does not help if the gateway, the modems, and the switch that powers your access points all shut off in a brownout. Put them on a small battery backup (a UPS) so a short power flicker does not take the network down with it.
  8. Check it every few months. Repeat the test in step 5 once a quarter after close, and after any change to your internet service. A backup you have not tested is a guess.

Test checklist

  • List of must-work devices written down.
  • Backup connection is a different kind of service than the main line.
  • UniFi settings backup taken before changes.
  • WAN Mode set to Failover Only with the main line as primary.
  • Unplug test done after close: card sale, phone call, and website all worked on the backup.
  • Traffic moved back to the main line when it was reconnected.
  • If your cellular plan has a data limit, heavy traffic is kept off the backup.
  • Gateway, modems, and core switch on a battery backup.
  • Quarterly test on the calendar.

Cautions

  • Do not test failover during business hours. Unplugging the main line drops calls and in-progress card sales while the switch happens.
  • Do not assume two providers means two separate lines. If both run through the same pole or conduit, one accident can take out both. Ask each provider how the line reaches your building.
  • Some card readers and POS systems have their own cellular backup. That helps, but it does not cover your phones, online orders, or office computers.
  • Cellular signal inside a building can be weak. Check signal where the device will sit before you count on it.
  • If you use Load Balancing instead of failover, both connections carry traffic every day. That is a different setup with different trade-offs; for a backup that only kicks in during outages, use Failover Only.
  • Menu names move between UniFi versions. If you cannot find Settings → Internet or WAN Mode, use the search box in the UniFi app or check Ubiquiti’s help article above.

Running a shop or office in New Hampshire and worried about the next internet outage?

Book a free walkthrough or get a quote

The weekly note

A short email on tech and the home lab, from the same engineer. Confirm from your inbox before the first issue. Unsubscribe whenever you want.