By Colince Azeye, Alibaba Cloud Tech Share Author. Tech Share is Alibaba Cloud's incentive program to encourage the sharing of technical knowledge and best practices within the cloud community.
In this article, we are going to see how to integrate OnlyOffice in Nextcloud with container in our Alibaba Cloud Elastic Compute Service (ECS) instance.
But before we start, I'm going to briefly introduce each component of this tutorial. We'll skip the details of Nextcloud for now as you can refer to this article on installing Nextcloud on ECS instead.
According to Wikipedia, Nextcloud is a suite of client-server software for creating and using file hosting services. Its functionally is similar to Dropbox, although Nextcloud is free and open-source, allowing anyone to install and operate it on a private server.
OnlyOffice is a feature-rich, comprehensive, open office, cloud-based office and productivity suite. Formerly called TeamLab Office, the software offers users with an integrated platform that has the core elements of online document editors, CRM, Document and Project Management tools.
Spreed is a free open-source (AGPL) WebRTC audio/video call and conferencing server that allows browsers to talk to each other in a peer-to-peer fashion. Spreed lets you securely communicate using rich audio-, video- and text chat, right from your Nextcloud installation in your browser.
Docker container is a standardized unit that can be created on the fly to deploy a particular application or environment. It is conceptually similar to virtualization technology but with the big difference in which the operating system is abstracted away from the containers.
Elastic Compute Service (ECS) is a type of computing services that feature elastic processing capabilities, with a simpler and more efficient management mode than physical servers.
Let's now see what is the goal of using Nextcloud and Onlyoffice on our ECS. Imagine that you have an organization that needs some tools for office collaboration or private sharing, while being up to date on all online assets. Nextcloud will allow you to connect with people, chat, share data, and collaborate while Onlyoffice will allow you to work with your Nextcloud contact in online document editors, manage your customer with CRM. Spreed will allow you to have conference calls on your Nextcloud easily. On top of that, running everything using containers will give you the flexibility in terms of app development, and also makes your system lighter.
Step 1: Update and upgrade your system. This two commands will do the job for you.
apt-get update
apt-get updgrade
Step 2: Install nginx server
apt-get install nginx
Check nginx state to make sure that is running. You can check it by two main ways.
Step 3: Install Docker
apt-get install docker.io
You can check the docker installation status and also the docker version.
service docker status
docker -v
As you can see in the image above, docker is now running in my ECS and the version is 1.6.2
Step 4: Install docker-compose:
sudo curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
It will download docker-compose and put it in you /usr/local/bin . So enter inside the folder and give the execution right to docker-compose. With the command
chmod +x docker-compose.
Inside the image there is all step I use to install docker compose. And the last command I check his version and for me is 1.17.1.
Step 5: Enable docker to auto-start with system boot.
Service docer reload
Step 6: Clone the githup repo after that enter inside the folder and enter the command
- cd docker-onlyoffice-nextcloud
- git submodule update -remote
Inside the image you can see all the commands and result enter to clone docker-onlyoffice-nextcloud .
Step 7: Deploy nextcloud-onlyoffice
Now enter the command : docker-compose up -d to start container in .yml file
You can see in the screenshot that docker container has successfully started. If you enter your ip address in your browser, you will see the nextcloud interface.
Note: If after you have completed all the steps above, but you don't see anything when entering your public IP address, then it's likely that your traffic is blocked. This means that you have to allow traffic on a specific port. To do that, you will need to configure the security groups and rules of your ECS.
Repeat the step above fpr Custom port Range 43/43.
You have allow in traffic from ports 80 and 43 for this tutorial to work, and the configuration above allows you to do so. You will also need to repeat the same step above for both ports 80 and 43, but change the Rule direction to Egress.
Once complete, access your Nextcloud server again.
This is the interface where you have to create your rules. Now let's assume that we are going to use SQLite as the database. Enter your admin user name and your admin password. Click to finish the setup.
As you can see you have to enter admin credential for first configuration. After few minutes, you will be redirect to your welcome page.
Now that we have set up how Nextcloud on ECS, if you click on the add button, you will not see OnlyOffice. So to set it, we have to go on the CLI and stand inside docker-onlyoffice-nextcloud folder. While inside, enter the command bash set-configuration.sh.
But before doing that we need to attach the public IP address to a valid domain name because OnlyOffice need a trusted domain to work. After the domain name configuration, you should see something as follows
Step 8: Install Spreed
We need to let Spreed WebRTC and Nextcloud to run on the same origin. That means Spreed and Nextcloud can be accessed using the same protocol scheme, the same domain and the same port.
Access your Nextcloud and find the "A" logo on the top right corner. Click on it then click on app. You will see all categories of apps, including installed apps, active apps, and updates. Now click on App bundles and look for "talk" and click to install it.
Note: If you were not able to find talk in app bundles, just enter "talk" on the search bar above and hit enter.
Now what if you want to speak with someone who is not on the platform? You can invite external chat participants with a URL. This chat remains open even when the user leaves a call, and enables participants to easily exchange messages, links, and notes. You can also secure your public group chat with a password.
That's it!
By the end of this, we set a complete containerized SaaS service on Alibaba Cloud ECS. We hope you found this tutorial useful!
How to Install Firewall on Ubuntu 16.04 for Your First Server on Alibaba Cloud
2,599 posts | 762 followers
FollowAlibaba Clouder - April 26, 2019
Alibaba Cloud Indonesia - November 5, 2021
Alibaba Clouder - January 2, 2019
Alibaba Clouder - May 14, 2019
Alibaba Clouder - January 25, 2018
GhulamQadir - January 1, 2020
2,599 posts | 762 followers
FollowLearn More
Elastic and secure virtual cloud servers to cater all your cloud hosting needs.
Learn MoreAlibaba Cloud Container Service for Kubernetes is a fully managed cloud container management service that supports native Kubernetes and integrates with other Alibaba Cloud products.
Learn MoreMore Posts by Alibaba Clouder