# Install FeatherWings

> Install FeatherWings on a node with the command the panel generates, the installer or APT, then connect it with featherwings configure.

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

Wings needs a 64-bit Linux host with Docker Engine and a kernel that can run containers. Check the
[requirements](https://featherpanel.com/docs/getting-started/requirements) first, in particular the notes on LXC and OpenVZ.

## 1. Create the node in the panel

In the admin area open Nodes, create a node and give it a name, a location and the FQDN the node will answer on. Point a
DNS record for that FQDN at the node. Use a name, not an IP address, if you want HTTPS: browsers connect to Wings
directly for the console and file uploads.

The node page then shows a Quick setup box with two commands.

## 2. Install the daemon

The first command installs Wings with the installer and skips its wizard:

```bash
curl -sSL https://get.featherpanel.com/installer.sh | env FP_COMPONENT=wings FP_ACTION=install FP_WINGS_SKIP_CONFIGURE=true bash
```

The installer installs Docker if needed, creates the directories under `/var/lib/featherpanel`, and installs Wings in one
of two ways:

<div role="tablist" class="tabs tabs-border fpd-tabs" data-sync="wings-method">
<input type="radio" name="wings-method" class="tab" aria-label="APT (recommended)" checked />
<div class="tab-content">

Adds the MythicalSystems APT repository and installs `featherwings` (stable, from tagged releases) or
`featherwings-dev` (nightly, every commit to `main`). The two packages conflict; installing one replaces the other.

```bash
curl -fsSL https://apt.mythicalsystems.org/repository/keys/public.gpg \
  | sudo gpg --dearmor -o /etc/apt/keyrings/mythicalsystems.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/mythicalsystems.gpg] https://apt.mythicalsystems.org/repository/MythicalSystems/ stable main" \
  | sudo tee /etc/apt/sources.list.d/mythicalsystems.list
sudo apt-get update && sudo apt-get install -y featherwings
```

</div>
<input type="radio" name="wings-method" class="tab" aria-label="Binary" />
<div class="tab-content">

Downloads `wings_linux_amd64` or `wings_linux_arm64` from the latest GitHub release to `/usr/local/bin/featherwings` and
writes `/etc/systemd/system/featherwings.service`.

```bash
sudo curl -L -o /usr/local/bin/featherwings \
  "https://github.com/MythicalLTD/FeatherWings/releases/latest/download/wings_linux_$([[ "$(uname -m)" == "x86_64" ]] && echo amd64 || echo arm64)"
sudo chmod +x /usr/local/bin/featherwings
```

</div>
</div>

Choose the method with `FP_WINGS_METHOD=apt|direct` and the channel with `FP_WINGS_CHANNEL=stable|nightly` when you
run the installer unattended.

## 3. Connect it to the panel

The second command from the node page runs `featherwings configure`:

```bash
sudo featherwings configure --panel-url 'https://panel.example.com' --install-service
```

In a terminal this starts a wizard. It asks you to authorize FeatherWings in your browser, creates or joins the node,
checks DNS, gets a TLS certificate when needed, writes `/etc/featherpanel/config.yml` and installs and starts the
`featherwings` service. The temporary API key it used is removed from the panel afterwards unless you pass
`--keep-oauth-key`.

If the wizard cannot run interactively, copy the join data from the node page ("Advanced: join data only"):

```bash
sudo featherwings configure --join-data '<value>' --override --install-service
```

The full flag list is in the [Wings CLI reference](https://featherpanel.com/docs/wings/cli).

## 4. Check the node

```bash
systemctl status featherwings
journalctl -u featherwings -n 100 --no-pager
```

The node turns green in the panel when the panel can reach the Wings API. Then add allocations (IP and port pairs) to
the node and create a server on it.

## Firewall

Open these ports on the node, plus the game ports you allocate:

| Port | Purpose |
|------|---------|
| `8080/tcp` | Wings API and console websocket, reached by the panel and by browsers |
| `2022/tcp` | SFTP |
| `80/tcp` | FastDL, only when enabled. See [Firewall and FastDL](https://featherpanel.com/docs/wings/firewall-and-fastdl) |

## Frequently asked questions

### Can FeatherWings run on the same server as the panel?

Yes. The panel only publishes port 4831, and Wings uses 8080 and 2022 by default. Put the panel behind a reverse proxy and give Wings its own hostname.

### Which Docker package does FeatherWings need?

Docker Engine (docker-ce) from Docker's own APT repository. The FeatherWings README asks you not to use the distribution's docker.io package, which conflicts with docker-ce.
