Skip to content

Set up your hub

Your hub is the computer your phones plug into. Setting it up takes three steps: get a pairing code, run one command on the hub, and plug in a phone.

  • A Raspberry Pi 4 or 5 with Raspberry Pi OS Lite (64-bit), or a 64-bit Intel/AMD or ARM computer with Debian 12 or 13 or Ubuntu 22.04 or 24.04. For Windows, see below.
  • An account on it that can use sudo, and an internet connection (Ethernet if you can).
  • Your phones and USB cables that carry data, not charge-only cables.

A Pi works best dedicated to hosting. To set one up, write Raspberry Pi OS Lite (64-bit) to a microSD card with Raspberry Pi Imager; in Imager’s settings, choose a user name and password, your Wi-Fi if you don’t use Ethernet, and turn on SSH so you can log in from your computer. The 32-bit Raspberry Pi OS isn’t supported.

On pocketshare.io, open Hosting › Hubs and choose Add hub, then Create pairing code. You get a code like K7QM-2XRP-9TDA-HV4N. It works once and expires after 24 hours. It isn’t a password: after enrolling, your hub proves who it is with a key it creates for itself, which never leaves the hub.

Log in to the hub computer (for a Pi: ssh with the user you chose in Imager) and run:

Terminal window
curl -fsSL https://getpocketshare.com/install.sh | sh -s -- --code K7QM-2XRP-9TDA-HV4N

Without curl, use wget -qO- https://getpocketshare.com/install.sh | sh -s -- --code …. Leave out --code … and the installer asks for the code at the end.

The installer shows what it is about to do and asks before changing anything; sudo asks for your password. Then it:

  1. Checks that this is a supported system: Raspberry Pi OS (64-bit), Debian 12 or 13, or Ubuntu 22.04 or 24.04, on a 64-bit computer.

  2. Downloads the hub package for your computer and checks it against the release manifest signed with PocketShare’s release key. If anything doesn’t match, it stops before installing anything.

  3. Installs Android’s adb and the USB rules phones need from your system’s own packages, then the hub. The hub runs as two services, pocketshare-adb and pocketshare-hub, under its own system user, pocketshare, and starts with the computer.

  4. Enrolls the hub with your code and prints its status and the next steps.

Within a minute the hub appears under Hosting › Hubs in your dashboard. Running the command again is safe: it updates the hub to the newest release and leaves everything else as it is. The hub also installs signed updates by itself.

If you use adb on this computer yourself, stop your own adb server first (adb kill-server): the hub’s adb server needs its port.

You can look at the installer before running it. Download it, read it, then run it:

Terminal window
curl -fsSLO https://getpocketshare.com/install.sh
less install.sh
sh install.sh --code K7QM-2XRP-9TDA-HV4N

install.sh is part of every hub release, so you can also check that it is the script PocketShare signed. Save the release key, then check the signed checksums and the script:

Terminal window
cat > pocketshare-release-2026.pub.pem <<'EOF'
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAoLkDjloA3xXQmioSxTrBuKFygyrt867Jrm3PNSyyLSE=
-----END PUBLIC KEY-----
EOF
base=https://getpocketshare.com/downloads/hub/latest
curl -fsSLO "$base/SHA256SUMS" -O "$base/SHA256SUMS.sig"
openssl pkeyutl -verify -pubin -inkey pocketshare-release-2026.pub.pem -rawin \
-in SHA256SUMS -sigfile SHA256SUMS.sig
sha256sum --ignore-missing -c SHA256SUMS

The installer contains the same key and makes the same check on the package it downloads.

The same steps without the installer, for example on another Debian-based system (which may work, but isn’t supported):

  1. Download SHA256SUMS and SHA256SUMS.sig and check the signature as above.

  2. Download the package for your computer, arm64 (Raspberry Pi and other ARM computers) or amd64 (Intel and AMD). SHA256SUMS lists its exact name, then check it:

    Terminal window
    grep _arm64.deb SHA256SUMS
    curl -fsSLO https://getpocketshare.com/downloads/hub/latest/pocketshare-hub_<version>_arm64.deb
    sha256sum --ignore-missing -c SHA256SUMS
  3. Install it. apt also installs adb and android-sdk-platform-tools-common:

    Terminal window
    sudo apt install ./pocketshare-hub_<version>_arm64.deb
  4. Enroll (it asks for the code) and restart the hub:

    Terminal window
    sudo pocketshare-hub enroll
    sudo systemctl restart pocketshare-hub

On Windows 10 or 11 (64-bit), download pocketshare-hub-windows-x64.zip and check it against SHA256SUMS as above, then unpack it. Download Android’s SDK Platform-Tools for Windows and unpack them too. In PowerShell opened with Run as administrator, in the hub’s folder:

Terminal window
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Code XXXX-XXXX-XXXX-XXXX -AdbDir C:\path\to\platform-tools

The hub runs as two Windows services, PocketShareAdb and PocketShareHub, that start with Windows. Add -DryRun first to check everything without changing anything. The files aren’t code-signed yet, so Windows may show “Windows protected your PC”: choose More info, then Run anyway.

If you also use this computer for Android development, stop your own adb server first (adb kill-server), and add -Devices with the serial numbers of the phones you rent out (adb devices lists them) so the hub never touches your other phones or emulators.

  1. Reset the phone to factory settings and skip signing in to any account during setup.

  2. Turn on Developer options: in Settings › About phone, tap Build number seven times.

  3. In Developer options (under Settings › System on many phones), turn on USB debugging.

  4. Plug the phone into the hub with a data cable. When the phone asks Allow USB debugging?, tick Always allow from this computer and tap Allow.

Within a minute the phone appears under Hosting › Phones as Setting up, with its model and Android version. The hub checks that it has no accounts, a supported Android version and enough free storage, and records its starting state for cleanup between rentals; then the phone shows Waiting for review. PocketShare reviews new phones before they can be listed.

On the hub, systemctl status pocketshare-hub pocketshare-adb shows whether both services run, and journalctl -u pocketshare-hub -f shows the hub’s log.

What you see What to do
The installer says your system isn’t supported Use Raspberry Pi OS (64-bit), Debian 12 or 13, or Ubuntu 22.04 or 24.04, or install by hand.
adb can’t be installed on Ubuntu Turn on the universe repository: sudo add-apt-repository universe, then run the installer again.
pocketshare-adb isn’t running Another adb server uses its port: adb kill-server, then sudo systemctl restart pocketshare-adb.
The phone doesn’t appear Check the cable carries data, USB debugging is on and you allowed the prompt. Unplug and plug it in again.
The phone shows “no permissions” The USB rules came with android-sdk-platform-tools-common; unplug the phone and plug it in again, or restart the hub computer.
The phone never asks to allow USB debugging In Developer options, tap Revoke USB debugging authorizations, then plug it in again.
The code was refused It was used already or expired. Create a new one and run sudo pocketshare-hub enroll.
Terminal window
curl -fsSL https://getpocketshare.com/install.sh | sh -s -- --uninstall

This removes the hub and its services and keeps the hub’s identity, so installing again reconnects the same hub. Add --purge to delete its identity and settings too, then remove the hub in your dashboard.