> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/wifi-pineapple-pager/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/wifi-pineapple-pager/external-packages.md).

# External Packages

The WiFi Pineapple Pager is built on top of the OpenWRT embedded Linux distribution.

OpenWRT includes a package management tool - `opkg` - and a collection of third-party packages.

These can be installed on the Pineapple Pager to add additional tools, however there are some precautions to follow. Read on for more information!

### Advanced users  <a href="#advanced-users" id="advanced-users"></a>

Installing third-party packages is done via the command line, and may have unforseen consequences.

Payloads which require external packages may ask to install them automatically. Installing packages manually *may* cause issues with available space, compatibility, or enabling services which disrupt normal operation of your Pineapple Pager. Only install third-party packages if you know the implications of the tool and if you are willing to risk a factory reset if the package causes conflcits. While **most** packages are fine, it is impossible to know that **every** package is compatible!

{% hint style="warning" %}
**NEVER** use opkg to update pre-installed system packages! Doing so will most likely break your device or lead to unusable core features. OpenWRT isn’t designed like a normal Linux distribution, and bulk-upgrading system packages will nearly always cause problems!
{% endhint %}

### Installation locations  <a href="#installation-locations" id="installation-locations"></a>

By default, `opkg` installs to the *root overlay of the device*. The root overlay is the remainder of the internal boot flash, after the core firmware is installed. Typically this is a **very limited** amount of space: less than 32MB is available after the WiFi Pineapple Pager firmware is installed. Completely filling the overlayfs may cause problems with your device.

`opkg` can install to the **mmc**, which is a 4GB storage device where `/root`, payloads, loot, and themes are also installed. When installing large third-party packages, it is always a good idea to install to the MMC partition:

```bash
root@pager:~# opkg install -d mmc python3
```

{% hint style="info" %}
Use `opkg install -d mmc ...` to install packages to the much larger mmc partition!
{% endhint %}

### Packages and upgrading  <a href="#packages-and-upgrading" id="packages-and-upgrading"></a>

Packages installed to the *root overlay* **will not persist over a firmware upgrade**. Upgrading the firmware rebuilds the internal flash partitions, saving only specific configuration files.

Packages installed to *mmc* **will** persist over a firmware upgrade. It is possible that an upgrade to a future major release will break installed packages, however, depending on changes in the firmware. If, after an upgrade to a future *major release*, installed third-party binaries return an error, it may be necessary to update or reinstall them.

### Installing packages  <a href="#installing-packages" id="installing-packages"></a>

To install packages with `opkg` from the OpenWRT repository, your Pager needs Internet access.

To install third-party packages, first you must update the package listing. This is similar, for instance, to performing an `apt update` command on Debian or Ubuntu.

```bash
root@pager:~# opkg update
```

Once the opkg database is updated, packages can be found via `opkg list`. Combine this with `grep` to find a specific package by name:

```bash
root@pager:~# opkg list | grep python3
```

Packages can then be installed using `opkg install`. Remember to use `opkg install -d mmc` to install packages to the larger MMC partition!

### Python and PIP  <a href="#python-and-pip" id="python-and-pip"></a>

When installing Python packages, always prefer a packaged solution for a module. OpenWRT includes many Python3 modules pre-packaged.

Installing a Python package via Pip may trigger compiling C native code or other dynamic components. Typically compiling on the Pager directly is not supported and will have mixed results at best.

### Disclaimer  <a href="#disclaimer" id="disclaimer"></a>

**REMEMBER**: Installing third-party packages via `opkg` is done **at your own risk**. Changing system configuration or packages outside of the Pineapple environment, or installing different versions of system packages, may break Pineapple services.

As always, Hak5 supports the idea that you should be able to do whatever you want with your own hardware - but we cannot guarantee that third party packages will be compatible.

As always, [factory reset](https://docs.hak5.org/wifi-pineapple-pager/recovery/factory-reset/) and in extreme cases, [firmware recovery](https://docs.hak5.org/wifi-pineapple-pager/recovery/firmware-recovery/) options exist if a package prevents your Pager from operating properly.

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.hak5.org/wifi-pineapple-pager/external-packages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
