Only office cannot be reached

We have deployed next cloud with openoffice on separate machines, behind the firewall. Only OpenOffice has public access. In internal network it is working fine.
When we try to open any document for editing over the internet, i got error “OnlyOFFICE cannot be reached”. In browser debug mode it is not able to resolve host(only.abc.co), and it is obvious because this entry is only access with local network.
As per documentation it is possible https://api.onlyoffice.com/editors/nextcloud

Only office configurations

Document Editing Service address
https://only.abc.co/ --> running Onlyoffice on separate machine on docker

Document Editing Service address for internal requests from the server
https://only.abc.co/

Server address for internal requests from the Document Editing Service
https://ncloud.abc.co/ --> actual URL of nextcloud

Is there any other configurations. Or we should publicly expose only office.

Thanks
Mudasar Yasin