The steps below come from llama.cpp's official RPC documentation, the llama-server documentation and the rpc-server source code on GitHub, all read on 24 November 2026. The RPC feature changes quickly, so check the current README before you start.
You've got a gaming PC with a 16GB graphics card, and an older PC in the spare room with a 12GB card. Neither can hold the model you want to run on its own, but together they have 28GB of video memory. llama.cpp, the open-source engine behind many local AI apps, has a feature built for exactly this: an RPC backend that lets one PC use the GPUs (or CPU) of other PCs on your network as if they were extra local devices.
This guide shows you how to set it up, what the official documentation warns about and when it's worth the effort. If you just want to use two graphics cards in the same PC, read our guide to running a local LLM on two GPUs instead. That's simpler and avoids the network altogether.
Before you start: the big warning
llama.cpp's own documentation is blunt. It says the RPC backend is at a proof-of-concept stage, and that "the functionality is fragile and insecure". It adds, in bold: never run the RPC server on an open network or in a sensitive environment. The rpc-server program repeats this. If you tell it to listen on anything other than 127.0.0.1, it prints a warning that it's experimental, not secure and should never be exposed to an open network.
In practice, that means:
Only use it on a home network you trust, behind your router.
Never forward the RPC port (50052 by default) on your router or open it to the internet.
Don't run it on a shared office, university or café network.
Stop the server when you've finished.
If you need to reach your AI PC while you're away from home, don't expose the RPC server. Use a private VPN-style tool instead. Our guide to accessing your home PC remotely with Tailscale explains one way to do that.
How llama.cpp RPC works
There are two roles:
Role | What runs there | What it does |
|---|
Remote host (or hosts) | ggml-rpc-server
| Exposes its GPUs, or its CPU if it has no GPU, to the network |
Main host | llama-cli or llama-server with --rpc
| Loads the model and sends work to its own devices plus each remote server |
According to the README, ggml-rpc-server exposes every accelerator it finds on a remote PC by default. If there's no accelerator, it exposes a single CPU device. Different PCs can use different backends: the documentation's diagram shows remote hosts with CUDA GPUs, an Apple Metal GPU and a CPU all connected to one main host.
By default, llama.cpp splits the model weights and the KV cache (the memory used for your conversation's context) across all devices, local and remote, in proportion to each device's available memory. So a 16GB card gets a bigger share than a 12GB card, without you having to do any maths.
Step 1: Build llama.cpp with RPC on every PC
The RPC backend isn't something you switch on in a settings menu. You build llama.cpp with the -DGGML_RPC=ON option, alongside the option for your graphics card. The README's example for an NVIDIA (CUDA) PC is:
mkdir build-rpc-cuda
cd build-rpc-cuda
cmake .. -DGGML_CUDA=ON -DGGML_RPC=ON
cmake --build . --config Release
Do this on each remote PC and on the main PC. On the main PC, include the backend for its own local GPU as well as -DGGML_RPC=ON. For other GPU types, swap -DGGML_CUDA=ON for the right backend from llama.cpp's build documentation.
If you've never built or run llama.cpp before, get it working on one PC first. Our guide to running llama.cpp on Windows covers the basics, and our explainer on CUDA compute capability helps if you're unsure whether an older NVIDIA card is supported.
Tip: the RPC server prints its version number when it starts. Building the same llama.cpp release on every PC is the simplest way to avoid mismatches between them.
Step 2: Start the RPC server on the remote PC
On the remote PC, run the server from the build folder:
bin/ggml-rpc-server
It lists the devices it has found. In the README's example, that's an RTX 5090 with about 32GB free, and the endpoint shown is 127.0.0.1:50052. That's the important detail. By default, the server only listens on the PC itself, so other PCs can't reach it yet.
To let your main PC connect, bind it to the remote PC's address on your home network with -H (or --host), and pick a port with -p:
bin/ggml-rpc-server -H 192.168.1.20 -p 50052
Replace 192.168.1.20 with the remote PC's own local IP address. Binding to that one address, rather than to every network interface, keeps the exposure as small as possible. You'll see the security warning at this point. That's expected, and it's a reminder to keep this on your home network only.
Other useful options from the rpc-server help text:
Option | What it does |
|---|
-d or --device
| Expose only some devices, for example --device CUDA0 |
-t or --threads
| Number of threads for the CPU device |
-c or --cache
| Turn on the local file cache (see Step 4) |
The README says CUDA_VISIBLE_DEVICES=0 has the same effect as --device CUDA0, if you'd rather use an environment variable to hide a second GPU.
If the remote PC runs Windows, its firewall may ask whether to allow the program. Allow it on private networks only, never on public ones.
Step 3: Connect from the main PC
On the main PC, add --rpc followed by the address and port of each remote server, separated by commas. The README's example uses two remote PCs:
llama-cli -hf ggml-org/gemma-3-1b-it-GGUF -ngl 99 --rpc 192.168.88.10:50052,192.168.88.11:50052
Here, -hf downloads a small Gemma 3 model from Hugging Face, and -ngl 99 offloads all of its layers to GPU devices. Start with a small model like this to check that everything connects before you try something large.
The same --rpc option works with llama-server, the version that gives you a web chat page and an OpenAI-compatible API. The llama-server documentation lists it as a comma-separated list of RPC servers in host:port form, which you can also set with the LLAMA_ARG_RPC environment variable. For example:
llama-server -m your-model.gguf -ngl 99 --rpc 192.168.1.20:50052
To check which devices llama.cpp can use, the llama-server documentation lists a --list-devices option, which prints the available devices and exits.
Step 4: Fine-tune the split and speed up loading
Change the split. If you don't want the automatic memory-based split, use --tensor-split (or -ts) with proportions, such as -ts 3,1 to put three-quarters of the model on the first device. The llama-server docs also list --split-mode. The default, layer, splits layers and KV cache across devices in a pipeline.
Turn on the cache. The first time you load a model, its weights have to be sent across the network to each remote PC. The README says the RPC server can keep a local cache of large tensors so they don't have to be transferred again, which "can speed up model loading significantly". Start the server with -c:
bin/ggml-rpc-server -H 192.168.1.20 -p 50052 -c
The cache goes in $HOME/.cache/llama.cpp/rpc by default, and you can move it with the LLAMA_CACHE environment variable. Big models mean big cache files, so make sure the remote PC has enough free SSD space.
Step 5: Faster links and troubleshooting
By default, RPC traffic goes over ordinary TCP networking. The README says the backend can use RDMA instead for lower latency and higher throughput. On Linux, that needs RoCEv2-capable network cards such as Mellanox ConnectX. On Apple silicon Macs with Thunderbolt 5, it can use RDMA over Thunderbolt. It's negotiated automatically, and it falls back to TCP unless both PCs support it. Windows isn't listed as an RDMA provider in the README. For Microsoft's own work in this area, see our news story on Windows RDMA over USB4 for local AI.
The network sits between your devices, so a faster, wired connection is the sensible choice over Wi-Fi. Measure your own results rather than relying on anyone else's: our guide to benchmarking local LLM speed shows how.
If something doesn't work:
Main PC can't connect: check that the server isn't still listening on 127.0.0.1, that you've typed the right IP address and port, and that the firewall allows it on your private network.
Too little detail in the logs: set GGML_RPC_DEBUG=1 on the server, the client or both. Levels 2 and 3 give more detail. On the client, the README says you also need -lv 5, otherwise llama.cpp drops the debug messages.
Suspected RDMA problem: set GGML_RPC_NO_RDMA=1 on either PC to force plain TCP.
Is it worth it?
The RPC backend makes the most sense when you already own two PCs with decent GPUs and want to try a model that won't fit on either one. It's free, and it uses hardware you've already paid for.
It's less attractive if you're buying hardware specifically for this. One PC with more memory is simpler and avoids the network. That could mean a second graphics card in the same PC, a single card with more VRAM, or a unified-memory mini PC. Our best GPU for local LLMs and best mini PC for local AI guides cover those options. And if your model nearly fits on one card, a smaller quantisation may be the easier fix. Our GGUF quantisation explainer explains the trade-offs.
Our verdict
llama.cpp's RPC backend lets your main PC use the GPU memory of other PCs on your home network: build llama.cpp with -DGGML_RPC=ON, run ggml-rpc-server -H <local IP> on the remote PC, then add --rpc <ip>:50052 on the main PC. llama.cpp then splits the model in proportion to each device's memory, and the -c cache speeds up repeat loads. It's a clever way to run a model that's too big for one PC, but llama.cpp itself calls it a fragile, insecure proof of concept. Use it only on a trusted home network, never expose the port, and stick to one PC with more VRAM if you're buying new hardware.