[GH-ISSUE #324] starting wireguard gives an error #3330

Closed
opened 2026-04-20 07:15:27 -05:00 by GiteaMirror · 12 comments
Owner

Originally created by @V3rtrex on GitHub (Mar 11, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/324

So i've setup pangolin without any problems but when it comes to starting wireguard with the config that gets provided after adding a site it gives me an error that the Address is already in use.

This is what i get
Image

Config
[Interface]
Address = 100.89.128.4/30
ListenPort = 51820
PrivateKey = nope

[Peer]
PublicKey = also no
AllowedIPs = 100.89.128.1/32
Endpoint = domain:51820
PersistentKeepalive = 5

I looked in the Docs but coulnd't find anything.

Originally created by @V3rtrex on GitHub (Mar 11, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/324 So i've setup pangolin without any problems but when it comes to starting wireguard with the config that gets provided after adding a site it gives me an error that the Address is already in use. This is what i get ![Image](https://github.com/user-attachments/assets/882a8fb1-c4b5-48e1-84b9-c3cebdbe96c1) Config [Interface] Address = 100.89.128.4/30 ListenPort = 51820 PrivateKey = nope [Peer] PublicKey = also no AllowedIPs = 100.89.128.1/32 Endpoint = domain:51820 PersistentKeepalive = 5 I looked in the Docs but coulnd't find anything.
Author
Owner

@oschwartz10612 commented on GitHub (Mar 11, 2025):

It looks like you might have another interface with the same ip 100.89.128.4/30 maybe from a previous attempt. Try to run ip a and look for a interface with that IP and if you find it you can delete it with ip link del <interfaceName>. Then try again.

<!-- gh-comment-id:2715825531 --> @oschwartz10612 commented on GitHub (Mar 11, 2025): It looks like you might have another interface with the same ip 100.89.128.4/30 maybe from a previous attempt. Try to run `ip a` and look for a interface with that IP and if you find it you can delete it with `ip link del <interfaceName>`. Then try again.
Author
Owner

@V3rtrex commented on GitHub (Mar 12, 2025):

well ok i found out the issue.
1 container in the stack is trying to do something with this port, this was the reason why i couldn't start wireguard but pangolin needs that docker container for wireguard or newt to work so i'm kinda confused on what to do now.

<!-- gh-comment-id:2716924594 --> @V3rtrex commented on GitHub (Mar 12, 2025): well ok i found out the issue. 1 container in the stack is trying to do something with this port, this was the reason why i couldn't start wireguard but pangolin needs that docker container for wireguard or newt to work so i'm kinda confused on what to do now.
Author
Owner

@oschwartz10612 commented on GitHub (Mar 12, 2025):

You have another container using port 51820? Do you have anther wireguard connection?

You can change the start_port param in the config.yml file in the Pangolin server to something other than the default wireguard port and update the port to match in your local wireguard config. Make sure to restart the stack once you have updated this value.

<!-- gh-comment-id:2717840459 --> @oschwartz10612 commented on GitHub (Mar 12, 2025): You have another container using port 51820? Do you have anther wireguard connection? You can change the `start_port` param in the config.yml file in the Pangolin server to something other than the default wireguard port and update the port to match in your local wireguard config. Make sure to restart the stack once you have updated this value.
Author
Owner

@oschwartz10612 commented on GitHub (Mar 12, 2025):

You should not need wireguard installed on the same VPS as gerbil. Gerbil is the wireguard peer on the VPS.

<!-- gh-comment-id:2717879657 --> @oschwartz10612 commented on GitHub (Mar 12, 2025): You should not need wireguard installed on the same VPS as gerbil. Gerbil is the wireguard peer on the VPS.
Author
Owner

@V3rtrex commented on GitHub (Mar 12, 2025):

So if i change the port to 51821 i'll have to change the Endpoint Port in the wireguard config from 51820 to 51821, if i understand it correctly.

<!-- gh-comment-id:2717896745 --> @V3rtrex commented on GitHub (Mar 12, 2025): So if i change the port to 51821 i'll have to change the Endpoint Port in the wireguard config from 51820 to 51821, if i understand it correctly.
Author
Owner

@V3rtrex commented on GitHub (Mar 12, 2025):

i'm doing this on my home server, is there something what i need to do different?

<!-- gh-comment-id:2717974237 --> @V3rtrex commented on GitHub (Mar 12, 2025): i'm doing this on my home server, is there something what i need to do different?
Author
Owner

@oschwartz10612 commented on GitHub (Mar 13, 2025):

Are you trying to run wireguard on the same server that is running gerbil?

<!-- gh-comment-id:2719795055 --> @oschwartz10612 commented on GitHub (Mar 13, 2025): Are you trying to run wireguard on the same server that is running gerbil?
Author
Owner

@V3rtrex commented on GitHub (Mar 13, 2025):

yea, I have both on the same server.

<!-- gh-comment-id:2720118595 --> @V3rtrex commented on GitHub (Mar 13, 2025): yea, I have both on the same server.
Author
Owner

@Lokowitz commented on GitHub (Mar 13, 2025):

I am also running Pangolin on a custom wireguard port.
You have to change the port in your docker-compose.yml

services:
  gerbil:
    ports:
     - <port>:<port>/udp

And in config/config.yml

gerbil:
    start_port: <port>
<!-- gh-comment-id:2720813899 --> @Lokowitz commented on GitHub (Mar 13, 2025): I am also running Pangolin on a custom wireguard port. You have to change the port in your docker-compose.yml ``` services: gerbil: ports: - <port>:<port>/udp ``` And in config/config.yml ``` gerbil: start_port: <port> ```
Author
Owner

@oschwartz10612 commented on GitHub (Mar 13, 2025):

^^^ this is correct.

But you should not need wireguard installed on the same VPS as gerbil. Gerbil is the wireguard peer on the VPS. Unless you are hosting a WG server for other purposes the wireguard client for a site in pangolin should be on your remote network. If you want to use pangolin with "local" resources on the VPS you should use "local" sites: https://docs.fossorial.io/Pangolin/without-tunneling

I would also use newt for the remote network instead of raw wireguard if you can help it: https://docs.fossorial.io/Newt/install

<!-- gh-comment-id:2721368001 --> @oschwartz10612 commented on GitHub (Mar 13, 2025): ^^^ this is correct. But you should not need wireguard installed on the same VPS as gerbil. Gerbil is the wireguard peer on the VPS. Unless you are hosting a WG server for other purposes the wireguard client for a site in pangolin should be on your remote network. If you want to use pangolin with "local" resources on the VPS you should use "local" sites: https://docs.fossorial.io/Pangolin/without-tunneling I would also use newt for the remote network instead of raw wireguard if you can help it: https://docs.fossorial.io/Newt/install
Author
Owner

@Kornelius777 commented on GitHub (Apr 25, 2025):

Over the last two days, I was struggeling to get newt working.
newt runs in a proxmox LXC, debian12 standard template.
The wireguard connection could only be built up after installing wireguard and wireguard-tools (and apt additionally installed a different kernel).
I didn't use or configure wireguard manually, however, after installing it, newt finally built a wireguard connection.
Looks like some dependency wasn't met, before.

Kind regards,

<!-- gh-comment-id:2831085125 --> @Kornelius777 commented on GitHub (Apr 25, 2025): Over the last two days, I was struggeling to get newt working. newt runs in a proxmox LXC, debian12 standard template. The wireguard connection could only be built up after installing wireguard and wireguard-tools (and apt additionally installed a different kernel). I didn't use or configure wireguard manually, however, after installing it, newt finally built a wireguard connection. Looks like some dependency wasn't met, before. Kind regards,
Author
Owner

@oschwartz10612 commented on GitHub (Apr 30, 2025):

Hum it is strange - newt should be entirely in user space and should not require Wireguard in the kernel at all.

<!-- gh-comment-id:2842070233 --> @oschwartz10612 commented on GitHub (Apr 30, 2025): Hum it is strange - newt should be entirely in user space and should not require Wireguard in the kernel at all.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#3330