ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.76k stars 1.08k forks source link

Not possible to install on non-default port #2523

Closed Epic-NaN closed 7 months ago

Epic-NaN commented 9 months ago

This issue is unique.

Operating System of DocumentServer

Docker

Version information

current

Expected Behavior

What I want to do is to run ONLYOFFICE DocumentServer on this same server and connect it using the Nextcloud plugin, which I already have installed. For this, I tried the Docker version. I expected to be able to follow the guide and have a running instance of ONLYOFFICE DocumentServer.

Actual Behavior

The Docker command used is the following (private details redacted):

docker run -i -t -d -p 8080:80 -p 8443:443 --restart=always \
  -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
  -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
  -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
  -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \
  -e LETS_ENCRYPT_DOMAIN=office.my.domain -e LETS_ENCRYPT_MAIL=myemail \
  -e JWT_SECRET='redacted' -e WOPI_ENABLED=true \
  -e USE_UNAUTHORIZED_STORAGE=true \
  onlyoffice/documentserver

Connecting to port 8080 shows this screen:

image

image

but it doesn't let me install anything. Running the example works. Trying to connect to port 8443 does not work at all:

image

Attempting to connect the server to Nextcloud, both via domain name and via IP+port does not work.

Reproduction Steps

Following the guide and running the Docker command described in Actual Behaviour

Additional information

Environment

I am running a Ubuntu 22.04 LTS Server hosted on a VPS. Nextcloud is installed and uses ports 80 and 443.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
# docker version
Client: Docker Engine - Community
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:07:41 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:07:41 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.26
  GitCommit:        3dd1e886e55dd695541fdcd67420c2888645a495
 runc:
  Version:          1.1.10
  GitCommit:        v1.1.10-0-g18a0cb0
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
hahaxd35 commented 7 months ago

Problem is maybe that letsencrypt does not get the certificate. Letyencrypt does http request on "LETS_ENCRYPT_DOMAIN" Port 80. sulution should be selfsignt certificate

so nginx cannot start ssl because ssl certificate is missing.

igwyd commented 7 months ago

Hello @hahaxd35, To get certificates from letsencrypt using variables in docker you will have to use 80 and 443 ports, because letsencrypt uses these ports during the check host. Duplicate of #347

Rita-Bubnova commented 7 months ago

I close this issue. Feel free to comment or reopen it if you got further questions.