Onlyoffice
Aaron Peters’ obsession with productivity tools led to Onlyoffice, a roll-your-own alternative to Google Docs or Office 365.
Aaron Peters’ obsession with productivity tools led to Onlyoffice, a roll-your-own alternative to Google Docs or Office 365 that you can fire up at home.
All the free web applications on the internet give Linux users levels of productivity that was never available in the past. Thanks to webbased versions of applications like photo editors, notetakers and the obligatory office suite, people can use Linux and still easily collaborate with their counterparts. They can even use these across different machines, increasing their flexibility to work anywhere.
But these services present several potential risks. Firstly, using some web applications 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, complicated 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 functionality 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/spreadsheet/presentations); business applications 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 functionality 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 capabilities of Onlyoffice.
The Community Server, which is the web interface and provides related applications 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 applications, including both the ‘office suite’ apps as well as the business ones, and use this installation as our own personal alternative to Google Docs. As a ‘personal’ installation, let’s assume we won’t have to worry much about scalability, 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 instructions should work for other
distributions that support Docker as well. Fortunately, Ascensio provides a script to do the installation for us, which will also work on Red Hat-based distributions. 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 traditional Linux packages. We’ll select ‘Y’ here to use the Docker instance. The script will add the upstream Docker repositories, 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 installation, you’ll get a message that the system is starting up. Once it’s complete, you’ll start the configuration. 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 configurations, including the following:
Common/customization: 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 subdirectory 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 Authentication requirements, Trusted Mail Domains (users with these addresses can self-register), IP Security (restrict access to specific IP addresses), enable/disable Administrator Messages, and specify Session Lifetime timeout values.
You can also assign Access Rights to users on a moduleby-module basis.
Integration: This is an interesting 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 installation. 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 configuration screens here for the Mail Server and its related SMTP relay if your install includes those.
Statistics: Finally, the Statistics screen shows some important information such as storage used, number of active users, overall usage in graph format, and an option to enable Google Analytics.
Office applications
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), Spreadsheets and Presentations. You can click any of these to check out the application, 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 appropriate application. You’ll find the interfaces for these very familiar, although somewhat pared down compared to your desktop apps. For example, the spreadsheet application 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 configurations such as print size and orientation
Pivot Table – if you need one of these, you know what it is
Collaboration – enabling you to share with others, or protect your document from them!
Plugins – including macros and miscellaneous tools such as Youtube, for some reason.
There is a palette on the right, similar to
Libreoffice’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 applications 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 relationships between tasks – well,
one relationship, that being ‘finish-start’. More complex project plans might require some of the other predecessor types, but for simpler needs this one would suffice.
The customer relationship management (CRM) module uses the same ‘basics’ approach as Projects. It starts with Contacts, or people, though unlike some other systems it doesn’t distinguish 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 relationship with them by adding a note to their record each time something, uh, noteworthy
happens. Opportunities track your outstanding 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 interactions with all your clients and partners in line.
Onlyoffice includes a few other miscellaneous business tools, such as:
People – which manages your internal users and groups.
Talk – a chat application with room support, running on the Jabber protocol.
Community – a hodge-podge of shared information such as blogs, bookmarks, and events.
Calendar – that to our great joy automatically 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 applications (calendar, contacts, and tasks), the owncloud (or Nextcloud, if you prefer) ecosystems provide a lot more options. Fortunately, 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/ lxf253docserver 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/documentserver
Fortunately, if you elect to go solely with owncloud, getting it connected to the Onlyoffice Document Server is simple.
First, you’ll need an existing installation of owncloud. Walking through this installation is beyond the scope of this article, but http://bit.ly/ lxf253 dockercompose 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 Productivity. 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 Opendocument formats (ODT, ODS and ODP) in the format sections, then click the Save button. Now when you click a file of the appropriate 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 flexibility. Document Server running on its own provides editing services to other applications that need them, which can include both Community Server and owncloud.
Further exploration
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/lxf253restart should get you started with some of these commands.
Install SSL Certificates. 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 connections with SSL. See http://bit.ly/lxf253https for all the necessary steps.
Connect Desktop Editors. We’ve mentioned before that Onlyoffice provides its own desktop applications, and getting them installed is very simple. First, download the package from www.onlyoffice.com/ download-desktop.aspx. Next, install the prerequisites and then the package with:
sudo apt install libgtkglext1 fonts-crosextra-carlito sudo dpkg -i only office- desktopeditors_amd64.deb Finally, start the application from your app menu, or with the command onlyoffice-desktopeditors .
If you’re able to deal with some of the limitations 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 corporation, it provides all the tools you might need to collaborate with your colleagues, produce documents, track projects and drive sales.