netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
10.64k stars 474 forks source link

Running Multiple Services on Same Host: Change Netbird Port from 443 (Self-Hosting) #1786

Open abulazif opened 5 months ago

abulazif commented 5 months ago

I've been utilizing your self-hosting script, which currently serves on port 443. My aim is to run another WordPress instance alongside the existing service on the same host. Despite attempting various methods, I haven't succeeded in making the necessary changes. Specifically, I need guidance on changing the port of the Netbird service from 443 to another available port to facilitate this setup. My setup is simple, suitable for a small environment. Any assistance on how to accomplish this adjustment effectively would be greatly appreciated. Additionally, here's the command I've been using to deploy Netbird: export NETBIRD_DOMAIN=netbird.example.com; curl -fsSL https://github.com/netbirdio/netbird/releases/latest/download/getting-started-with-zitadel.sh | bash. Thank you for your support. It would greatly benefit from assistance in transitioning from CockroachDB to PostgreSQL for database management within the self-hosting environment

jiangslee commented 5 months ago

I have a script for changing ports here, maybe it can help you.

https://github.com/netbirdio/netbird/pull/1410#issuecomment-2009548025

curl -fsSL https://raw.githubusercontent.com/jiangslee/netbird/main-jsl/infrastructure_files/getting-started-with-zitadel.sh | bash
rqi14 commented 5 months ago

You can use reverse proxy and docker container. Check linuxserver/swag. They have a working config.

bcmmbaga commented 5 months ago

It would greatly benefit from assistance in transitioning from CockroachDB to PostgreSQL for database management within the self-hosting environment

The default database for ZITADEL is CockroachDB, but in case you need to change to PostgreSQL, please take a look at their documentation at https://zitadel.com/docs/self-hosting/manage/database.

abulazif commented 5 months ago

WARN[0000] /root/nbird03/docker-compose.yml: version is obsolete.

My comments:

The script is working great, but there is an issue with the docker-compose.yml file: version is obsolete. I've double-checked my Docker version, and it seems up-to-date. How can I resolve this?

I initially attempted to run the script using a self-signed certificate, which led to several failures.

I successfully generated a Let's Encrypt certificate for my domain using the OpenLiteSpeed Docker version. However, I'm unsure how to automate the renewal process and which tool to use for certificate creation. Why is the script utilizing SSL certificates in PEM format when Let's Encrypt certificates are not typically provided in that format? Additionally, how can I automate the conversion of Let's Encrypt certificates to PEM format? I am aware that this can be achieved through a cron job, but I'm seeking a tool that facilitates this process. Any recommendations or suggestions to address this certificate-related issue would be greatly appreciated.

Could anybody suggest a tool for managing SSL certificates easily without relying on a web server?

I've tested Zitadel with PostgreSQL manually. Can someone provide guidance on where I need to make adjustments in the script, particularly regarding ports?

If Zitadel is utilizing CockroachDB, is there any Docker-compatible web GUI available?

Thank you all very much. Happy coding.

xcstatus commented 5 months ago

WARN[0000] /root/nbird03/docker-compose.yml: version is obsolete.

My comments:

The script is working great, but there is an issue with the docker-compose.yml file: version is obsolete. I've double-checked my Docker version, and it seems up-to-date. How can I resolve this?

I initially attempted to run the script using a self-signed certificate, which led to several failures.

I successfully generated a Let's Encrypt certificate for my domain using the OpenLiteSpeed Docker version. However, I'm unsure how to automate the renewal process and which tool to use for certificate creation. Why is the script utilizing SSL certificates in PEM format when Let's Encrypt certificates are not typically provided in that format? Additionally, how can I automate the conversion of Let's Encrypt certificates to PEM format? I am aware that this can be achieved through a cron job, but I'm seeking a tool that facilitates this process. Any recommendations or suggestions to address this certificate-related issue would be greatly appreciated.

Could anybody suggest a tool for managing SSL certificates easily without relying on a web server?

I've tested Zitadel with PostgreSQL manually. Can someone provide guidance on where I need to make adjustments in the script, particularly regarding ports?

If Zitadel is utilizing CockroachDB, is there any Docker-compatible web GUI available?

Thank you all very much. Happy coding.

delete docker-compose.yml first row。 The "version" parameter is obsolete

rqi14 commented 5 months ago

Why making it difficult for yourself? Just look at linuxserver/swag. It handles nginx configs and let's encrypt certificate renewal for you. You dont even need to configure anything except enabling the config for your netbird and setting some parameters like your domain name

abulazif commented 5 months ago

Why making it difficult for yourself? Just look at linuxserver/swag. It handles nginx configs and let's encrypt certificate renewal for you. You dont even need to configure anything except enabling the config for your netbird and setting some parameters like your domain name

Did you check how Netbird is installed using a bash script? Can you explain how to use SWAG with Netbird? As per my understanding, it is difficult with a bash script under SWAG. I also do not want to use an API for DNS. I neither want to reserve port 443 for SWAG nor want to use third-party DNS. There are better options available. Insha'Allah.

rqi14 commented 5 months ago

Why making it difficult for yourself? Just look at linuxserver/swag. It handles nginx configs and let's encrypt certificate renewal for you. You dont even need to configure anything except enabling the config for your netbird and setting some parameters like your domain name

Did you check how Netbird is installed using a bash script? Can you explain how to use SWAG with Netbird? As per my understanding, it is difficult with a bash script under SWAG. I also do not want to use an API for DNS. I neither want to reserve port 443 for SWAG nor want to use third-party DNS. There are better options available. Insha'Allah.

I don't think you will have to reserve 443 for swag. I think you can set it to use DNS challenge mode. If you don't want to use container for your netbitd instance, I think you can point the url to your host in swag. But in that case, it is true that you will still need to solve the changing port issue. I am mentioning the swag thing because you asked how to get pem certificate and automate the renewal process. Swag gives you pem version of certificate, and automates the renewal for you.