Try the fastest and simplest way to install ONLYOFFICE

Running Document Server with valid SSL cert

Questions/problems on Docker

Running Document Server with valid SSL cert

Postby Bitz0r » Tue Aug 29, 2017 5:00 pm

Hi Guys!

First:
It's my first try to create a document server combination with a nextcloud instance.
My main Problem is, that my SSL certificate isn't valid. -> You can connect via :443 and https without any problem.

I don't know why..
This is the tutorial which I used:
https://helpcenter.onlyoffice.com/de/se ... https.aspx

openssl genrsa -out onlyoffice.key 2048
openssl req -new -key onlyoffice.key -out onlyoffice.csr
openssl x509 -req -days 365 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt
openssl dhparam -out dhparam.pem 2048

then:
mkdir -p /app/onlyoffice/CommunityServer/data/certs
cp onlyoffice.key /app/onlyoffice/CommunityServer/data/certs/
cp onlyoffice.crt /app/onlyoffice/CommunityServer/data/certs/
cp dhparam.pem /app/onlyoffice/CommunityServer/data/certs/
chmod 400 /app/onlyoffice/CommunityServer/data/certs/onlyoffice.key


After that:
docker run -i -t -d -p 80:80 -p 443:443 \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data onlyoffice/communityserver


is that correct?
do i need to set more configuration parameters for the ssl cert like so?:

docker run -i -t -d -p 80:80 -p 443:443 \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data
-e SSL_KEY_PATH=/app/onlyoffice/CommunityServer/data/certs/onlyoffice.key \
onlyoffice/communityserver

Thanks for your answer!
I'm ready to learn new things :)!
Bitz0r
 
Posts: 6
Joined: Tue Aug 29, 2017 4:54 pm

Re: Running Document Server with valid SSL cert

Postby Maxim » Wed Aug 30, 2017 6:47 am

Hello Bitz0r!
The instruction you used is for Community Server only, but you mentioned document server combination with a nextcloud instance. There is a great difference between Community Server and Document Server.
So, if you want your nextcloud server to work with the Document Server you need to install our ownCloud/Nextcloud ONLYOFFICE integration app, also you need to install the Document Server (docker or deb) and configure ONLYOFFICE integration app.
Please visit our Helpcenter. It will help you!
Ask your questions - we will try to help you! 8-)
Maxim
 
Posts: 1229
Joined: Tue Oct 11, 2016 2:34 pm

Re: Running Document Server with valid SSL cert

Postby Bitz0r » Wed Aug 30, 2017 10:23 am

Shit omg sorry my mistake!

First:
Thanks for your answer!
https://api.onlyoffice.com/editors/owncloud <- i've already done this. I'm also able to edit files via nextcloud - documentserver connection


To my post above: Sorry i copied wrong things.
I actually installed documentserver described : https://github.com/ONLYOFFICE/Docker-DocumentServer

docker run -i -t -d -p 443:443 \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver

After that, the documentserver is avaiable on https://myinstance without any problem.
The only problem is, that I don't know why my ssl cert is not valid.

Since my Nextcloud SSL certificate is valid, it looks just stupid when the red icon is displayed with "The connection is not secure"

I hope its now clear what I mean :D
Sorry for my mistake!
Bitz0r
 
Posts: 6
Joined: Tue Aug 29, 2017 4:54 pm

Re: Running Document Server with valid SSL cert

Postby Maxim » Thu Aug 31, 2017 6:42 am

Hello Bitz0r!
1 What SSL certs do you use self-signed or CA?
2 What instruction did you follow to run Document Server with https? Where did you put certs in Document Server?
Maxim
 
Posts: 1229
Joined: Tue Oct 11, 2016 2:34 pm

Re: Running Document Server with valid SSL cert

Postby Bitz0r » Thu Aug 31, 2017 9:34 am

Hi!
thanks for your answer!

1.) Self-Signed done by:
Code: Select all
openssl genrsa -out onlyoffice.key 2048
openssl req -new -key onlyoffice.key -out onlyoffice.csr
openssl x509 -req -days 365 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt
openssl dhparam -out dhparam.pem 2048


2.)
I've running the document server with this way:
Code: Select all
docker run -i -t -d -p 443:443 \
    -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  onlyoffice/documentserver

as in the "-v" parameter standing, the document path is:
/app/onlyoffice/DocumentServer/data

and my certs are in:

/app/onlyoffice/DocumentServer/data/certs done with this:

Code: Select all
mkdir -p /app/onlyoffice/DocumentServer/data/certs
cp onlyoffice.key /app/onlyoffice/DocumentServer/data/certs/
cp onlyoffice.crt /app/onlyoffice/DocumentServer/data/certs/
cp dhparam.pem /app/onlyoffice/DocumentServer/data/certs/
chmod 400 /app/onlyoffice/DocumentServer/data/certs/onlyoffice.key


Do I need to start the document server with additonal ENV params like:
Code: Select all
SSL_KEY_PATH
SSL_CERTIFICATE_PATH
SSL_DHPARAM_PATH 
?
If yes, i've already tried this maybe wrong :(
Bitz0r
 
Posts: 6
Joined: Tue Aug 29, 2017 4:54 pm

Re: Running Document Server with valid SSL cert

Postby Bitz0r » Thu Aug 31, 2017 10:46 am

I've done it.

Actually i solved this problem via creating ssl certs via lets encrypt :)
It works everything fine now.
Bitz0r
 
Posts: 6
Joined: Tue Aug 29, 2017 4:54 pm

Re: Running Document Server with valid SSL cert

Postby Maxim » Mon Sep 04, 2017 9:32 am

Hello Bitz0r!
That's great!
Maxim
 
Posts: 1229
Joined: Tue Oct 11, 2016 2:34 pm


Return to Docker Version

Who is online

Users browsing this forum: No registered users and 1 guest