Hi, i’m a student working on a project to create a social network with document handling capabilities. After some research, i’ve found that i can use OnlyOffice integrated with Mattermost.
Here’s what i have so far:
A virtual private server
A domain name
Self-signed certificates for the domain from Let’s Encrypt
A Mattermost installation with Docker (which also provides an Nginx configuration)
Mattermost is on port :8065
Nginx on :443 and :80
I need to add OnlyOffice to this setup, preferably as a Docker installation.
I’ve made two attempts both related to guides for installing OnlyOffice with docker, but i wasn’t able to get it working in either case. In both instances, i used the same virtual private server and domain name (making sure to choose available ports), for document server i’ve used 8443:443 and 8081:80.
Using “docker run" this guide, i was able to run OnlyOffice over HTTPS. However, when i tried to connect the plugin in Mattermost, it didn’t work.
Using “docker compose" this guide, OnlyOffice only runs over HTTP and i couldn’t get it to work over HTTPS. When i tried to connect to the plugin in Mattermost, it worked. I saw the “Open file in OnlyOffice” and “change access right” options with the new document icon, but when i tried to open a document, the editor didn’t show up and displayed a “something went wrong” message.
I apologize for the lengthy message, but i’m trying to make things as clear as possible. I also know that I’ve not posted any error or log, but i thought that it would be better to first choose which installation to go with. So, my questions are:
Is it possible to make this setup work using the same virtual private server and domain name?
We recommend separating the Document Server and Document Manager onto different servers.
The Document Server address must be accessible from the user’s browser and from the Mattermost server. Additionally, the Mattermost server address must be accessible from ONLYOFFICE Docs for correct functionality.
Verify the functionality of ONLYOFFICE Docs by launching the provided example.
Ensure mutual accessibility between Mattermost and ONLYOFFICE Docs.
I want to highlight that you are the first on the forum to integrate Mattermost!
Tag your topic with “Mattermost” for visibility.
What information is available in the browser’s console tab?
Open or create a new document and wait for the page to fully load.
Open the browser console (F12) and reload the page while keeping the console open.
Take screenshots of any error entries found in the Console and Network tabs.
Additionally, please provide the logs (Use a third-party storage solution) from the document server located at /var/log/onlyoffice/documentserver/ (in container) .
I may ask if i can get another vps, as for now, i’m trying using what i have.
I have set up a new installation using Docker Compose as mentioned in the initial message, and the editor is functioning properly, but only in http, in fact, to access the Document editor i’m using → http://[server-ip]:[port].
In Mattermost, with this configuration, the plugin result as enabled:
The plugin run only if i define the address as follow → http://[server-ip]:[port] (the same i use to access through browser) any other address made the plugin to stop.
The error confirms that the issue is related to HTTPS. However, as i mentioned earlier, i’m struggling to figure out how to enable it.
I’m using PuTTY for communicating with the server, after entering in the container at the given path there are those files, but they seems to be outdated, since i’m trying right now.
Also nginx.error.log is empty.
I apologize if the situation seems chaotic. This is my first time dealing with these configurations and I’m feeling a bit lost.
Mixed protocol error occurs because Mattermost server and DS use different secure protocols. To resolve the problem, you need to switch DS to HTTPS protocol.
To add HTTPS, In the Docker-DocumentServer directory, in the docker-compose.yml file, Add the parameters:
LETS_ENCRYPT_DOMAIN=your_domain
LETS_ENCRYPT_MAIL=your_mail
Where:
LETS_ENCRYPT_DOMAIN - the domain name to use for the certificate.
LETS_ENCRYPT_MAIL - the email used for registration and recovery contact.
Hi @Nikolas, thanks again for your reply!
Apologies for not noticing these environment variables earlier.
So, to effectively switch OnlyOffice to HTTPS while staying on the same VPS, is it sufficient to specify another subdomain (distinct from the Mattermost subdomain) in the provided environment variables within the docker-compose.yml file?
So, the configuration would include:
One VPS
Two subdomains
Mattermost with its own nginx configuration running on one subdomain
OnlyOffice with its own nginx configuration running on the other subdomain
Would this solution work?
Also, do i need to install certificates with Certbot before executing the container, or will Certbot handle the testing when i start the container?
Additionally, i apologize for the numerous questions, but could you tell me if certificates auto-renew, or if i need to add a function to handle this?