Linux Format

Onlyoffice

Aaron Peters’ obsession with productivi­ty tools led to Onlyoffice, a roll-your-own alternativ­e to Google Docs or Office 365.

- Aaron Peters is a business analyst and technical writer who will sometimes tolerate authoring outside of Emacs.

Aaron Peters’ obsession with productivi­ty tools led to Onlyoffice, a roll-your-own alternativ­e to Google Docs or Office 365 that you can fire up at home.

All the free web applicatio­ns on the internet give Linux users levels of productivi­ty that was never available in the past. Thanks to webbased versions of applicatio­ns like photo editors, notetakers and the obligatory office suite, people can use Linux and still easily collaborat­e with their counterpar­ts. They can even use these across different machines, increasing their flexibilit­y to work anywhere.

But these services present several potential risks. Firstly, using some web applicatio­ns comes with a price… literally. In many cases they use the ‘freemium’ model where the basic version is free, but the one with the features you really want will cost you. You also run the risk of the provider going out of business. They may not take your data down with them, but they may only give it back in a format that’s very difficult to work with. For many Linux users however, the biggest drawback is that you’re not in control of your data with these services. They store them on far-away servers, giving you access only through the interfaces they designate – and let’s not get into all the snooping naughty admins can do.

So like many things in the open source world, the only answer is to do it yourself. There are apps that easily let you host your own email, chat services, photo albums and media streamers. But an office suite is a huge, complicate­d piece of software, right? Certainly there’s nothing you can do to roll your own Google Docs or Office 365…

Well, you might think that, but you’d be wrong. There’s something precisely like that, and it’s called Onlyoffice. In this article we’ll take a look at Onlyoffice, explore all the functional­ity it provides on its own, and finally set it up for use as an online editor for office documents stored in an instance of owncloud.

Only an office

Onlyoffice from Ascensio is a software package that enables you to set up your own online office, complete with the following components: email; groupware (calendar/contacts/tasks); document tools (word processing/spreadshee­t/presentati­ons); business applicatio­ns including a CRM and a project management module. This could satisfy the vast majority of the computing needs of a ‘consumer’-type user, or indeed many small businesses. Plus, Onlyoffice is available to install on your own server – whether on-premises or in the cloud, for personal or commercial purposes – all for free, by installing its Community Edition. While this doesn’t come with a price, it does come with some caveats. Regardless, this is still a lot of functional­ity for the affordable price of zero. And what’s more satisfying that building something yourself, right? With that in mind, let’s get to installing this capable bit of software.

Spin up a server

Onlyoffice comes with three distinct components:

The Document Server, which provides the actual editing capabiliti­es of Onlyoffice.

The Community Server, which is the web interface and provides related applicatio­ns such as a calendar and project management (more on these later).

The Mail Server, which delivers and stores email. Since hosting your own mail can be kind of a tricky affair, we’re just going to set up the first two. Then we’ll be able to work with Onlyoffice’s applicatio­ns, including both the ‘office suite’ apps as well as the business ones, and use this installati­on as our own personal alternativ­e to Google Docs. As a ‘personal’ installati­on, let’s assume we won’t have to worry much about scalabilit­y, since we will be the only ones using it. As such, Docker will be a very clean and simple way to get Onlyoffice up and running.

While we’ll be installing this on an Ubuntu 18.04 Server, the instructio­ns should work for other

distributi­ons that support Docker as well. Fortunatel­y, Ascensio provides a script to do the installati­on for us, which will also work on Red Hat-based distributi­ons. It not only installs Onlyoffice, but also Docker and MYSQL Server and makes sure they’re all connected. We’ll see how this works once the system is up and running, but for the time being, you’ll only need to run a couple of quick shell commands.

As mentioned, we’re going to use Ascensio’s script to do the gruntwork for us. First, download it with the following command: wget http://download.onlyoffice.com/install/ opensource-install.sh

Make it executable:

chmod +x opensource-install.sh

Now, run it as root:

sudo bash opensource-install.sh -ims false

The -ims false flag instructs the script to install Onlyoffice without the mail component. The first part of the script asks if you want to install it via Docker, or using traditiona­l Linux packages. We’ll select ‘Y’ here to use the Docker instance. The script will add the upstream Docker repositori­es, update the package index and get Docker installed. Note that this would also work on Red Hat, only using the correct repos.

Note that it’s important not to install the Docker Snap package. It’s probably possible to get it working through this method, but out of the box there are some issues with trying to use Docker to access files outside its own container while running as a Snap, which is itself a container.

At this point the script will start pulling the necessary Docker components. You’ll see MYSQL first, then the Onlyoffice Document Server next, which provides the background document-editing services. The Community Server component, which is the web-based UI you’ll use to access everything, is the final piece of the puzzle. The script will even set up a swapfile (to the tune of 6GB, so make sure you have sufficient space) and start the containers for you. Feel free to confirm they’re running with the following command:

sudo docker ps

Now you should be able to visit the IP address of your server or virtual machine in a browser and see Onlyoffice in all its glory.

Only a setup

When you first navigate to the Onlyoffice installati­on, you’ll get a message that the system is starting up. Once it’s complete, you’ll start the configurat­ion. On the first screen, you need to choose a password, your language, time zone and provide an email address. Finally, accept the licence agreements and click Continue. At this point, you’re forwarded to the home screen for Onlyoffice. All the apps are listed there for your perusal, including Documents, Projects, CRM and others. But before you dive in, click the gear icon in the upper right of the screen to go to Settings.

The first thing you’ll notice here is the banner at the top reminding you to activate your account. The email address you provided in the initial screen should have a message containing a link to confirm. Click that, and you’ll be asked to log in with your email and the password you entered. Once you’re back inside Onlyoffice, go back to Settings for one more tweak (the yellow banner should be gone now). Since we don’t have an email server attached to this instance, we can turn that off. Click the Modules & Tools link on the left side. This screen enables you to select the components you want.

Since we don’t have a mail server associated, we can untick the Mail item, then click Save. Now if you go back to the home screen (click the Onlyoffice logo), you’ll see that option isn’t available anymore.

You can also check the Settings section for some other useful configurat­ions, including the following:

Common/customizat­ion: This Settings Module enables you to make selections such as Language/ Time Zone, Welcome Page Settings (which page will appear when a user logs in), DNS Settings (an alternate URL for Onlyoffice), Portal Renaming (the URL subdirecto­ry that appears to be related to the cloud service), Team Template (which specifies the label for common fields), and Color Themes.

Security: Here is where you’ll configure settings like Password Strength, Two-factor Authentica­tion requiremen­ts, Trusted Mail Domains (users with these addresses can self-register), IP Security (restrict access to specific IP addresses), enable/disable Administra­tor Messages, and specify Session Lifetime timeout values.

You can also assign Access Rights to users on a moduleby-module basis.

Integratio­n: This is an interestin­g area that allows you to do two things. The first is connect other web apps such as Dropbox (for storage) or Wordpress (as a link) to your Onlyoffice installati­on. If you’re a small business, this can become your one-stop shop for your employees’ needs! The second is to point to the Document Server, in the event it was installed separately (you’ll see the need for this later). There are also configurat­ion screens here for the Mail Server and its related SMTP relay if your install includes those.

Statistics: Finally, the Statistics screen shows some important informatio­n such as storage used, number of active users, overall usage in graph format, and an option to enable Google Analytics.

Office applicatio­ns

Clicking on the (maybe too) large Documents link on the home page leads you to a screen containing sample versions of the three major document types: Documents (word processing), Spreadshee­ts and Presentati­ons. You can click any of these to check out the applicatio­n, or use the Create button at top-left to create one from scratch.

When you launch a file, it opens in a new tab in the appropriat­e applicatio­n. You’ll find the interfaces for these very familiar, although somewhat pared down compared to your desktop apps. For example, the spreadshee­t applicatio­n contains only six ribbon-style menus, these being:

Home – containing styling/formatting and cut/copy/ paste controls

Insert – for dropping in graphics or equations Layout – page-level configurat­ions such as print size and orientatio­n

Pivot Table – if you need one of these, you know what it is

Collaborat­ion – enabling you to share with others, or protect your document from them!

Plugins – including macros and miscellane­ous tools such as Youtube, for some reason.

There is a palette on the right, similar to

Libreoffic­e’s, which gives you relevant options for the currently selected item. Finally, a File menu at the top left enables you to download the current document in a number of formats. If you’ve used recent versions of free office suites, you should feel very much at home with these office apps.

We mean business!

In addition to your general-use business documents, Onlyoffice has two key business applicatio­ns built in: Projects and CRM. The first enables you to create a project, break it down into tasks and assign them to people. You can even set up groups of tasks into phases, and define relationsh­ips between tasks – well,

one relationsh­ip, that being ‘finish-start’. More complex project plans might require some of the other predecesso­r types, but for simpler needs this one would suffice.

The customer relationsh­ip management (CRM) module uses the same ‘basics’ approach as Projects. It starts with Contacts, or people, though unlike some other systems it doesn’t distinguis­h between a ‘lead’ and a ‘client’. You can associate multiple Contacts with a given company, and add all the glorious details for each person. These include:

A type, such as Client or Vendor.

Position, email addresses, phone numbers, physical addresses, websites and so on.

Tags and other custom fields to organise them. A picture.

Once you have some Contacts set up, you can begin to track your relationsh­ip with them by adding a note to their record each time something, uh, noteworthy

happens. Opportunit­ies track your outstandin­g proposals with them, and when you inevitably win their business you can associate the Projects and resulting Invoices with them. Onlyoffice provides a very capable system for keeping the interactio­ns with all your clients and partners in line.

Onlyoffice includes a few other miscellane­ous business tools, such as:

People – which manages your internal users and groups.

Talk – a chat applicatio­n with room support, running on the Jabber protocol.

Community – a hodge-podge of shared informatio­n such as blogs, bookmarks, and events.

Calendar – that to our great joy automatica­lly pulled in tasks from both Projects and CRM, to display alongside ad-hoc to-dos for an actual unified action list for the day. It even shows other users’ birthdays and Community Events shared with you.

Into an owncloud

While Onlyoffice does come with a set of groupware applicatio­ns (calendar, contacts, and tasks), the owncloud (or Nextcloud, if you prefer) ecosystems provide a lot more options. Fortunatel­y, Onlyoffice offers an app that enables you to plug the two right in.

However, there is one caveat: you won’t be able to integrate owncloud with the Community Server we installed using Ascensio’s handy script. This doesn’t mean you can’t use both – you’ll just have to roll up your sleeves and connect Document Server to Community Server by hand. See http://bit.ly/ lxf253docs­erver in the Onlyoffice Help Center for how to do so.

Instead, you’ll want to install Document Server on its own (ideally on a completely different machine) with the following command: sudo docker run -i-t-d-p 80:80 --restart=always onlyoffice/documentse­rver

Fortunatel­y, if you elect to go solely with owncloud, getting it connected to the Onlyoffice Document Server is simple.

First, you’ll need an existing installati­on of owncloud. Walking through this installati­on is beyond the scope of this article, but http://bit.ly/ lxf253 dockercomp­ose makes the process easy. Once you’re logged into owncloud (you’ll land on the Files screen at first), go to the Market link from the menu in the upper-left corner. You’ll find the Onlyoffice app under the Tools section, which is a crime because it clearly belongs in Productivi­ty. Click the Install button to install the app.

Once it’s installed, go to Settings > Admin > Additional, where you’ll see a new section for Onlyoffice. Enter the IP address where the Document Server is running in the ‘Document Editing Service address’ field. You can (and should!) also enable the Opendocume­nt formats (ODT, ODS and ODP) in the format sections, then click the Save button. Now when you click a file of the appropriat­e format, it will open in a new tab in the relevant Onlyoffice editor.

This method takes a little more effort, with a pay-off of greater flexibilit­y. Document Server running on its own provides editing services to other applicatio­ns that need them, which can include both Community Server and owncloud.

Further exploratio­n

Now that the system is running, there are a couple of things you could do to further tighten things up.

Set up scripts to start and stop Onlyoffice. The system comprises three Docker containers: MYSQL, the Document Server (which provides document processing in the background), and the Community Server (which provides the web frontend). The Ascensio script we ran sets all of these to ‘always restart’, meaning that when you reboot your machine they’ll spin up again.

But if you installed this on your normal PC, you may not want this running all the time. So you could set up a couple of scripts to bring the service down (in the order Community Server, then Document Server, then MYSQL), and another to bring it back up again in reverse order. http://bit.ly/lxf253rest­art should get you started with some of these commands.

Install SSL Certificat­es. Onlyoffice is by default unsecured, running on port 80. If this is just for you and you’re accessing it, for example, over VPN or SSH tunnel, maybe this part isn’t so important.

But if this is exposed to the internet, you’ll want to consider securing your connection­s with SSL. See http://bit.ly/lxf253http­s for all the necessary steps.

Connect Desktop Editors. We’ve mentioned before that Onlyoffice provides its own desktop applicatio­ns, and getting them installed is very simple. First, download the package from www.onlyoffice.com/ download-desktop.aspx. Next, install the prerequisi­tes and then the package with:

sudo apt install libgtkglex­t1 fonts-crosextra-carlito sudo dpkg -i only office- desktopedi­tors_amd64.deb Finally, start the applicatio­n from your app menu, or with the command onlyoffice-desktopedi­tors .

If you’re able to deal with some of the limitation­s of Onlyoffice’s Community Edition, you can get a lot of power out of this package. Whether you’re a solo freelancer, part of a small company or a standalone workgroup in a large corporatio­n, it provides all the tools you might need to collaborat­e with your colleagues, produce documents, track projects and drive sales.

 ??  ?? Ascensio was kind enough to create a script that downloads, installs and connects all the system components.
Ascensio was kind enough to create a script that downloads, installs and connects all the system components.
 ??  ??
 ??  ?? The Settings screen has a number of sub-options, from removing unwanted components to connecting cloud services.
The Settings screen has a number of sub-options, from removing unwanted components to connecting cloud services.
 ??  ?? While heavy-duty project management offices may find Onlyoffice a little lacking, it’s a simple and capable way to manage your team.
While heavy-duty project management offices may find Onlyoffice a little lacking, it’s a simple and capable way to manage your team.
 ??  ?? Despite the browser environmen­t, the interface for document apps is very familiar.
Despite the browser environmen­t, the interface for document apps is very familiar.
 ??  ?? While you won’t be able to use the very handy script, installing components separately enables you to integrate with other systems like owncloud.
While you won’t be able to use the very handy script, installing components separately enables you to integrate with other systems like owncloud.

Newspapers in English

Newspapers from Australia