Recommend us with Google

How to Install ONLYOFFICE in Just a Few Minutes Using Docker Service

Installing ONLYOFFICE on a local server might raise some questions especially among ordinary users. Working on the Linux version we tried to do our best to simplify this process and turned attention to Docker, a technology that once got its start, quickly gained popularity in 2014.

What is Docker?

From the Internet sources we know that Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux.

In simple words, thanks to the containers Docker provides the fastest and easiest way to deploy and run any application on any Linux machine regardless its settings and software installed.

Why we opted for Docker?

We always keep up to date with latest technology trends and try to make an effective use of them in our work. Docker was just what we needed at the moment.

As you know, to work correctly ONLYOFFICE requires some additional components to be installed on the machine, like Mono version 3.2 or later, MySQL version 5.6 or later etc. (the full system requirements list can be found here). Moreover ONLYOFFICE itself comprises many libraries you need to compile. But even if your machine meets all the system requirements and you use the installation file instead of compiling the source code, some installation issues might occur. The fact is that your machine settings and environment could differ from those of the machine used for writing and testing the code. Docker allows to avoid this.

Docker container comprises not only ONLYOFFICE but also all dependencies necessary for its correct work. All you need is to execute one single command.

Get Started

Let’s see how it works:

So the installation process takes just a few minutes and doesn’t require any specific experience.

Now let’s get a look at this process in more details.

System Requirements

Before starting the installation process, please check if your machine meets these minimum system requirements:

RAM: 2 GB or more

Swap file: at least 2 GB

HDD: at least 2 GB of free space

Distributive: 64-bit Red Hat, CentOS or other compatible distributive with kernel version 3.8 or later, 64-bit Debian, Ubuntu or other compatible distributive with kernel version 3.8 or later

Docker: version 1.4.1. or later

Please, note: the latest versions of many Linux distributives come with the docker.io package that install Docker 1.0.1. So you will still need to install the most recent release of Docker. To do that, please read the Installationsection of the Docker documentation.

Installing ONLYOFFICE

Run Docker and execute the following command:

sudo docker run -i -t -d -p 80:80 onlyoffice/communityserver

This command will download the dockerfile from Docker Hub and launch the container running ONLYOFFICE and all the dependencies necessary for its work.

Configuring ONLYOFFICE

If you wish to run ONLYOFFICE on a different port, change the value of the -p command. For example, to run your office on 8080 port, use the following command:

sudo docker run -i -t -d -p 8080:80 onlyoffice/communityserver

To prevent unauthorized access to the information, you can secure the access to ONLYOFFICE using SSL (HTTPS). To do that, execute the following command:

The step by step instructions on how it can be done are available on the ONLYOFFICE profile page of Docker official website.

Running ONLYOFFICE

After everything is installed, you can open your portal in the web browser at the localhost address (http://127.0.0.1) on the local machine. The Welcome page will open.

Enter a password and specify the email address you will use to access your ONLYOFFICE the next time. To complete the activation process, just follow the link provided in the email that will be sent at the specified email address.

That is all! You can start working in your office!

Did you try to install ONLYOFFICE using Docker service? Please share your experience here in the comments.

Tried this out, and it worked excellently for my needs. I’m building a library for interfacing with ONLYOFFICE project tasks in Python, and having a disposable ONLYOFFICE server instance for testing is immensely helpful.

I followed the instructions there and it didn’t work. Bad Gateway once. And the second time I couldn’t log in to the server after the install. Am I supposed to do anything with the DockerFile? All I did was copy the commands in each step into my terminal. There were no errors. So I thought all was well. But it didn’t work. Also, I don’t know where to find the files once they are installed. Also, do I just go to my IP address in my browser? Thanks.

I tried installing only the document server ( docker run -i -t -d -p 80:80 onlyoffice/documentserver ) and that worked. But I also want the community server. Can I just add that by using the command line in step 3?

Hi,
I’ve successfully run the documentserver on docker but the localization is not right, I would like to change it to my it locale. Do you know how to do that? I see there are json files with strings but I can’t find where to set to use it.json
Hope you know
Regards

I installed onlyoffice doc server smoothly as per given instructions. My concern is as how would I login to mysql server of the onlyoffice to work on a particular database/table.
Since it’s all packed up in the docker, I don’t think simply typing ‘mysql -u root -p’ would take me to onlyoffice mail instance?

Hi! I’ve installed OnlyOffice with Docker and it works verry well, but when I turn off the machine and start again, all data are lost, and the wizard starts again. I don’t know what happen. Please help me, Thanks!

I tried different installation methods, they usually work fine. But eventually I had an issue with https.
I ran a document server instance with docker and works fine with http but it doesn’t with https.
Even if I try to reach the internal image ip address, it gives me error:
wget https://172.17.0.2
–2016-02-24 14:00:48– https://172.17.0.2/
Connecting to 172.17.0.2:443… failed: Connection refused.