i installed my documentserver with docker with the instructions from: https://github.com/ONLYOFFICE/DocumentServer
My port 443 is already used by seafile and i need to set a another port for Onlyoffice Https. I tried the following initialization:
sudo docker run -i -t -d -p 88:80 -p 4040:443 -e LETS_ENCRYPT_DOMAIN=myDomainHere -e LETS_ENCRYPT_MAIL=myEmailHere onlyoffice/documentserver
I can access the onlyOffice server over Http with Port 88. Http://MyDomain:88 works.
If i try to access Http$://MyDomain:4040 it doesn’t work. (changed S to $ because i can post only two links in one post as a new user).
Does OnlyOffice supports https over different ports than 443?
It looks like you faced validation certificate issue. Letsencrypt uses 80 port for validation and renewal. In your deployment you’re using port 88, so there’s no validation. You can check Letsencrypt log to check it out. It’s located here: /var/log/letsencrypt/
Also, please take a look at this title: Certbot - Frequently Asked Questions
We use http-01 challenge, so using port 80 for certificate validation is a must .
Hi Alexandre. Thank you for your reply!
The port 80 and 443 is already used with my seafile server. Letsencrypt uses also the port 80 für seafile. Could that be a problem if both, seafile and onlyoffice, use the same port? Or that doesnt matter for the letsencrypt part?
I opened the log file. It say, that the letsencrypt part fails (as you said). The logfiles shows the port 443 for https and 80 for http…
The issue is related to occupied 80 port which is needed for certificate validation.
We tried to find a possible workaround solution. As a result:
- Deploy Seafile via docker with default settings (using 80\443 ports)
- Stop Seafile container which is using 80 port.
- Deploy DS via sudo docker run -i -t -d -p 80:80 -p 4040:443 -e LETS_ENCRYPT_DOMAIN=myDomainHere -e LETS_ENCRYPT_MAIL=myEmailHere onlyoffice/documentserver
At this step, please make sure that DS is available via https on 4040 port.
- Now I stopped all containers and docker service > went to /var/lib/docker/containers/’DS container hash’/hostconfig.json
Here I changed “HostPort”:“80” to “HostPort”:“88” as you originally wanted.
- Start docker service and all containers,
As a result I achieve running Seafile and DS on the different https ports.
NB! Please note, there aren’t enough tests of these steps. I cannot recommend you this solution or stable work.
First thoughts, that Letsencrypt auto renew won’t be possible. Also, DS update will overwrite the changes.
Hi Alexandre. Thank you for your reply. I will test it soon, when i am back from my vacation :).