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.
What you need
Section titled “What you need”- 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.
1. Get a pairing code
Section titled “1. Get a pairing code”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.
2. Install the hub
Section titled “2. Install the hub”Log in to the hub computer (for a Pi: ssh with the user you chose in Imager) and run:
curl -fsSL https://getpocketshare.com/install.sh | sh -s -- --code K7QM-2XRP-9TDA-HV4NWithout 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:
-
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.
-
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.
-
Installs Android’s
adband the USB rules phones need from your system’s own packages, then the hub. The hub runs as two services,pocketshare-adbandpocketshare-hub, under its own system user,pocketshare, and starts with the computer. -
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.
Read the script first
Section titled “Read the script first”You can look at the installer before running it. Download it, read it, then run it:
curl -fsSLO https://getpocketshare.com/install.shless install.shsh install.sh --code K7QM-2XRP-9TDA-HV4Ninstall.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:
cat > pocketshare-release-2026.pub.pem <<'EOF'-----BEGIN PUBLIC KEY-----MCowBQYDK2VwAyEAoLkDjloA3xXQmioSxTrBuKFygyrt867Jrm3PNSyyLSE=-----END PUBLIC KEY-----EOFbase=https://getpocketshare.com/downloads/hub/latestcurl -fsSLO "$base/SHA256SUMS" -O "$base/SHA256SUMS.sig"openssl pkeyutl -verify -pubin -inkey pocketshare-release-2026.pub.pem -rawin \ -in SHA256SUMS -sigfile SHA256SUMS.sigsha256sum --ignore-missing -c SHA256SUMSThe installer contains the same key and makes the same check on the package it downloads.
Install by hand
Section titled “Install by hand”The same steps without the installer, for example on another Debian-based system (which may work, but isn’t supported):
-
Download
SHA256SUMSandSHA256SUMS.sigand check the signature as above. -
Download the package for your computer,
arm64(Raspberry Pi and other ARM computers) oramd64(Intel and AMD).SHA256SUMSlists its exact name, then check it:Terminal window grep _arm64.deb SHA256SUMScurl -fsSLO https://getpocketshare.com/downloads/hub/latest/pocketshare-hub_<version>_arm64.debsha256sum --ignore-missing -c SHA256SUMS -
Install it. apt also installs
adbandandroid-sdk-platform-tools-common:Terminal window sudo apt install ./pocketshare-hub_<version>_arm64.deb -
Enroll (it asks for the code) and restart the hub:
Terminal window sudo pocketshare-hub enrollsudo systemctl restart pocketshare-hub
Windows
Section titled “Windows”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:
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Code XXXX-XXXX-XXXX-XXXX -AdbDir C:\path\to\platform-toolsThe 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.
3. Plug in a phone
Section titled “3. Plug in a phone”-
Reset the phone to factory settings and skip signing in to any account during setup.
-
Turn on Developer options: in Settings › About phone, tap Build number seven times.
-
In Developer options (under Settings › System on many phones), turn on USB debugging.
-
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.
If something doesn’t work
Section titled “If something doesn’t work”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. |
Removing the hub
Section titled “Removing the hub”curl -fsSL https://getpocketshare.com/install.sh | sh -s -- --uninstallThis 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.