Multiple ingress fqdn to access gitea instance

we need two ingress fqdn to access gitea instance

we have added two ingress rule with tls .

in how in ROOT_URL in gitea.ini we can provide multiple fqdns ?
when we are specifying ROOT_URL= ,
Then in it is showing the below alert message and vice versa.

‘You should set ROOT_URL correctly, otherwise the web may not work correctly.’
and also when browsing through repos in gitea via the NON ROOT_URL, it is not opening .

So can someone please help how we can set multiple fqdns in ROOT_URL ?

1 Like

Your setup is not supported, but there is an issue for adding support for it

Why do you need two separate domains for the instance? Can you setup to automatically redirect users to instead?


Thanks for the reply…
The internal fqdn will be used only for inter cluster communication.
From different kubernetes clusters only the internal fqdn will be used to communicate with gitea .

And external is for only few front end apps which are exposed outside the cluster dns/network…

That is why we need two fqdn…
And we can not route the internal to external because all clusters will not have the external network access…

1 Like

If these clusters are just using automated operations like git clone from SSH or HTTP, I don’t think you will run into any issues using two domain names. But if you are doing operations from the web interface like opening issues, tracking time, etc. some of these will be broken if ROOT_URL does not match the domain name.

If possible with your setup, I would recommend setting ROOT_URL to the domain that will be used for the web interface and making sure users only access that domain name for the web interface. Automated operations should still work on domain names that aren’t ROOT_URL.

I can confirm that docker operations fail in this setup: Running `docker` commands against Gitea registry results in a call against `ROOT_URL` · Issue #22033 · go-gitea/gitea · GitHub. Can’t speak for Git operations.

This works for my use case.
Gitea ROOT_URL is pointing to exterl fqdn .
and internal fqdn is used by others k8s clusters for git clone operations.

Thanks for the help.

1 Like

A follow-up to this post:
Thanks to @wxiaoguang’s and others’ hard work, multiple domain names should no longer cause issues with the UI when 1.19 is released. The warning has been removed from all pages in 1.19 and only shown on the admin page (see #22836).

It will still cause some disparity with regards to email notifications, HTTP clone URLs, webhooks, and others. Those will still be generated with ROOT_URL so it is still best to set it to the main URL that users are expecting.