simtrunkDocs

Connect a SIM bank

Make a computer near your SIMs a SIM bank with simserve, over a WebSocket or gRPC.

A SIM bank is a computer near your SIM cards with card readers or USB modems plugged in, running simserve. Your SIMs stay there; simtrunk reaches them over an encrypted link that the bank opens. Nothing has to reach in, so the bank works behind NAT, a home router or mobile data.

What you need

Get the software first

Download simserve for your computer from Download simserve and simdoctor, or use the one-line install the dashboard shows. To check your readers and modems before you start, run simdoctor.

  • A computer: Linux (Debian, Ubuntu, Raspberry Pi OS), macOS or Windows.
  • Card readers: PC/SC smart-card readers with a SIM. A reader's SIM gives a VoWiFi line.
  • USB modems: Quectel modems such as the EC20, EC25, EG25-G and EC200U, or voice-capable Huawei sticks such as the E160, E173 and E1550. A modem's SIM can give a VoLTE, VoWiFi or GSM line.

On Linux, card readers need pcsc-lite:

Terminal
sudo apt install pcscd libpcsclite1

On macOS there is nothing to install. Without pcsc-lite, simserve still serves modems.

Add the bank

  1. In the dashboard, open SIM banks and choose Add bank.
  2. Name it, and copy the command it shows. The code in it works once, for 10 minutes.
  3. On the bank, run it:
Terminal
./simserve enroll st1_…./simserve

enroll makes the bank's key (it never leaves the bank), checks that it reached your organization's gateway (the token carries its certificate authority's fingerprint), and gets the bank's certificate. simserve then links and serves every reader and modem plugged in.

The dashboard also shows an install line that downloads simserve, enrols the bank and installs it as a service, in one command.

Note

Treat the st1_… token as a secret until it is used: it holds the one-time code.

The bank in the dashboard

The bank shows as connected, with its slots: one per reader or modem. Plug a reader, a modem or a SIM in or out while simserve runs: the dashboard shows it within seconds. A reader seen for the first time gets the next free slot and keeps it, so a line keeps its SIM whatever is plugged in later.

If the network drops, simserve retries every few seconds, at most every 15 seconds: the bank is back within 15 seconds of its network.

WebSocket or gRPC

The token says how the bank links. You don't edit anything on the bank.

LinkNeedsUse it for
WebSocket over HTTPS (default)HTTPS to a domain nameNetworks that let only web traffic through; works behind Cloudflare
gRPCOutgoing TCP to port 8443Any network that lets it out; the simplest

Both are mutual TLS 1.3 pinned to your organization's certificate authority. Over the WebSocket, the bank and simtrunk run their own TLS inside the HTTPS connection, so a proxy that terminates HTTPS reads nothing. simserve enroll takes -transport to override the link, which is rarely needed.

Run it as a service

As root, the state lives in /var/lib/simserve; otherwise in ~/.simserve.

Terminal
sudo simserve enroll st1_…sudo simserve service installsudo simserve service startsimserve service status

The service (systemd, launchd or the Windows service manager) starts at boot and restarts 5 seconds after it stops. Without root, add -user to install your own service. Logs: journalctl -u simserve -f on Linux.

Certificates

The bank's certificate lasts a year, and simserve renews it 30 days before its end. If the bank's key is lost, invite the bank again from its page: its old certificate stops working.

Next

Add a line. For every simserve command, updating and uninstalling, see Using simserve.

How is this guide?

Last updated on

On this page