Ssl over local network

hello @ all

i am trying to make onlyoffice which is http to connect to nextcloud which does not accepts https,
i have 2 servers linux 20.4 1 has the nextcloud snap meaning installation made automatic from installing linux on server and a 2 server in which i installed onlyoffice.

so the question is both servers are working on internat network and dont want them to go in a public ip , how can i make onlyoffice with ssl for an ip on a local network ???

really i have looked everywhere and i cant get a solution for this !!!

many thanks