Closed FallingSnow closed 1 year ago
I've discovered that after following the instructions above, the UI generates tokens that do not contain the new port. However this can be done by decoding the base64 token, adding the port to the address, then encoding the token back into base64.
I did a little digging and it seems like the enrollment keys are pulled from the database?
Seems these lines would need to change to pull the port as well so it can be stored in the token. https://github.com/gravitl/netmaker/blob/45584ce02985116c65d6cab121331e52e4388022/controllers/enrollmentkeys.go#L45 https://github.com/gravitl/netmaker/blob/45584ce02985116c65d6cab121331e52e4388022/controllers/enrollmentkeys.go#L115
Turns out that there were some more changes that were needed to make actual wireguard connections. I've updated the initial issue.
Contact Details
No response
What happened?
Changing UI/API port requires multiple changes.
PUBLIC_PORT
). This should probably be set by default to 443. As far as I can tell changing env variableAPI_PORT
changes an internal port which messes things up.BROKER_ENDPOINT=wss://broker.${NM_DOMAIN}:${PUBLIC_PORT}
andTURN_SERVER_API_HOST=https://turnapi.${NM_DOMAIN}:${PUBLIC_PORT}
BACKEND_URL: "https://api.${NM_DOMAIN}:${PUBLIC_PORT}"
- "443:443"
to- "${PUBLIC_PORT}:443"
API_PORT
seems to reference an internal port number, the Caddyfile line should probably reference itreverse_proxy http://netmaker:8081
->reverse_proxy http://netmaker:{$API_PORT}
.instead of
After this a user should just be able to change
PUBLIC_PORT
and everything works out of the box, except maybe the port 80 https redirect...Version
v0.20.0
What OS are you using?
Linux
Relevant log output
Contributing guidelines