# Update FeatherWings

> Update FeatherWings with APT, with featherwings update, or from the panel's Updates page, and switch between the stable and nightly channels.

Source: https://featherpanel.com/docs/wings/updating/

How you update depends on how you installed Wings.

## APT installs

```bash
sudo apt-get update && sudo apt-get install --only-upgrade featherwings
# nightly channel:
sudo apt-get update && sudo apt-get install --only-upgrade featherwings-dev
```

To switch channels, install the other package: `sudo apt-get install featherwings-dev` replaces `featherwings` and the
other way round. The installer's Wings menu has an Update entry that does the same.

Do not use the self-update below on an APT install. It replaces the binary behind the package manager's back, and the
next `apt upgrade` overwrites it again.

## Binary installs

```bash
sudo featherwings update
```

`featherwings update` downloads `wings_linux_{arch}` from the latest release of `mythicalltd/featherwings` and runs
`systemctl restart featherwings` afterwards. Useful flags:

| Flag | Meaning |
|------|---------|
| `--force` | Update even if the installed version is the latest |
| `--from-url <url>` | Download the binary from this URL instead of GitHub |
| `--from-url-sha256 <hash>` | Expected checksum for `--from-url` |
| `--repo-owner`, `--repo-name` | Use another GitHub repository |

> [!WARNING]
> `system.updates.disable_checksum` defaults to `true` in `config.yml`, which skips checksum checks for every self-update.
> Set it to `false` if you want updates verified.

## From the panel

The admin Updates page lists the Wings version of each node and can update nodes that report self-update support. The
panel calls the Wings API, which performs the same self-update. It is controlled by `system.updates.allow_api` in
`config.yml` (default `true`).

## Moving from a binary install to APT

Keep `/etc/featherpanel/config.yml`, stop the old service, add the APT repository and install the package. The package
keeps an existing config and restarts the service, so you do not need to run `featherwings configure` again:

```bash
sudo systemctl stop featherwings
sudo apt-get install -y featherwings
sudo rm -f /etc/systemd/system/featherwings.service /etc/systemd/system/wings.service
sudo systemctl daemon-reload && sudo systemctl enable --now featherwings
```
