One Scanner, Three Desktops: USB over IP That Earns Its Keep at Home
Photo: hbo, Public domain, via Wikimedia Commons
The scanner lives in the office. You mostly work in the basement, and the laptop on the kitchen counter occasionally needs the label printer. Nobody wants to buy three scanners, and USB extension cables over 5 meters start doing interpretive dance with signal integrity.
USB over IP is the pragmatic answer, and on Linux it is built into the kernel. It is also oversold, misunderstood, and quietly insecure by default. Here is the version that holds up in a house or a small office.
What usbip actually does
USB/IP splits the USB stack in two. A server machine runs usbip-host, binds a specific device, and exposes it over TCP. A client machine loads vhci-hcd, a virtual host controller, and attaches to the remote device. The device then appears in lsusb on the client as though it were plugged into a local port, and the normal in-kernel driver binds to it.
Everything above the host controller is fooled. That is the trick, and it is also the catch: the driver behaves exactly as if the device were local, including all of its assumptions about timing.
The ten-minute setup
On the machine with the hardware attached (the server):
sudo apt install usbip-utils
sudo modprobe usbip-host
sudo usbipd -D
usbip list -l
sudo usbip bind -b 1-3
On the machine that wants to use it (the client):
sudo modprobe vhci-hcd
usbip list -r 192.168.1.20
sudo usbip attach -r 192.168.1.20 -b 1-3
Check with usbip port on the client and lsusb to confirm the device appeared. Detach with usbip detach -p 0, and always unbind on the server before you power anything down, or the next attach may find the bus ID has shifted.
Package names differ slightly by distro — Fedora ships usbip and the modules in kernel-modules-extra — but the commands are identical everywhere. There is also a Windows client if one machine in the house is not running Linux.
What survives the trip and what falls apart
The dividing line is transfer type. USB has four: control, interrupt, bulk, and isochronous. USB/IP handles the first three well and the last one badly enough that you should not bother.
Works fine:
- Scanners. The real winner. SANE over the network exists, but nothing beats just handing the whole device to the machine that needs it.
- Serial adapters. FTDI, CH340, PL2303 — a remote serial console for the rack in the garage is a genuinely great use.
- License dongles and smartcard readers. Low bandwidth, tolerant of a few milliseconds of jitter.
- Microcontrollers and programmers. Slow flash operations, no timing drama.
Do not bother:
- USB audio interfaces. Isochronous transfers are where USB/IP falls down hardest. Audio will glitch, or fail to open at all.
- Webcams. Same reason, plus bandwidth.
- Game controllers. Interrupt transfers work, but a wired controller over the LAN feels exactly as bad as you would expect.
- External drives you actually read from. Bulk transfers work, but throughput over a 1 Gb link is a fraction of local USB 3, and a dropped connection mid-write is not a fun afternoon.
The network matters more than the config
Wired gigabit, same switch, ideally same VLAN. Wi-Fi will technically carry it, and then the scanner will time out halfway through a 30-page duplex job. If the two machines are on different floors, run the cable — this is the one place in a home network where pulling Cat 6 is genuinely worth the effort.
The security problem nobody mentions
USB/IP has no authentication. Any host that can reach TCP port 3240 can list and attach the bound devices. There is no password, no token, no TLS.
So treat it accordingly:
- Firewall port 3240 to specific source addresses only, using nftables or ufw.
- Better, bind the daemon to a WireGuard or Tailscale interface and never expose it on the LAN at all. The overhead is negligible for a scanner.
- Bind only the devices you intend to share.
usbip bindis per-device; do not leave a keyboard sitting on the bus waiting for a stranger to attach it.
Alternatives, honestly ranked
Before you install anything, ask whether USB/IP is the right tool:
- Printers — use IPP Everywhere and CUPS. Driverless printing over the network is mature, and USB/IP adds a failure mode for no gain. Skip this entire article for printers.
- Scanners — try
sane-airscanfirst; it covers a surprising number of modern multifunction devices with zero server component. Fall back tosanedif the device is supported. USB/IP when neither works. - Serial —
ser2netorsocatis lighter than USB/IP, survives reconnects better, and does RFC 2217 if you need it. - Everything else — USB/IP is the right answer, and it costs you one daemon.
Making it survive a reboot
By default nothing auto-attaches, which means the scanner is invisible every time the client reboots. A small systemd unit on the client, ordering after network-online.target with a retry loop, is the standard fix. On the server, bind the device at boot with a udev rule keyed to the vendor and product IDs rather than the bus path, because bus numbering changes when you unplug and replug.
Add a timeout and a couple of retries — the daemon often starts before the device has finished enumerating.
The verdict
USB/IP is a genuinely excellent tool with a narrow job description: mid-bandwidth, non-isochronous devices that need to live on a machine other than the one they are plugged into. Scanners, serial adapters, dongles. It is not a way to turn your desktop into a remote peripheral farm, and it is not secure unless you make it so.
If that describes your setup, it is ten minutes of work and it quietly solves a decade-old annoyance. If it does not, buy the second scanner — it will cost less than the weekend you would spend debugging timeouts.