DockNest
Backs up Docker and static nginx sites on your Linux servers over SSH to encrypted SFTP or S3-compatible storage, and restores any recovery point to a separate copy so you can check it works.
Backs up Docker and static nginx sites on your Linux servers over SSH to encrypted SFTP or S3-compatible storage, and restores any recovery point to a separate copy so you can check it works.
<div align="center">
<img src="docs/media/logo-teal.png" alt="DockNest" width="320" />
<h3>Worry less. Sleep more. Restore anytime.</h3>
<p><strong>Backup & Restore for Self-Hosted Apps</strong></p>
<a href="https://github.com/DahanItamar/DockNest/releases/latest"><img src="https://img.shields.io/github/v/release/DahanItamar/DockNest?style=flat-square&label=version&color=0D786C&sort=semver&display_name=tag" alt="Latest release" /></a>
<a href="https://github.com/DahanItamar/DockNest/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/DahanItamar/DockNest/ci.yml?branch=main&style=flat-square&label=verify" alt="Verify workflow status" /></a>
<img src="https://img.shields.io/badge/deployment-self--hosted-0D786C?style=flat-square" alt="Self-hosted" />
<a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-0D786C?style=flat-square" alt="License: AGPL-3.0" /></a>
</div>
<p align="center">
<a href="#install">Install</a> ·
<a href="#using-docknest">Using DockNest</a> ·
<a href="#updating">Updating</a> ·
<a href="#documentation">Documentation</a> ·
<a href="https://github.com/DahanItamar/DockNest/releases/latest">Latest release</a> ·
<a href="https://trydocknest.com">Website</a>
</p>

## What it does
DockNest is a self-hosted web app. It connects to your Linux servers over SSH, backs up each Docker or static nginx site to storage you own, and lets you restore any backup to a separate copy to check that it works.
- Discovers the Docker projects and static nginx sites on each server you connect.
- Backs up each app on its own schedule to encrypted SFTP or S3-compatible storage. Connect storage starts with a provider (own server or NAS, Hetzner, rsync.net, MinIO, Amazon S3, Cloudflare R2, Backblaze B2, Wasabi or another) and fills in its defaults.
- Verifies recovery points and restores them to a separate copy. The live app is not overwritten.
- New in 3.0.0 (3.0.1-3.0.2 make the browser tab icon follow your accent colour): a notification center; measured recovery time per app; monthly client reports as a PDF, downloaded or emailed; cloud drives as storage (Google Drive, OneDrive, Dropbox, WebDAV, SMB, a local folder); NAS servers (TrueNAS SCALE; Unraid and Synology as early access in Settings); Podman and rootless Docker apps; security hardening (12 to 128 character system passwords, sign-in pause after repeated failures, checksum-pinned helper images); a new look with a choice of accent colour (Settings > Appearance), with a smooth fade when you change it or switch light and dark.
- Shows live progress, the steps of each job and the reason when one fails.
> [!NOTE]
> DockNest runs real Docker and static sites in production, and every release passes real Linux Docker tests. The [support matrix](docs/support-matrix.md) lists the tested configurations.
## Features
**Backup and restore**
- Captures images, volumes, bind mounts, writable layers and databases. Database capture is handled for PostgreSQL, MySQL/MariaDB, Redis/Valkey and MongoDB. PostgreSQL, MySQL, MariaDB, Redis and Valkey can also stay running while a consistent dump is taken ([online dumps](docs/online-dumps.md), opt-in per app in the app settings). SQLite files you declare are checked and captured, and you can edit that list per service in the app settings.
- Per-app schedules, retention, and pinned backups.
- Adding an app hides containers that are already backed up on that server, and DockNest refuses a duplicate that would back up the same container twice.
- Restore to a separate copy; DockNest does not replace a live app by itself.
- Apps started with plain `docker run` are backed up too, with a readable Compose file and env files in the encrypted backup that recreate them with the same settings.
- Restore copies, restore tests and moves keep the original's protections (read-only root, dropped capabilities, no-new-privileges, seccomp and AppArmor), or refuse with a clear reason.
- Automatic restore tests: on a schedule, DockNest restores the latest verified backup onto a test server, starts it in isolation, checks it and removes it. It can also test the copy on your second storage, never falling back to the main backup. See [restore tests](docs/restore-tests-guide.md).
- Restore check: Check readiness also lists what a restore on a new server would miss, such as cron jobs and systemd timers that use the app, Docker networks it does not create itself and its certificates. Commands and values from those files are never shown. See [restore check](docs/restore-check.md).
- Keep up to three extra copies of each backup on other storage, for example SFTP plus S3, each with its own retention.
- Download a backup as an encrypted file or as a ZIP. An increment downloads as a chain (encrypted packages plus an order file) from the backup library.
- Incremental backups (off by default): a full backup, then increments that hold only the files that changed in your mounts. Every restore point still restores to a complete copy. Images are saved as before, so the saving comes from mount data. After a backup that contains folder renames, the next backup is full. See [incremental backups](docs/incremental-backups.md).
- Optional maintenance page, designed in a visual editor, while an app is paused. For apps behind nginx on the server, DockNest sets it up, tests it on your domain and undoes it if anything fails.
**Operation**
- Jobs page with transfer progress, a step timeline and plain-language error explanations.
- DockNest can back up its own data to your storage. See [self-backup](docs/docknest-self-backup.md).
- A recovery kit restores DockNest and rebuilds backups without it. See [independent recovery](docs/independent-recovery.md).
- After every Self Backup, DockNest checks that the new recovery kit opens and holds the right key, and alerts you if it does not. See [kit check](docs/emergency-kit.md#kit-check).
- NAS support: connect TrueNAS SCALE systems (root or a passwordless-sudo user, with a helper runtime container when the NAS has no Python), see readiness on the Map, and find the apps the NAS manages. Unraid and Synology DSM are early access: they are off by default (switches under Settings), and until you turn them on they connect as normal Linux servers with Docker. See [NAS servers](docs/nas-servers.md).
- Recovery Guide: plain steps and the exact commands to bring every app back on a new server, as a PDF to print or keep with the emergency kit, also in Hebrew. Open it from Recovery Guide in the menu, choose the apps and what goes in, and download. A copy without logins is saved next to the recovery kit after every Self Backup. See [Recovery Guide](docs/recovery-guide.md).
- Optional emergency kit: split access between trusted people, so that K of N of them together can open the kit with their 33-word parts, offline. Off by default; one passphrase stays the default. See [emergency kit](docs/emergency-kit.md).
- Storage page with space per app and per destination, and growth over time. Backups can also go to Google Drive, OneDrive, Dropbox, WebDAV, an SMB share or a mounted local folder. See [cloud drives](docs/cloud-drives.md).
- Notification center: a bell and a Notifications page for backups, restores, restore tests, storage and system events, with unread counts, filters, Archive, and toasts for new problems. See [notifications](docs/notifications.md).
- Clients: group apps per client and make a monthly PDF proof page, downloaded or emailed on day 1 to up to 3 recipients. See [client reports](docs/client-reports.md).
- Server cleanup: preview the space unused Docker images, stopped containers, anonymous volumes and old build cache take, then clean after you confirm. Anything an app, backup, restore test or move still needs is kept. See [server cleanup](docs/server-cleanup.md).
- Hardening score: each app gets a grade from A to F with a plain fix for each finding, such as a mounted Docker socket or a database port open to the network. Read-only; it never changes the app. See [hardening score](docs/hardening-score.md).
- Backup coverage: on the Apps page and the Map, see which containers and volumes on a server no app backs up, add them as an app, or skip them on purpose with a note. It reads Docker only when you open it. Adding a plain `docker run` container previews the Compose file DockNest keeps for it.
- Portainer and Dockge stacks: adding an app finds the stack's Compose file in the manager's stacks folder and shows which manager runs it. Read-only; the manager is never changed. See [app setup](docs/site-setup.md).
- Linked apps: each server scan shows which apps depend on each other, such as a database, network or volume they share, and which containers they use that no app backs up. Read-only and warn-only. See [linked apps](docs/linked-apps.md).
- Update Center with an opt-in update check and click-to-update through a host updater.
- Problem reports that open a pre-filled public GitHub issue with typed values only, after you review what is shared.
- A refreshed interface (design system v2) in light and dark themes, with a layout for phones and a sign-in page where the password dots and code digits animate as you type.
**Map and moving apps**
- A Map page shows your servers, their apps and your backup storage as connected nodes. Click any node for its details, such as the databases that move with an app.
- The "+" on a server lists apps DockNest found there that you have not added yet.
- Administrators can launch a new Docker app from a server on the Map from a Compose file or Git repository, with backups from the first day. See [launch a site](docs/launch-site-guide.md).
- Administrators move an app to another server by dragging it to that server and pressing Save changes. DockNest shows how long the move takes and how long the app is offline, then backs up the app, tests a copy on the new server and waits for your DNS change before switching.
- The old copy is kept stopped for 7 days, so you can switch back. Removing it is never automatic. See [moving apps](docs/moving-sites.md).
- When the new server is missing nginx, Docker, Docker Compose or certbot, DockNest can install it for you after you confirm, or show you the command to run yourself.
- Domain checks follow each domain of an app through DNS, the proxy (nginx, Nginx Proxy Manager, Caddy or Traefik), the app and its certificate, and name the broken step in plain words. On the Map they are a Domains column that you can hide, coloured by the broken step, and each app lists its domains; a domain's panel has Check again. They run when you ask and after scans, readiness checks and backups, never on a timer, and only read. Before a move, the preview lists every domain that stops working. See [domains](docs/domains.md).
**Safe changes**
- Administrators change an app's Compose file, environment values, published ports or image tag from DockNest. Each change takes a backup first, shows the maintenance page, checks the app comes up and undoes the change by itself when it does not. Environment values are write-only (they can be replaced or removed), a finished Compose change can be undone, and a change can never add privileges the app did not have. See [Safe Edit](docs/safe-edit-guide.md).
- Self-heal (off by default): when Docker marks a container of an app unhealthy, DockNest restarts it a few times per hour at most and tells you through your alert lines. It never restarts during a backup, restore, move or change of that app, and works while DockNest is running. See [self-heal](docs/self-heal-guide.md).
**Alerts**
- Get an alert in Telegram, email, WhatsApp, Discord, Slack, Microsoft Teams, Google Chat, Mattermost, ntfy, Gotify, Pushover, Matrix or a webhook when a backup fails or passes, a scheduled backup is missed (for example DockNest was down at the time), a move finishes or needs you, a server is unreachable or low on disk, an app's certificate is about to expire or failed to renew, or a new version is out.
- Save the login once in Administration, Connections (encrypted, never shown again), then add an alert node on the Map, draw a line from DockNest, a server or an app, and pick the events. See [alerts](docs/alerts.md).
**Security**
- Keys safe: DockNest finds the encryption keys apps keep in their settings (such as Laravel `APP_KEY`, n8n, Rails, authentik, Paperless-ngx, Outline, Gitea, Nextcloud and Vaultwarden) and checks that each one is inside the last backup, without ever reading the key into DockNest. A restore test confirms the restored copy has the same keys. It also tells you when an app's Compose or env files change outside Safe Edit. See [keys safe](docs/keys-safe.md).
- Keys safe on screen: a padlock on the Map and a Keys line on each app card show whether the keys are in the last backup; the app panel lists each key's name, place and short fingerprint (never the key), and Self Backup shows the Recovery kit check.
- Backups are encrypted with AES-256-GCM.
- Optional S3 Object Lock: backups cannot be deleted or changed until the date you set, even by DockNest.
- Append-only SFTP: DockNest detects a storage account that refuses deletes and overwrites and keeps working with it. While the storage server enforces this, ransomware that reaches DockNest cannot delete or overwrite backups already stored there (files written before need to be made read-only on the server).
- SSH host keys are pinned and checked before connecting.
- Every user signs in with a password and an authenticator app.
- The dashboard never uses the Docker socket.

<table>
<tr>
<td width="50%"><img src="docs/media/servers.png" width="100%" alt="Servers page with three synthetic servers" /></td>
<td width="50%"><img src="docs/media/backups.png" width="100%" alt="Backup library listing recovery points per synthetic app" /></td>
</tr>
<tr>
<td width="50%"><img src="docs/media/update-center.png" width="100%" alt="Update Center showing an available update and the host updater status" /></td>
<td width="50%"><img src="docs/media/job-details.png" width="100%" alt="Job details for a running backup of a synthetic app, with transfer progress and a step timeline" /></td>
</tr>
<tr>
<td width="50%"><img src="docs/media/self-backup.png" width="100%" alt="Self Backup page with the latest recovery kit and recovery settings" /></td>
<td width="50%"><img src="docs/media/login.png" width="100%" alt="Sign-in page with a password field showing typed dots" /></td>
</tr>
<tr>
<td width="50%"><img src="docs/media/dashboard-dark.png" width="100%" alt="Dashboard in the dark theme" /></td>
<td width="50%"><img src="docs/media/self-backup-dark.png" width="100%" alt="Self Backup page in the dark theme" /></td>
</tr>
</table>
New in 3.0.0, with synthetic data:
<table>
<tr>
<td width="50%"><img src="docs/media/recovery-time.png" width="100%" alt="Dashboard apps list with a recovery time line under each last test" /></td>
<td width="50%"><img src="docs/media/client-report.png" width="100%" alt="Client report preview with one row per app and a Download PDF button" /></td>
</tr>
<tr>
<td width="50%"><img src="docs/media/cloud-drives.png" width="100%" alt="Storage page with a Google Drive destination card" /></td>
<td width="50%"><img src="docs/media/nas-server.png" width="100%" alt="Map panel of a NAS with its readiness list" /></td>
</tr>
<tr>
<td width="50%"><img src="docs/media/podman-app.png" width="100%" alt="Apps page with a Podman rootless engine badge on an app" /></td>
<td width="50%"><img src="docs/media/accent-colours.png" width="100%" alt="Settings with the five accent colours, Teal selected" /></td>
</tr>
</table>
<!-- Screenshots for Recovery Guide, Keys safe and Domains are added when their pages land. -->
## Requirements
| Where | What you need |
| :-- | :-- |
| DockNest host (runs the dashboard) | Linux with Docker and Docker Compose, and Node.js 24 for the one-time setup. |
| Each server you back up | Linux, Docker, Python 3.9 or newer and SSH with a key. Root access, and free disk space for a temporary copy (or use direct streaming). |
| Backup storage | SFTP server that supports `fsync@openssh.com`, or an S3-compatible bucket. S3-compatible storage is supported: backup and restore are validated against a MinIO-compatible server, and Cloudflare R2 passed a manual run; other providers are not tested on every release. See [storage backends](docs/storage-backends.md). |
| You | A browser and an authenticator app. |
## Install
### Build from source (default)
```sh
git clone https://github.com/DahanItamar/DockNest.git
cd DockNest
npm ci
npm run setup
```
Setup creates `.env`, `data/master.key` and `data/setup.token`. Keep them private and keep a safe copy of `data/master.key`. Without it your backups cannot be decrypted, and resetting the password does not help.
Point a domain at the host, open ports 80 and 443, and set these in `.env`:
```dotenv
APP_DOMAIN=backup.example.com
APP_ORIGIN=https://backup.example.com
SECURE_COOKIES=true
```
Start everything. Caddy obtains the HTTPS certificate:
```sh
docker compose --profile https up -d --build
```
If you already run an HTTPS reverse proxy, leave out `--profile https`. See [Deployment](docs/deployment.md).
### Published image (alternative)
Final releases are published as a signed `linux/amd64` image, `ghcr.io/dahanitamar/docknest`. Set `DOCKNEST_IMAGE` in `.env` to a tag and use `compose.override.example.yaml` as your `compose.override.yaml`. The steps and the signature check are in [Use the published image](docs/upgrading.md#use-the-published-image). On ARM hosts, build from source.
### Try it locally
```sh
npm ci
npm run setup
npm run build
npm start
```
In a second terminal run `npm run worker`, then open http://127.0.0.1:3000. On Windows PowerShell, use `npm.cmd` if `npm` is blocked.
## Using DockNest
1. **Sign in.** Use the setup token from `data/setup.token`, add your authenticator app and save the recovery codes.
2. **Connect storage** under **Storage**.
3. **Add a server** and confirm its SSH fingerprint. See [server connection](docs/server-connection.md).
4. **Add an app.** DockNest discovers Docker projects and static nginx sites; review what it found. See [app setup](docs/site-setup.md).
5. **Check readiness.** The maintenance page is optional. Without it, visitors may see an error for the few seconds a Docker app is stopped.
6. **Run a backup**, then watch it under **Jobs**.
7. **Verify and restore.** Restore a recovery point to a separate copy to confirm it works. See [recovery verification](docs/recovery-verification.md).
8. **Turn on the schedule** for the app.
Notes:
- ZIP downloads are not encrypted and can contain passwords and keys. Keep them private.
- To set or change the password on Windows, run `scripts\set-admin-password.ps1`.
## Updating
Version numbers and release notes are on the [latest release](https://github.com/DahanItamar/DockNest/releases/latest) page, and in the [changelog](CHANGELOG.md).
**From the app.** Administrators have an **Update Center** page. Nothing contacts GitHub until an administrator agrees once; after that DockNest checks the public release list daily. An update starts only when an administrator confirms with the password and an authenticator code. It runs through a small root service on the host, the host updater, which you install once on the DockNest host (Linux with systemd and rootful Docker; not Docker Desktop or rootless Docker):
```sh
sudo scripts/install-updater.sh
```
**From the command line.** The updater is optional. Without it:
```sh
scripts/upgrade.sh # newest final release
scripts/upgrade.sh --dry-run # show the plan only
```
With the host updater installed, a command-line upgrade that cannot register the new version itself (for example a checkout not owned by root) ends by printing the `sudo scripts/install-updater.sh --repair` command to run.
Upgrading from 2.16.x to 3.0.0 adds only compatible database tables (migrations 19 to 28), so rolling back to 2.16.x works without restoring a snapshot; see [Upgrading to 3.0.0](docs/upgrading.md#upgrading-to-300). Worth knowing before you update:
- 3.0.0 backups of Podman and rootless apps use backup format 3 (`formatVersion: 3`); 2.16 and older cannot read or restore them. Docker apps keep the older format.
- New system passwords must be 12 to 128 characters; existing passwords keep working.
- Cloud drives use a bundled rclone that exists for `linux/amd64` only.
- A NAS (TrueNAS; Unraid and Synology when enabled) connects as root, or as a non-root SSH user with passwordless sudo.
- Moving an app between container engines is not supported yet.
Before going back to 2.11 from 2.12, turn incremental backups off for every app, then make a backup. Details, rollback and exit codes: [Upgrading](docs/upgrading.md) and [Host updater and Update Center](docs/upgrading.md#host-updater-and-update-center). The in-app update path is in use on a real Linux Docker host.
## Security and privacy
- Backups are encrypted, SSH host keys are pinned, and sign-in needs a password plus an authenticator app.
- Backups never copy password files, sudo rules or SSH and GPG keys, including `.ssh` and `.gnupg` folders inside mounted host folders (Docker volumes are copied whole); the job result names what was left out. Restored files never keep setuid or setgid bits.
- Update checks are off until an administrator opts in, and send nothing about your servers, apps or users. See [outbound requests](docs/security.md#update-checks-outbound-requests).
- Problem reports contain typed values only (no names, addresses, paths or error text), you review them first, and the server sends nothing. See [problem reports](docs/security.md#problem-reports).
Full model: [docs/security.md](docs/security.md). Report vulnerabilities privately as described in [SECURITY.md](SECURITY.md).
## Documentation
| Topic | Guides |
| :-- | :-- |
| Setup | [Deployment](docs/deployment.md) · [Server connection](docs/server-connection.md) · [App setup](docs/site-setup.md) · [Storage backends](docs/storage-backends.md) · [Cloud drive setup](docs/cloud-drive-setup.md) · [Moving apps](docs/moving-sites.md) · [Domains](docs/domains.md) · [Safe Edit](docs/safe-edit-guide.md) · [Self-heal](docs/self-heal-guide.md) · [Alerts](docs/alerts.md) · [Server cleanup](docs/server-cleanup.md) · [Hardening score](docs/hardening-score.md) · [Linked apps](docs/linked-apps.md) · [Keys safe](docs/keys-safe.md) |
| Recovery | [Support matrix](docs/support-matrix.md) · [Database contracts](docs/database-contracts.md) · [Recovery verification](docs/recovery-verification.md) · [Independent recovery](docs/independent-recovery.md) · [Restore check](docs/restore-check.md) · [Restore tests](docs/restore-tests-guide.md) · [Incremental backups](docs/incremental-backups.md) · [Self Backup](docs/docknest-self-backup.md) · [Kit check and emergency kit](docs/emergency-kit.md) · [Recovery Guide](docs/recovery-guide.md) |
| Internals | [Backup format](docs/backup-format.md) · [Remote helper](docs/remote-helper.md) · [Security](docs/security.md) · [History API](docs/history-api.md) · [Interface design](docs/design/DESIGN.md) |
| Upgrades | [Upgrading and rollback](docs/upgrading.md) · [Update Center design](docs/update-center.md) · [Host updater threat model](docs/updater-threat-model.md) · [Release validation](docs/release-validation.md) |
| Quality | [Acceptance and limits](docs/acceptance.md) · [Repository privacy](docs/repository-privacy.md) |
## Support and contributing
- Bug or problem: open an [issue](https://github.com/DahanItamar/DockNest/issues/new/choose), or use **Report a bug** under Settings > About in the app.
- Questions and ideas: [Discussions](https://github.com/DahanItamar/DockNest/discussions).
- Security issues: privately, see [SECURITY.md](SECURITY.md).
- Contributing: [CONTRIBUTING.md](CONTRIBUTING.md) covers setup and the checks every pull request runs.
## License
[GNU AGPL-3.0](LICENSE). Bundled fonts and dependencies keep their own licenses.
DockNest is a self-hosted web app for backing up the sites you run on your own servers. It connects to each Linux server over SSH, discovers its Docker projects and static nginx sites, and backs each one up on its own schedule to storage you own.
DockNest is in beta. Its support matrix lists what has been tested and what has not.
The DockNest host needs Linux with Docker and Docker Compose, plus Node.js 24 for the one-time setup:
git clone https://github.com/DahanItamar/DockNest.git
cd DockNest
npm ci
npm run setup
docker compose --profile https up -d --build
A signed linux/amd64 image is also published at ghcr.io/dahanitamar/docknest. See the deployment guide for details.
Build a full-featured home server with this playbook and an Ubuntu box.
Simple, easy-to-use, elegant Home Cloud system.
Open-core software allowing you to effortlessly self-host web apps on your server.
Run server applications securely and with built-in privacy features. It acts as a secure gateway to your application, as well as a server manager.
Modern server control panel powered by Docker.
Community project to develop, design and promote personal servers running free software for private, personal, communications.