Netbird self-hosted access to api - nginx 405 #406

Closed
opened 2025-11-20 05:10:53 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @hpoznanski on GitHub (Aug 2, 2023).

When I try to curl to API I get 405 from Nginx. Im trying to use endpoints from https://docs.netbird.io/api but it doesn't work.

Example:


curl -X POST https://domain/api/setup-keys \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Token my_token_generated_on_UI' \
--data-raw '{
  "name": "Default key",
  "type": "reusable",
  "expires_in": 43200,
  "revoked": false,
  "auto_groups": [
    "Default"
  ],
  "usage_limit": 0
}'

<html>
<head><title>405 Not Allowed</title></head>
<body>
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx</center>
</body>
</html>

Should I add any additional option to docker-compose (I use official) to enable API?

Originally created by @hpoznanski on GitHub (Aug 2, 2023). When I try to curl to API I get 405 from Nginx. Im trying to use endpoints from https://docs.netbird.io/api but it doesn't work. Example: ``` curl -X POST https://domain/api/setup-keys \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Token my_token_generated_on_UI' \ --data-raw '{ "name": "Default key", "type": "reusable", "expires_in": 43200, "revoked": false, "auto_groups": [ "Default" ], "usage_limit": 0 }' <html> <head><title>405 Not Allowed</title></head> <body> <center><h1>405 Not Allowed</h1></center> <hr><center>nginx</center> </body> </html> ``` Should I add any additional option to docker-compose (I use official) to enable API?
saavagebueno added the waiting-feedback label 2025-11-20 05:10:53 -05:00
Author
Owner

@jma89 commented on GitHub (Nov 1, 2024):

I'm not sure if you're still having trouble with this, but I wanted to leave a note for any future folks looking for the solution, as I wound up here just moments ago while looking myself:

The self-hosted API isn't on port 443 or port 80; Instead it's on the HTTP API port, which defaults to 33073.

@jma89 commented on GitHub (Nov 1, 2024): I'm not sure if you're still having trouble with this, but I wanted to leave a note for any future folks looking for the solution, as I wound up here just moments ago while looking myself: The self-hosted API isn't on port 443 or port 80; Instead it's on the HTTP API port, which defaults to 33073.
Author
Owner

@nazarewk commented on GitHub (Apr 28, 2025):

Hello @hpoznanski,

We're currently reviewing our open issues and would like to verify if this problem still exists in the latest NetBird version.

Could you please confirm if the issue is still there?

We may close this issue temporarily if we don't hear back from you within 2 weeks, but feel free to reopen it with updated information.

Thanks for your contribution to improving the project!

@nazarewk commented on GitHub (Apr 28, 2025): Hello @hpoznanski, We're currently reviewing our open issues and would like to verify if this problem still exists in the [latest NetBird version](https://github.com/netbirdio/netbird/releases). Could you please confirm if the issue is still there? We may close this issue temporarily if we don't hear back from you within **2 weeks**, but feel free to reopen it with updated information. Thanks for your contribution to improving the project!
Author
Owner

@mlsmaycon commented on GitHub (Jun 1, 2025):

closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.

@mlsmaycon commented on GitHub (Jun 1, 2025): closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#406