A USB gateway on a Raspberry Pi or NAS
A small computer sits in a cabinet or next to the printer with keys, flash drives or a printer plugged in, and all your computers connect them through NASP. The gateway only shares: it does not take devices from other computers.
Prepare the device
- A Raspberry Pi 3, 4 or 5, another single-board computer or a NAS with 64-bit Linux (Raspberry Pi OS 64-bit, Debian, Ubuntu, Armbian), or x86-64.
- systemd and a network with internet access; SSH or a keyboard and screen.
- Plug USB devices in through a powered hub: a Raspberry Pi gives its ports little current.
Check that it fits
The check installs and changes nothing: it looks at the CPU, systemd and the
usbip-hostandvhci-hcdkernel modules.curl -fsSL https://nasp.recondeck.com/install.sh | sudo sh -s -- --checkTo read the script before running it:
curl -fsSL https://nasp.recondeck.com/install.sh | lessInstall the gateway
curl -fsSL https://nasp.recondeck.com/install.sh | sudo sh -s -- --gatewayThe script downloads the NASP agent for its CPU (the checksum is verified), installs the distribution's usbip package, the systemd services
nasp-agentandnasp-usbipd, and loadsusbip-hostat boot. The usbipd port is closed to the network: devices are reached through NASP only.Connect the gateway to your account
At the end the console shows a link and a code. Open the link on any device where you are signed in to NASP and confirm the gateway. Later the same:
sudo nasp login.Plug devices in and share them
In the dashboard the gateway shows its USB devices: press Share. On the other computers press Connect. Whether your model fits: the compatibility list.
The gateway updates itself. Status: sudo nasp status, log: journalctl -u nasp-agent -n 50. Remove: sudo nasp uninstall. No usbip-host module: a distribution kernel with the usbip modules is needed (Ubuntu: the linux-modules-extra package). To let the gateway receive devices too, run the installer again with --full.