Jack Wallen walks you through the process of quickly deploying the ownCloud file-sharing and collaboration platform with the help of Docker.
ownCloud is a powerful cloud-based file hosting and sharing suite of tools. It is also an outstanding option for collaboration that features data access, syncing and sharing, versioning, encryption, drag-and-drop uploading, and theming. ownCloud is enterprise-ready and supports open standards.
SEE: Hiring Kit: Cloud Engineer (TechRepublic Premium)
For the most part, installing ownCloud manually isn’t all that challenging. But there may be times when you need or want to deploy an instance quickly. When those moments arise, Docker is there to serve. With the help of this container runtime engine, you can get ownCloud up and running in a couple of minutes. And that’s exactly what I’m going to show you.
What you’ll need to deploy ownCloud with Docker
To get ownCloud deployed via Docker, you’ll need an operating system that supports Docker. I’ll be demonstrating on Ubuntu Server 22.04, which will also need a user with sudo privileges for the installation of Docker. That’s it; let’s get to the deployment.
How to install Docker
For those who don’t already have Docker installed, allow me to show you how to get the latest community edition version up and running.
The first thing to be done is to add the official Docker GPG key with the command:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Next, add the official Docker repository:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Now, we can install a few dependencies. This is done with the command:
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release -y
Update apt with the command:
sudo apt-get update
Finally, we can install the latest version of the Docker engine as well as the docker-compose command with:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose -y
To finish things up, make sure your user is a member of the docker group:
sudo usermod -aG docker $USER
Log out and log back in, so the changes take effect.
How to deploy ownCloud with Docker Compose
First, let’s create a folder to house the necessary files. Do this with:
Change into that directory with:
Create the necessary .env file with:
In that file, paste the following:
WNCLOUD_VERSION=10.11 OWNCLOUD_DOMAIN=SERVER:8080 ADMIN_USERNAME=USERNAME ADMIN_PASSWORD=PASSWORD HTTP_PORT=8080
Where SERVER is your hosting server’s IP address or domain, USERNAME is the username you want to use for the admin user, and PASSWORD is the password to be used for the admin user.
Save and close the file.
Next, download the .yml file with:
Finally, deploy the container with:
docker-compose up -d
The above command will deploy ownCloud with persistent storage, using the following volumes:
You’ll want to give the container a moment to fully deploy.
How to access ownCloud
To access your new deployment, open a web browser and point it to http:/SERVER:8080, where SERVER is either the IP address or domain of the hosting server, and then, use the admin username and password you stored in the .env file.
And that’s all there is to deploying ownCloud with Docker. It shouldn’t take you but two to five minutes to get this completed.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.
Source of Article