Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Docker

What Happens to Your Home Services When a Docker Host Goes Offline?

By Freedom251 Team · · 9 min read

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a Docker host goes offline, every service whose container runs on that machine stops serving requests. A container restart policy can bring an eligible container back after the host boots or the Docker daemon restarts, but it cannot power on a failed computer, repair a disk, start a disabled daemon, or restore a broken network connection.

Recovery therefore has several gates: the host must become available, the operating system must boot, Docker must start, each container must have an appropriate restart policy, and applications must reconnect to dependencies such as databases. A UPS can bridge some power interruptions, but it does not make a single host highly available.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What “offline” means for a Docker host

A Docker host is the physical or virtual machine running the Docker Engine. Your home services may include a media server, password manager, dashboard, home-automation controller, database or reverse proxy, but Docker treats them all as containers attached to that host. If the host cannot run the Docker daemon, none of those containers can accept new requests.

The visible symptom depends on which layer failed:

Failure layer What you see What can recover it
Power loss or host shutdown All services disappear at once; the host is unreachable. Restored power and a successful boot. A UPS may provide limited runtime or allow an orderly shutdown.
Host hardware or operating-system failure The machine may not boot, may reboot repeatedly or may be reachable without starting Docker. Hardware or OS repair, replacement, or restoration from your own recovery plan.
Docker daemon stopped The host responds, but Docker commands fail or containers are not running. Starting or repairing Docker and checking its startup configuration.
Container process exits One service fails while the host and other containers remain available. The container’s restart policy, followed by application-specific troubleshooting.
Network or internet outage Containers may be running locally but clients cannot reach them. Restoring the local network, DNS, router, firewall or internet path.

This distinction matters because restart policies address container behavior. They do not monitor or repair every failure layer.

#1 Best Overall
Sale
APC BX1500M UPS Battery Backup & Surge Protector for Computers, Electronics | 1500VA/900W UPS backup battery power supply, 10 Outlets, 789 Joule surge protect, AVR, UL certified. 68 minutes runtime @100W
  • 1500VA / 900W RELIABLE BACKUP POWER: The highest VA capacity available for home use; delivers short-term battery power to keep essential devices powered during blackouts, surges, and unexpected power interruptions
  • TEN PROTECTED OUTLETS: Power your entire setup with 5 battery backup outlets for essential devices, and 5 surge-only outlets for peripherals. Plus built-in coaxial and Ethernet surge protection for added peace of mind
  • AUTOMATIC VOLTAGE REGULATION (AVR): Corrects low voltage brownouts (88V+) and surges (+/-13%) without draining battery. Boosts or trims to stable 120V. Extends runtime for blackouts; Active PFC compatible for gaming PCs
  • REPLACEABLE BATTERY & ENERGY STAR UPS: User-replaceable battery (APCRBC124, sold separately) for zero-downtime swaps. ENERGY STAR certified for 92%+ efficiency, cutting energy costs vs standard UPS units
  • LCD DISPLAY PANEL: Features an intuitive LCD screen that displays real-time status information including battery charge level, estimated runtime, load capacity, and input voltage for easy monitoring of your power protection system

What happens during an outage and recovery

1. The host disappears

During a power cut, kernel panic, hardware fault or deliberate shutdown, the Docker daemon stops with the host. Requests to services fail because there is no process listening on the host’s ports. A restart policy cannot run while the machine itself is unavailable.

2. The host boots again

After power returns or the machine is repaired, the operating system must complete boot. Docker notes that some operating systems, including Ubuntu and Debian, start the daemon automatically, but that behavior depends on the host’s configuration. A machine that boots with Docker disabled leaves every container stopped until the daemon is started.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Docker evaluates container policies

Once the daemon is running, Docker applies each container’s configured restart policy. Containers with a policy that permits a restart can be started automatically. Containers configured with the default no policy remain stopped unless you start them yourself.

4. Applications reconnect

A running container is not necessarily a ready service. A web application may start before its database is accepting connections, or a dependency may still be recovering. Compose can control creation order and health-based startup gates, while the application still needs sensible retry and error handling for failures that occur after startup.

Rank #2
Sale
CyberPower CP1500PFCLCD PFC Sinewave UPS Battery Backup and Surge Protector | 1500VA/1000W, 12 Outlets, AVR, Mini Tower, UL Certified
  • 1500VA/1000W PFC Sinewave Uninterruptible Power Supply (UPS): Uses sine wave output to provide battery backup power for Active PFC & conventional power supplies; Safeguards computers, workstations, network devices, and telecom equipment
  • 12 NEMA 5-15R OUTLETS: 6 battery backup & surge protected outlets, 6 surge protected outlets; INPUT: NEMA 5-15P right angle, 45 degree offset plug with 5 foot power cord; 2 USB charge ports (1 Type-A, 1 Type-C) quickly charge phones and tablets
  • MULTIFUNCTION, COLOR LCD PANEL: Displays immediate, detailed information on battery and power conditions; Color display alerts users to potential issues before they can affect critical equipment and cause downtime; Screen tilts up to 22 degrees
  • AUTOMATIC VOLTAGE REGULATION (AVR): Corrects minor power fluctuations without switching to battery power; UL SAFETY CERTIFIED: Product has been tested in a UL certified lab and listed with UL as meeting or exceeding safety standards
  • 3-YEAR WARRANTY – INCLUDING THE BATTERY; $500,000 Connected Equipment Guarantee; FREE PowerPanel Management Software (Download)

Docker restart policies: the setting that controls container recovery

The default restart policy is no. Docker recommends using restart policies rather than combining Docker with another host-level process manager to start the same containers, because competing supervisors can create conflicts.

Policy When Docker attempts a restart Important limitation
no Never automatically. This is the default. A host reboot or daemon restart does not bring the container back by policy.
on-failure When the container exits with a non-zero status. You can add a retry limit, such as on-failure:5. A clean exit with status zero does not trigger this policy. It is intended for processes that should be retried after an error.
always After an eligible stop or daemon restart, Docker attempts to keep the container running. It still cannot help while the host or daemon is unavailable, and it does not fix an application that repeatedly crashes.
unless-stopped Like an always-running service in normal operation, including after daemon startup. A container that you deliberately stopped remains stopped until you start it again.

Set the policy per service in Compose or when creating a container. For example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
services:
  dashboard:
    image: example/dashboard:stable
    restart: unless-stopped

  worker:
    image: example/worker:stable
    restart: on-failure:5

The exact policy should match the service. A long-running web service commonly needs unless-stopped or always; a batch worker that should be retried only after an error may fit on-failure. Do not select a policy merely to hide a crash loop: inspect logs and the exit status as well.

Manual stops are special

Docker’s restart behavior treats a manually stopped container differently from one that exits unexpectedly. After you intentionally stop a container, its restart policy is ignored until the daemon restarts or you manually start the container. This prevents an administrative stop from immediately turning into an automatic restart.

Rank #3
Sale
CyberPower CP1500AVRLCD3 Intelligent LCD UPS Battery Backup | 1500VA/900W, 12 Outlets, 2 USB Ports, AVR, Mini Tower, UL Certified
  • 1500VA/900W Intelligent LCD Uninterruptible Power Supply (UPS): Uses simulated sine wave technology to provide battery backup power to safeguard workstations, networking devices, and home entertainment equipment
  • 12 NEMA 5-15R OUTLETS: Six battery backup & surge protected outlets; six surge protected outlets; INPUT: NEMA 5-15P plug with 6-foot power cord; USB charge ports (1 Type-A, 1 Type-C) quickly charge mobile phones and tablets
  • MULTIFUNCTION, COLOR LCD PANEL: Displays immediate, detailed information on battery and power conditions; Color display alerts users to potential issues before they can affect critical equipment and cause downtime
  • AUTOMATIC VOLTAGE REGULATION (AVR): Corrects minor power fluctuations without switching to battery power; UL SAFETY CERTIFIED: Product has been tested in a UL certified lab and listed with UL as meeting or exceeding safety standards
  • 3-YEAR WARRANTY – INCLUDING THE BATTERY; 500,000 Connected Equipment Guarantee; FREE PowerPanel Personal Software (Download)

Compose startup order versus service readiness

Compose can create services in dependency order, but the short depends_on form means only that the dependency has started. It does not prove that a database, queue or API is ready to accept requests.

This configuration expresses ordering only:

services:
  app:
    image: example/app:stable
    depends_on:
      - db

  db:
    image: postgres:16

For a startup gate, define a health check and use the long form with condition: service_healthy:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
services:
  db:
    image: postgres:16
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U app"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: unless-stopped

  app:
    image: example/app:stable
    depends_on:
      db:
        condition: service_healthy
    restart: unless-stopped

The health-check command must exist in the image and must test the real readiness condition. For an HTTP service, that might be a local health endpoint; for a database, it should test that the server is accepting the relevant connection. A health check delays dependent service creation until the dependency reports healthy, but it does not make an already-running application resilient to every later dependency failure.

Compose supports three dependency conditions:

  • service_started: the dependency has started. This is the behavior associated with the short form.
  • service_healthy: the dependency’s health check reports healthy.
  • service_completed_successfully: a one-shot dependency has exited successfully.

The long-form dependency option restart: true has a narrower purpose. It can restart a dependent service after an explicit Compose operation on its dependency. The Compose reference excludes automatic restarts performed by the container runtime after a container dies, so this option is not a general guarantee that dependents recover from runtime crashes.

Rank #4
Sale
CyberPower ST425 Standby UPS Battery Backup and Surge Protector | 425VA/260W, 8 Outlets, Compact, UL Certified
  • 425VA/260W Standby Uninterruptible Power Supply (UPS): Uses simulated sine wave output to provide battery backup power and to safeguard home office, home entertainment including computers, gaming consoles, and broadband routers
  • 8 NEMA 5-15R OUTLETS: Four battery backup & surge protected outlets; Four surge protected outlets; INPUT: NEMA 5-15P right angle, 45 degree offset plug with five foot power cord
  • ADDITIONAL FEATURES: LED status light indicates Power-On and Wiring Fault, transformer-spaced outlets
  • GREENPOWER UPS HIGH EFFICIENCY DESIGN: Reduces power consumption by utilizing a compact charger and power inverter to create an ultra-efficient backup power system for home and office use
  • 3-YEAR WARRANTY – INCLUDING THE BATTERY; 75K USD Connected Equipment Guarantee; UL SAFETY CERTIFIED: Product has been tested in a UL certified lab and listed with UL as meeting or exceeding safety standards

What a UPS can and cannot do

A UPS battery backup for a home server can keep a host and networking equipment powered through a short disturbance. Its runtime falls as the connected load increases, so sizing depends on the host, storage, switch, router and any other equipment you connect, plus the number of minutes you want to bridge.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

With compatible shutdown software, a UPS can signal a graceful shutdown during a prolonged outage. That is often preferable to allowing a battery to drain completely: the host can close services and shut down before power is exhausted. When utility power returns, automatic boot and Docker daemon startup still depend on the host’s firmware and operating-system settings.

A UPS does not prevent downtime caused by failed hardware, a corrupted operating system, a stopped Docker daemon, a container crash, a failed dependency or an unavailable internet connection. Treat it as power protection, not as a replacement for another host or a backup strategy.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to recover after the host returns

Use this sequence on a Linux host with systemd; adapt the service-management command if your operating system uses a different init system.

Best Value
Sale
CyberPower EC850LCD Ecologic UPS Battery Backup and Surge Protector | 850VA/510W, 12 Outlets, ECO Mode, Compact, UL Certified
  • 12 NEMA 5-15R OUTLETS: Six battery backup & surge protected outlets; Six surge protected outlets (Three ECO controlled); INPUT: NEMA 5-15P right angle, 45 degree offset plug with five foot power cord
  • MULTIFUNCTION LCD PANEL: Displays immediate, detailed information on battery and power conditions
  • ECO MODE: When the UPS detects a computer is off or in sleep mode, it will automatically turn off power to computer peripherals connected to ECO mode outlets, reducing power usage and lowering energy costs
  • 3-YEAR WARRANTY – INCLUDING THE BATTERY; $100,000 Connected Equipment Guarantee and FREE PowerPanel Personal Edition Management Software (Download)
  1. Confirm the host is reachable. Check local console access or connect over SSH. If neither works, the problem is still at the power, hardware, boot or network layer, not inside Docker.
  2. Check Docker’s daemon state. Run sudo systemctl status docker. If it is stopped and the host is otherwise healthy, start it with sudo systemctl start docker. Review the system journal if startup fails.
  3. List all containers and their states. Run docker ps -a. This distinguishes running containers from exited containers and shows whether the expected services were created on this host.
  4. Inspect restart policy for a stopped container. Run docker inspect -f '{{.HostConfig.RestartPolicy.Name}}' CONTAINER, replacing CONTAINER with the container name or ID. A result of no explains why it did not return automatically.
  5. Check logs and exit information. Use docker logs CONTAINER and inspect the application’s own error messages. A restart loop may indicate a bad configuration, an unavailable dependency, a permission problem or a migration that failed.
  6. Bring the Compose project up when policy is insufficient. From the directory containing the Compose file, run docker compose ps, then docker compose up -d. This creates or starts the declared services and applies the current configuration.
  7. Verify readiness, not just process existence. Check Compose health status, open the service locally, and then test it from the network where users normally connect. A container can be running while its application is still initializing.
  8. Check the network path. Verify the host’s address, DNS, router, firewall, reverse proxy and any external connection. If local requests work but remote requests fail, the Docker restart policy has already done its job; the remaining fault is outside container startup.

Designing a single-host setup that recovers predictably

Make host startup explicit

Enable Docker to start with the operating system when your distribution supports that configuration, and test it rather than assuming it. Also verify firmware settings if you expect the machine to power on automatically after an outage. A restart policy is useful only after the daemon is available.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a policy service by service

Use unless-stopped for services that should return after an unplanned reboot but remain down when you intentionally stop them. Use always when the service should be brought back after daemon startup regardless of its previous state. Use on-failure when non-zero exits should be retried, optionally with a maximum number of attempts. Leave maintenance or one-shot jobs at no when automatic execution would be undesirable.

Add health checks where readiness matters

Define a health check for each dependency whose process can start before it is usable. Gate dependent services with service_healthy instead of relying on container creation order. Keep application-level retries as well, because dependencies can become unavailable after the initial startup sequence.

Test the complete recovery path

A configuration is not proven by reading its YAML. During a maintenance window, stop the host, restore it, and observe whether the machine boots, Docker starts, containers are recreated or restarted, health checks become healthy, and clients can connect. Test a deliberate container stop separately so you know how the selected policy behaves after manual intervention.

Failure scenarios and the right response

Scenario Likely result First response
Short power interruption A UPS may keep the host online; without one, all services stop until the host boots. Check UPS load and runtime, then verify automatic boot and Docker startup.
Extended outage The UPS may initiate a graceful shutdown, after which services remain offline until power is stable. Allow orderly shutdown, restore power, and follow the host recovery sequence.
Container exits with code zero on-failure does not restart it; other policies may, depending on state. Inspect the application’s intended exit behavior before changing policy.
Container exits non-zero on-failure, always or unless-stopped may retry it. Read logs and check whether repeated retries create a crash loop.
Database starts slowly The application may start first and report connection errors. Add a database health check, use service_healthy, and retain runtime retries.
Host is running but clients cannot connect Containers may be healthy while DNS, routing, firewall or internet access is broken. Test locally on the host, then trace the network path outward.

What restart policies do not guarantee

  • They do not repair a failed host, disk, power supply or operating system.
  • They do not start containers while the Docker daemon is stopped.
  • They do not make a home network, DNS service or internet connection available.
  • They do not prove that an application’s dependencies are ready.
  • They do not fix a container that repeatedly crashes because of bad configuration or corrupted state.
  • They do not provide a second host. A single Docker host remains a single point of failure.

Docker’s official guidance is direct: “Docker recommends that you use restart policies, and avoid using process managers to start containers.” That advice improves recovery from eligible container and daemon events, but the host and network still need their own availability plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

DockerDocker ComposeHome Serverself-hostingsystem administrationUPS

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.