[GH-ISSUE #347] Document Server don't work with Let's Encrypt and different port #177

Closed
opened 2026-02-26 10:30:36 +03:00 by kerem · 4 comments
Owner

Originally created by @PrzemekSkw on GitHub (Mar 30, 2021).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/347

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Onlyoffice Document Server don't work

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
I install docker with apt and then:

sudo docker run -i -t -d -p 444:443 \
    -e LETS_ENCRYPT_DOMAIN=your_domain -e LETS_ENCRYPT_MAIL=your_mail  onlyoffice/documentserver

I change port to 444 because I have already Traccar Server installed. I have domain name in NO-IP and SSL with Let's Encrypt for that.
I put my domain name and email. Docker installation went fine:

 sudo docker run -i -t -d -p 444:443 \
> -e LETS_ENCRYPT_DOMAIN=mojserver.ddns.net -e LETS_ENCRYPT_MAIL=myemail@gmail.com  onlyoffice/documentserver
Unable to find image 'onlyoffice/documentserver:latest' locally
latest: Pulling from onlyoffice/documentserver
83ee3a23efb7: Pull complete 
db98fc6f11f0: Pull complete 
f611acd52c6c: Pull complete 
1c793b3fbf5f: Pull complete 
b37e9fe2f61a: Pull complete 
831bbdeb7675: Pull complete 
3d01ba254a78: Pull complete 
Digest: sha256:3076745f11462786328b8c1604f0b4df2f9dda47527b3743c5dc5dfbaab13215
Status: Downloaded newer image for onlyoffice/documentserver:latest
fab58e4810edf4665171c809b795c85a4e4758bfe3b5f41c487b8349cbfdf5e5

What is the expected behavior?
It should work on my browser.
Did this work in previous versions of DocumentServer?
I try snap version but also don't work.

Host Operating System:
Debian 10 [VPS on Aruba Cloud]
Linux OpenVPN 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux

Regards,
Przemek

Originally created by @PrzemekSkw on GitHub (Mar 30, 2021). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/347 **Do you want to request a *feature* or report a *bug*?** bug **What is the current behavior?** Onlyoffice Document Server don't work **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.** I install docker with apt and then: ``` sudo docker run -i -t -d -p 444:443 \ -e LETS_ENCRYPT_DOMAIN=your_domain -e LETS_ENCRYPT_MAIL=your_mail onlyoffice/documentserver ``` I change port to 444 because I have already Traccar Server installed. I have domain name in NO-IP and SSL with Let's Encrypt for that. I put my domain name and email. Docker installation went fine: ``` sudo docker run -i -t -d -p 444:443 \ > -e LETS_ENCRYPT_DOMAIN=mojserver.ddns.net -e LETS_ENCRYPT_MAIL=myemail@gmail.com onlyoffice/documentserver Unable to find image 'onlyoffice/documentserver:latest' locally latest: Pulling from onlyoffice/documentserver 83ee3a23efb7: Pull complete db98fc6f11f0: Pull complete f611acd52c6c: Pull complete 1c793b3fbf5f: Pull complete b37e9fe2f61a: Pull complete 831bbdeb7675: Pull complete 3d01ba254a78: Pull complete Digest: sha256:3076745f11462786328b8c1604f0b4df2f9dda47527b3743c5dc5dfbaab13215 Status: Downloaded newer image for onlyoffice/documentserver:latest fab58e4810edf4665171c809b795c85a4e4758bfe3b5f41c487b8349cbfdf5e5 ``` **What is the expected behavior?** It should work on my browser. **Did this work in previous versions of DocumentServer?** I try snap version but also don't work. **Host Operating System:** Debian 10 [VPS on Aruba Cloud] `Linux OpenVPN 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux` Regards, Przemek
kerem closed this issue 2026-02-26 10:30:36 +03:00
Author
Owner

@igwyd commented on GitHub (Apr 1, 2021):

hello @PrzemekSkw
Unfortunately getting certificates isn't possible if you change the port. If you want use automatically generated Let's Encrypt SSL Certificates, you need to free 80 and 443 ports on your server and run this command:

sudo docker run -i -t -d -p 443:443 -p 80:80 \
-e LETS_ENCRYPT_DOMAIN=your_domain -e LETS_ENCRYPT_MAIL=your_mail  onlyoffice/documentserver

In another issue, you wrote that you already have certificates from letsencript, so you can use them(or generate new yourself) with the Onlyoffice Document Server in docker with 444 port:

  1. Run Onlyoffice Document Server in docker
sudo docker run -i -t -d -p 444:443 --restart=always \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  onlyoffice/documentserver
  1. Go to /app/onlyoffice/DocumentServer/data and create folder with name "certs"
cd /app/onlyoffice/DocumentServer/data
mkdir certs
  1. Copy fullchain.pem and privkey.pem to /app/onlyoffice/DocumentServer/data/certs
  2. Go to /app/onlyoffice/DocumentServer/data/certs and rename fullchain.pem -> onlyoffice.crt and privkey.pem -> onlyoffice.key
mv fullchain.pem onlyoffice.crt
mv privkey.pem onlyoffice.key
  1. Restart docker container
sudo docker restart {container_name_or_id}
  1. Wait about 3-5 min and try https://{domain_name}:444
<!-- gh-comment-id:811730330 --> @igwyd commented on GitHub (Apr 1, 2021): hello @PrzemekSkw Unfortunately getting certificates isn't possible if you change the port. If you want use automatically generated Let's Encrypt SSL Certificates, you need to free 80 and 443 ports on your server and run this command: ``` sudo docker run -i -t -d -p 443:443 -p 80:80 \ -e LETS_ENCRYPT_DOMAIN=your_domain -e LETS_ENCRYPT_MAIL=your_mail onlyoffice/documentserver ``` In another [issue](https://github.com/ONLYOFFICE/snap-documentserver/issues/64), you wrote that you already have certificates from letsencript, so you can use them(or generate new yourself) with the Onlyoffice Document Server in docker with 444 port: 1. Run Onlyoffice Document Server in docker ``` sudo docker run -i -t -d -p 444:443 --restart=always \ -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver ``` 2. Go to /app/onlyoffice/DocumentServer/data and create folder with name "certs" ``` cd /app/onlyoffice/DocumentServer/data mkdir certs ``` 3. Copy fullchain.pem and privkey.pem to /app/onlyoffice/DocumentServer/data/certs 4. Go to /app/onlyoffice/DocumentServer/data/certs and rename fullchain.pem -> onlyoffice.crt and privkey.pem -> onlyoffice.key ``` mv fullchain.pem onlyoffice.crt mv privkey.pem onlyoffice.key ``` 5. Restart docker container ``` sudo docker restart {container_name_or_id} ``` 6. Wait about 3-5 min and try https://{domain_name}:444
Author
Owner

@PrzemekSkw commented on GitHub (Apr 1, 2021):

Hi, @igwyd thanks for answer me. Yes I have already letsencrypt SSL certificates and I use them with my no-ip domain name for Traccar Server. I try already that method but it don't work:

Run Onlyoffice Document Server in docker
sudo docker run -i -t -d -p 444:443 --restart=always
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver
Go to /app/onlyoffice/DocumentServer/data and create folder with name "certs"
cd /app/onlyoffice/DocumentServer/data
mkdir certs
Copy fullchain.pem and privkey.pem to /app/onlyoffice/DocumentServer/data/certs
Go to /app/onlyoffice/DocumentServer/data/certs and rename fullchain.pem -> onlyoffice.crt and privkey.pem -> onlyoffice.key
mv fullchain.pem onlyoffice.crt
mv privkey.pem onlyoffice.key
Restart docker container
sudo docker restart {container_name_or_id}
Wait about 3-5 min and try https://{domain_name}:444

There was no /app folder in my VPS so I create it, copy those two certificate files and rename them. I also try to convert them but there was an error.
Regards.

<!-- gh-comment-id:811758680 --> @PrzemekSkw commented on GitHub (Apr 1, 2021): Hi, @igwyd thanks for answer me. Yes I have already letsencrypt SSL certificates and I use them with my no-ip domain name for Traccar Server. I try already that method but it don't work: > Run Onlyoffice Document Server in docker sudo docker run -i -t -d -p 444:443 --restart=always \ -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver Go to /app/onlyoffice/DocumentServer/data and create folder with name "certs" cd /app/onlyoffice/DocumentServer/data mkdir certs Copy fullchain.pem and privkey.pem to /app/onlyoffice/DocumentServer/data/certs Go to /app/onlyoffice/DocumentServer/data/certs and rename fullchain.pem -> onlyoffice.crt and privkey.pem -> onlyoffice.key mv fullchain.pem onlyoffice.crt mv privkey.pem onlyoffice.key Restart docker container sudo docker restart {container_name_or_id} Wait about 3-5 min and try https://{domain_name}:444 There was no /app folder in my VPS so I create it, copy those two certificate files and rename them. I also try to convert them but there was an error. Regards.
Author
Owner

@igwyd commented on GitHub (Apr 1, 2021):

@PrzemekSkw
you dont need create folder /app, when you run command

sudo docker run -i -t -d -p 444:443 --restart=always
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver

folder /app will be created automatically

And please attach your error

<!-- gh-comment-id:811762895 --> @igwyd commented on GitHub (Apr 1, 2021): @PrzemekSkw you dont need create folder /app, when you run command ``` sudo docker run -i -t -d -p 444:443 --restart=always -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver ``` folder /app will be created automatically And please attach your error
Author
Owner

@PrzemekSkw commented on GitHub (Apr 1, 2021):

@igwyd so I don't need that line?
-e LETS_ENCRYPT_DOMAIN=your_domain -e LETS_ENCRYPT_MAIL=your_mail onlyoffice/documentserver

Edit.
Now it works. I use only :

sudo docker run -i -t -d -p 444:443 --restart=always \
> -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver

Thank You very much for help.
Regards.

<!-- gh-comment-id:811767829 --> @PrzemekSkw commented on GitHub (Apr 1, 2021): @igwyd so I don't need that line? `-e LETS_ENCRYPT_DOMAIN=your_domain -e LETS_ENCRYPT_MAIL=your_mail onlyoffice/documentserver` Edit. Now it works. I use only : ``` sudo docker run -i -t -d -p 444:443 --restart=always \ > -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver ``` Thank You very much for help. Regards.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#177
No description provided.