USING IRONSECUREDOC

Nextcloud Docker Compose (How it Works for Developers)

Published December 16, 2024
Share:

What is Docker?

Docker is a free, open-source framework that automates the deployment and scaling of applications within lightweight containers. It packages application code together with all dependencies, such as libraries, tools, and configurations, within one package and runs uniformly across any environment, be it your developer's laptop the test server, or the actual production cloud server.

Broken image Add from Pixabay, select from your files or drag and drop an image here.

Containers are not the same as traditional virtual machines either. Containers share the OS kernel of a host system, thus making it much more efficient and faster to launch.

That is, it defines an application and thus, in effect, its environment through Docker images are basically templates for the creation of containers. Orchestration tools include Docker Compose for multi-container applications, and the central repository where we share images is Docker Hub.

What is Nextcloud?

Nextcloud Docker Compose illustrates how to use Docker containers to provide an isolated, portable, and scalable environment for the self-hosted cloud storage application Nextcloud. This popular solution supports file storage and sharing, calendars, contacts, and more, while allowing full control over data.

Nextcloud Docker Compose (How it Works for Developers): Figure 2

It does simplify the setup because now dependencies like PHP and the web server are contained within one container; thereby Docker makes things much easier when it comes to the installing and managing of Nextcloud. Also, this provides the guarantee that everything would run identically across different environments, and therefore one could easily deploy onto a different system.

Running Nextcloud in Docker is easy, modular, and scalable. For example, in a multi-container setup using Docker Compose, you run separate containers for the Nextcloud database (e.g., MySQL or MariaDB), caching (e.g., Redis), and the Nextcloud application itself. This adds flexibility, allowing for easier management and scalability of Nextcloud instances.

Features of Nextcloud

The good thing with Nextcloud Docker is the ease of deployment and management features that Nextcloud comes with. It has all the major key features as listed below:

  • Simplified Setup: It is easy to install since Docker carries all dependencies that are installed with it, such as PHP and the web server. Thus, everything is in one container for speedy and hassle-free installation and configuration.
  • Portability: The Docker containers are portable across different environments and nodes. So the server or cloud environment does not cause compatibility issues when you wish to move your Nextcloud instance from one to another.
  • Isolation: Each Nextcloud container is insulated from the host system and other containers; thus, the dependency and configuration do not clash with other services on the same machine.
  • Scalability: This will give you the least hassle about scaling up while using Nextcloud using Docker Compose in addition to containers in the database, cache, or other load balancer services as well. Then, through this way of modularity, you'll attain good performances in large-scale environments.
  • Persistent Storage: Mounting storage volumes outside the container keeps data persistent even after a container restart or upgrade.
  • Easy upgrades: you can simply upgrade Nextcloud or its dependency via Docker. You pull in a fresh version of an image You restart your container Updates get done, and no confusing migrations are necessary Modularity-You can run Next to services like Redis as a layer for Cache or MariaDB as a database; this results in micro-services style architecture.
  • Security: Isolation of Docker is inherent, which minimizes the attack surface since it will separate Nextcloud's environment from its host and other applications.

All these features make Nextcloud Docker an easy and efficient solution for hosting your private cloud infrastructure.

Below is the simple architecture of the Nextcloud.

Broken image Add from Pixabay, select from your files or drag and drop an image here.

Install Nextcloud

Prerequisites

  • Windows 10/11 (Pro, Enterprise, or Education) with WSL 2 support.
  • Docker Desktop is installed and running on Windows.
  • Basic familiarity with using a terminal or command prompt.

Pull the Nextcloud Docker Image

We need to pull the official Nextcloud Docker image from Docker Hub.

Open your terminal and run the following command:

docker pull nextcloud
docker pull nextcloud
'INSTANT VB TODO TASK: The following line uses invalid syntax:
'docker pull nextcloud
VB   C#

Or open the docker application and search for the container name in the search box.

Nextcloud Docker Compose (How it Works for Developers): Figure 4

This will download the latest docker-compose file of Nextcloud. To run the Nextcloud installation enter the below command on the command prompt.

docker run -d -p 8080:80 nextcloud
docker run -d -p 8080:80 nextcloud
'INSTANT VB TODO TASK: The following line uses invalid syntax:
'docker run -d -p 8080:80 nextcloud
VB   C#

Nextcloud Docker Compose (How it Works for Developers): Figure 5

Once the above code is run it will create Nextcloud custom volumes in the docker environment.

Setup MariaDB for Database

It requires a database to store its Nextcloud data. We can use MariaDB as your drop-in replacement for MySQL.

First of all, pull the MariaDB image:

docker pull mariadb
docker pull mariadb
'INSTANT VB TODO TASK: The following line uses invalid syntax:
'docker pull mariadb
VB   C#

Now create the MariaDB container using this command:

docker run -d \
  --name nextcloud-db \
  -e MYSQL_ROOT_PASSWORD=your_root_password \
  -e MYSQL_DATABASE=nextcloud \
  -e MYSQL_USER=nextcloud_user \
  -e MYSQL_PASSWORD=your_password \
  mariadb
docker run -d \
  --name nextcloud-db \
  -e MYSQL_ROOT_PASSWORD=your_root_password \
  -e MYSQL_DATABASE=nextcloud \
  -e MYSQL_USER=nextcloud_user \
  -e MYSQL_PASSWORD=your_password \
  mariadb
'INSTANT VB TODO TASK: The following line uses invalid syntax:
'docker run -d \ --name nextcloud-db \ -e MYSQL_ROOT_PASSWORD=your_root_password \ -e MYSQL_DATABASE=nextcloud \ -e MYSQL_USER=nextcloud_user \ -e MYSQL_PASSWORD=your_password \ mariadb
VB   C#

Replace your_root_password and your_password with strong passwords of your choice. This command will create the running MariaDB container with the name Nextcloud db, along with a new database called nextcloud and a user called nextcloud_user. mounting custom storage volumes is possible with the Nextcloud container.

Nextcloud Web Interface

Open a web browser on your computer.

Enter your server's IP address or domain name where Nextcloud is hosted in the address bar:(Nextcloud is also can be run through reverse proxy)

http://localhost:8080/
http://localhost:8080/
http: 'localhost:8080/
VB   C#

Setup the Admin Account

You’ll see the Nextcloud setup page, where you can create an admin user. Also, the Nextcloud Command Line Interface (CLI) is available for managing configurations and setups if needed.

Nextcloud Docker Compose (How it Works for Developers): Figure 6

Admin username: Here is the first admin user username with which the primary account must be created.

Admin password: This is the password one needs to set for the new admin username. Also, we can use database environment variables defaults to configure the DB setup.

Config Database

Scroll down to the "Database" section of the installation page. The database user is the username provided during setup. The database password is the password for the database username. The database name is the name of your database.

Nextcloud Docker Compose (How it Works for Developers): Figure 7

Database host: Use localhost if you're hosting the database locally, or use the database container name if you're using Docker (e.g., Nextcloud db).

Fill up all the details and then you can click on Finish Setup.

Nextcloud Docker Compose (How it Works for Developers): Figure 8

Nextcloud will now configure the database and will complete the setup. It should take a couple of minutes to complete the whole process. Nextcloud merges configuration files to run efficiently. Nextcloud also allows us to configure an object storage server.

After you have the data config files and installed them, the system will automatically forward you to a login page which is the user interface for Nextcloud.

Use the admin username and password you entered during installation to access the login.

Nextcloud Docker Compose (How it Works for Developers): Figure 9

Once you are logged in, you find yourself on the Nextcloud dashboard where you can start looking after your cloud files, calendars, and contacts.

Nextcloud Docker Compose (How it Works for Developers): Figure 10

What is IronSecureDoc?

IronSecureDoc is one document security tool to be used for encrypting redacting, and digital signing sensitive files. It is used for securing PDFs, which will then make one control their personal data and confidential information in hand.

Nextcloud Docker Compose (How it Works for Developers): Figure 11 - IronSecureDoc

Its features include password protection, compliance with standards, and digital certification for use mainly in health care, finance, and law. It is available as a REST API, integrated with other workflows, and is applicable as a docker for scalable, cloud-friendly security solutions.

Install and Running IronSecureDoc

Use this command to pull the Docker image IronSecureDoc from the repository in an open terminal window or Command Prompt.

docker pull ironsoftwareofficial/ironsecuredoc
docker pull ironsoftwareofficial/ironsecuredoc
'INSTANT VB TODO TASK: The following line uses invalid syntax:
'docker pull ironsoftwareofficial/ironsecuredoc
VB   C#

Nextcloud Docker Compose (How it Works for Developers): Figure 12

With this Docker container now pulling an image, use another command to start off a new running container called IronSecureDoc.

docker container run --rm -p 8080:8080 -e IronSecureDoc_LicenseKey=<IRONSECUREDOC_LICENSE_KEY> -e ENVIRONMENT=Development -e HTTP_PORTS=8080 ironsoftwareofficial/ironsecuredoc:latest
docker container run --rm -p 8080:8080 -e IronSecureDoc_LicenseKey=<IRONSECUREDOC_LICENSE_KEY> -e ENVIRONMENT=Development -e HTTP_PORTS=8080 ironsoftwareofficial/ironsecuredoc:latest
'INSTANT VB TODO TASK: The following line uses invalid syntax:
'docker container run --rm -p 8080:8080 -e IronSecureDoc_LicenseKey=<IRONSECUREDOC_LICENSE_KEY> -e ENVIRONMENT=Development -e HTTP_PORTS=8080 ironsoftwareofficial/ironsecuredoc:latest
VB   C#

Nextcloud Docker Compose (How it Works for Developers): Figure 13

Using IronSecureDoc with Docker Container

It can be accessed after the installation, where one installs it and launches Docker to redact, certify, and encrypt the documents using its REST API which is also mentioned elsewhere. API Endpoints and Documentation: You can find here http://localhost:8080/swagger/index.html.

Nextcloud Docker Compose (How it Works for Developers): Figure 14

To submit a document for encryption, a POST request may be sent to the IronSecureDoc API:

curl -X 'POST' \
  'http://localhost:8080/v1/document-services/pdfs/encrypt?user_password=demo' \
  -H 'accept: */*' \
  -H 'Content-Type: multipart/form-data' \
  -F 'pdf_file=@test.pdf;type=application/pdf'
curl -X 'POST' \
  'http://localhost:8080/v1/document-services/pdfs/encrypt?user_password=demo' \
  -H 'accept: */*' \
  -H 'Content-Type: multipart/form-data' \
  -F 'pdf_file=@test.pdf;type=application/pdf'
'INSTANT VB TODO TASK: The following line uses invalid syntax:
'curl -X 'POST' \ 'http: -H 'accept: */ *' \ -H 'Content-Type: multipart/form-data' \ -F 'pdf_file=@test.pdf;type=application/pdf'
VB   C#

This will forward the document to IronSecureDoc, which will apply the proper encryption.

Conclusion

Nextcloud and IronSecureDoc are two pretty different solutions for handling data in a secure and efficient manner. Nextcloud restart is a very robust, self-hosted cloud platform, that allows users to store, manage, and share files, calendars, and contacts. Being open-source, it integrates with various applications and can be scaled through Docker or manual installations while offering full control over the privacy of data and customization.

In contrast, IronSecureDoc is mainly concerned with document encryption through advanced encryption; therefore, users can be assured of working on sensitive files with confidence. Through integration with Docker, deployment becomes easy and ideal for organizations requiring safe document handling in other environments.

All these sum up with flexible features from Nextcloud on cloud management and enhanced security document features through IronSecureDoc. Together, they make a complete ecosystem for highly private secured cloud spaces and allow easy access to confidentiality for these needs within such controlled surroundings. Click here for more information on IronSecureDoc licensing. For more information on product lines offered by Iron Software check here.

< PREVIOUS
Enterprise Security vs Cybersecurity (How It Works For Developers)
NEXT >
Docker Compose Network (How it Works for Developers)

Ready to get started? Version: 2024.10 just released

Free DownloadView Licenses >