Skip to Content
🚀 We just launched! Please star us on Github!
DocumentationUpdating & Backup

Updating & Backup

Smart Panel is actively developed, and updates bring new features, bug fixes, and security patches. This guide covers how to safely update your installation and back up your data.


Before You Update

Always back up your data before updating. While updates include automatic database migrations, it’s good practice to have a recovery point.


Backup

Your Smart Panel stores two important files:

  • config/config.yaml — system configuration (plugins, weather, display settings)
  • data/database.sqlite — all devices, dashboards, users, and scenes

The location depends on your installation method:

Installation MethodApp LocationData LocationConfig
Pre-built Raspbian image/opt/smart-panel/current//var/lib/smart-panel//etc/smart-panel/environment
One-liner script or npm global/usr/lib/node_modules/@fastybird/smart-panel//var/lib/smart-panel//var/lib/smart-panel/config/
DockerInside containersmart-panel-data Docker volumeInside volume

Systemd Installations (image, npm, one-liner)

Stop the services

sudo systemctl stop smart-panel smart-panel-display

Create a backup

sudo tar czf ~/smart-panel-backup-$(date +%Y%m%d).tar.gz -C /var/lib/smart-panel .

For pre-built image installations, you may also want to back up /etc/smart-panel/environment which contains your environment configuration.

Restart the services

sudo systemctl start smart-panel smart-panel-display

Docker Installation

docker run --rm -v smart-panel-data:/data -v $(pwd):/backup alpine \ tar czf /backup/smart-panel-backup-$(date +%Y%m%d).tar.gz -C /data .

You don’t need to stop the Docker container to back up, but stopping it ensures data consistency.


Restore from Backup

Systemd Installations

sudo systemctl stop smart-panel smart-panel-display sudo tar xzf ~/smart-panel-backup-YYYYMMDD.tar.gz -C /var/lib/smart-panel sudo systemctl start smart-panel smart-panel-display

Docker Installation

docker compose down docker run --rm -v smart-panel-data:/data -v $(pwd):/backup alpine \ sh -c "rm -rf /data/* && tar xzf /backup/smart-panel-backup-YYYYMMDD.tar.gz -C /data" docker compose up -d

Updating

Pre-built Raspbian Image

When Smart Panel is installed from a pre-built Raspbian image, updates use a versioned directory layout:

/opt/smart-panel/ current -> v1.1.0/ # symlink to active version v1.0.0/ # previous version (kept for rollback) v1.1.0/ # current version

There are two ways to update: through the Admin UI or via the CLI.

Update via Admin UI

Open System Settings

Go to Settings → System in the Admin UI.

Check for updates

Click “Check for Updates”. The system will query GitHub Releases for a newer version.

Install the update

If an update is available, click “Install Update”. The system will:

  • Download smart-panel-server-vX.Y.Z-arm64.tar.gz from GitHub Releases
  • Extract it to /opt/smart-panel/vX.Y.Z/
  • Install production dependencies and rebuild native modules
  • Stop the service, switch the current symlink, run database migrations, and restart

Update via CLI

sudo smart-panel-service update

This performs the same steps as the Admin UI update.

How It Works

The image-based updater follows a safe, atomic process:

  1. Downloads the release archive from GitHub
  2. Extracts it to a new versioned directory (/opt/smart-panel/vX.Y.Z/)
  3. Installs production dependencies and rebuilds native modules
  4. Stops the service
  5. Switches the current symlink to the new version
  6. Runs database migrations
  7. Starts the service

If any step fails, the symlink is reverted to the previous version automatically.

The updater keeps a maximum of 2 previous versions on disk for rollback. Older versions are removed automatically.

Manual Rollback (Image Install)

If you need to manually revert to a previous version:

# List available versions ls -la /opt/smart-panel/
# Switch to a previous version sudo ln -sfn /opt/smart-panel/v1.0.0 /opt/smart-panel/current sudo systemctl restart smart-panel

Rolling back after a database migration may cause issues if the schema has changed. Always test updates on a non-critical setup first if possible.

Docker

docker compose pull docker compose up -d

The container automatically runs pending database migrations on startup.

One-Liner / npm Global Install

sudo smart-panel-service update

This downloads the latest version, runs migrations, and restarts the services.

Manual Tarball Install

Stop services

sudo systemctl stop smart-panel smart-panel-display

Download the latest release

curl -sL https://github.com/FastyBird/smart-panel/releases/latest/download/smart-panel.tar.gz \ -o /tmp/smart-panel.tar.gz

Extract over existing installation

sudo tar xzf /tmp/smart-panel.tar.gz -C /opt/smart-panel --strip-components=1

Install dependencies

cd /opt/smart-panel && pnpm install --production

Start services

sudo systemctl start smart-panel smart-panel-display

Database migrations run automatically when the backend starts.


Pinning a Version

Docker

Edit your docker-compose.yml to use a specific tag:

services: smart-panel: image: ghcr.io/fastybird/smart-panel:1.2.3

npm

npm install -g @fastybird/smart-panel@1.2.3

Rolling Back

If an update causes problems:

  1. Stop the services
  2. Restore your backup (see above)
  3. Install the previous version using the pinning method above
  4. Start the services

For pre-built image installations, rollback is simpler — just switch the symlink to a previous version as described in the Manual Rollback section above.

Rolling back after a database migration may cause issues if the schema has changed. Always test updates on a non-critical setup first if possible.


What’s Next?

Last updated on