HI, I have surfshark running on 1 of my raspberry pis, im trying to get it going on another pi but cant, does each pi need a separate public key? or am i missing something
10 replies
Chris wrote:
Short answer: yes — each Pi needs its own keypair, so the second one can't reuse the first's. In your Surfshark account, look for the WireGuard manual-setup section and generate a fresh keypair for the second Pi, then use that new private key in its config. The two will then connect independently. If it still won't connect after that, tell me the error you're seeing and I'll dig in.
blondini wrote:
Hi thanks. It just wont start. This is my edited downloaded config file does it look ok? Use this configuration with WireGuard client [Interface] Address = 10.14.0.2/16 PrivateKey = REMOVED DNS = 162.252.172.57, 149.154.159.92 [Peer] PublicKey = iBJRXLZwXuWWrOZE1ZrAXEKMgV/z0WjG0Tks5rnWLBI= AllowedIPs = 0.0.0.0/0 Endpoint = uk-lon.prod.surfshark.com:51820
Chris wrote:
That config looks structurally right — the Address, DNS, peer PublicKey, AllowedIPs and Endpoint are all what Surfshark normally issues. The one field that decides whether it connects is the PrivateKey you redacted: it has to be the fresh key Surfshark generated for this second Pi, not the one from your first Pi. Every Pi gets its own keypair, and Surfshark's downloaded WireGuard profile already has the correct key baked in — so there's nothing to edit there, just save it as-is. Can you paste the exact error you see when you bring it up? That tells me whether it's the key or a startup problem.
blondini wrote:
There isn't any error it just won't come up
blondini wrote:
But in the log it says ERROR VPN settings: provider settings: server selection: Wireguard server selection settings: endpoint port is set 2026-08-29T12:08:36.905179051Z 2026-08-29T13:08:36+01:00 INFO Shutdown successful
Chris wrote:
That log line is the VPN app refusing to start, and it names the exact problem: endpoint port is set. Surfshark is a built-in provider, so gluetun looks up the server and its port for you — setting the endpoint port yourself (from the :51820 in your config) conflicts with that, so it will not boot. Take the endpoint port back out of your config. If you also added the endpoint IP or the peer public key, remove those too. What should remain is just: provider surfshark, protocol wireguard, your 44-character private key, address 10.14.0.2/16, and a country. The rest gets filled in automatically.
blondini wrote:
Thanks Have removed the :51820 and it now errors 2026-08-29T22:02:26.425808763Z 2026-08-29T23:02:26+01:00 ERROR VPN settings: provider settings: server selection: Wireguard server selection settings: endpoint port is set 2026-08-29T22:02:26.425810782Z 2026-08-29T23:02:26+01:00 INFO Shutdown successful 2026-08-29T22:03:15.025514733Z ❯ Starting nginx ... 2026-08-29T22:03:15.090267570Z nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol) 2026-08-29T22:03:15.025514733Z ❯ Starting nginx ...
Chris wrote:
That same error is the clue: removing :51820 from the file changed nothing because the VPN app is not reading that file — it reads the box settings, where the endpoint port is still set. For Surfshark you do not set an endpoint at all; the app knows Surfshark and picks the server itself, so that port has to be blank. Clear it from the terminal: sudo sparkbox set-env VPNENDPOINTPORT= (and if you also set an endpoint IP: sudo sparkbox set-env VPNENDPOINTIP=) then: sudo sparkbox restart media The nginx Address family line is a separate IPv6 message and is not what is blocking the VPN. Run those and tell me what the log shows next.
blondini wrote:
A million thanks that fixed it, now just need to find some free indexers and I'm good to go. Thanks again
Chris wrote:
Really glad the VPN's up — that was the last thing in the way. For indexers, they're added in Prowlarr rather than me handing you a list: open Prowlarr from your dashboard, go to Indexers → Add Indexer, and search for the free ones you're entitled to use. SparkBox ships with none pre-loaded and doesn't push particular sources, so pick what suits you and hit Test on each after adding — the more you add, the more results you'll get. Enjoy the box, and if an indexer ever stalls, give me a shout.