How to deploy OnlyOffice on server with ease using Docker service

500

A couple of wordsabout the product

OnlyOffice groupware is aimed at small and medium business and consists of the following tools: Project and document management; Gantt Chart;CRM and Invoicing;Mail Aggregator. Moreover, it implies third-party services integration such as Box, Sharepoint,OwnCloud to create a single workspace.

The product is cross-platform and you can choose the appropriate installation file + take a screentour here: https://www.onlyoffice.com/open-source.aspx

Docker service

Working on the Linux version we tried to do our best to simplify this process and used Docker as an Aladdin’s lampopen-source project that automates the deployment of applications inside software containers.

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).

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

Good news: OnlyOffice installation process takes just a few minutes – music to Linux new comers ears, and for eyes as well: https://www.youtube.com/watch?v=LvFffFIawa8.

Installing ONLYOFFICE

Run Docker and execute the following command:

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

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 ascensiosystemsia/onlyoffice-commonserver

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

sudo docker run -i -t -d -p 80:80 -p 443:443 -v /opt/onlyoffice/Data:/var/www/onlyoffice/Data ascensiosystemsia/onlyoffice-commonserver

In this case you will need to create and install the following files:

/opt/onlyoffice/Data/certs/onlyoffice.key

/opt/onlyoffice/Data/certs/onlyoffice.crt

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! Djinn is out – you can start working in your office!

Share your experience with us if it was a kind of magic for you too.

If Djinn got stuck in thelamp, we invite you to visit ONLYOFFICE Developers forum: http://dev.onlyoffice.org/