Skip to content

maximelehericy/nextcloud-docker-test-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Objective of this project

Provide a test environment where it is easy to test Nextcloud features, integrations, under different architectures.

✅ already available ⌛ available soon ⚙️ under construction

This project implemented Nextcloud in the following ways:

  • ✅ Standalone Nextcloud
  • ✅ Federated Nextcloud instances (with several standalone instances)
  • ✅ Nextcloud Global Scale
  • ✅ Nextcloud Dev (based on JuliusKnorr work)

This project also provides the following integrations:

  • ✅ Nextcloud Office (based on Collabora Online, for online editiong of office files)
  • ✅ Nextcloud talk high-performance backend (for performant videoconference)
  • ✅ Nextcloud talk recording backend
  • ✅ Nextcloud whiteboard
  • ✅ Nextcloud Lookup server (shared user directory)
  • ✅ Nextcloud AppAPI docker socket proxy (for AI services and Flow until Nextcloud 31)
  • ✅ Nextcloud AppAPI HaRP (for AI services and Flow for Nextcloud 32 and upward)
  • ✅ Only Office (for online editiong of office files)
  • ✅ Open Project (for project management)
  • ✅ Documenso (for electronic signature)

This project also provides a few other key components that are nearly always included in real-life Nextcloud deployments or useful for testing purposes:

  • ✅ Adminer, a web based database client
  • ✅ Keycloak as SAML or OIDC identity provider for SSO
  • ✅ Stalwart-mail as mail server
  • ✅ Roundcube as standalone mail clients (to showcase guest accounts)
  • ✅ LDAP (prepopulated) for user and group management

Requirements

Everything that follow has been done on Linux. I don't know how easily it can be ported on other OS.

Design principles

A few key principles guided the design of this project:

  • Should run 100% locally, internet access is not mandatory
  • Have little automation, so it is easier to understand what are the interactions between the components
  • Provide a clear picture of the network architecture. Many problems come from the network, understanding them is key to solve issues
  • Be able to deploy as many parallel Nextcloud instances as needed
  • Share as many services as possible (but Nextcloud) to save on hardware resources, and simulate real-life use-cases
  • Every web service should be accessible on a domain name over HTTPS (without any port specified)
  • Each Nextcloud instance should be "state of the art" configured, with cron and notify_push working (thanks @juliusknorr)
  • Be able to deploy as many services as needed (no port mapping/publishing)
  • Access to configuration files as easy as possible (work in progress)
  • Ability to trash and rebuild in a minute (work in progress)

A quick overview of the architecture

Network architecture

Unfamiliar with docker ?

Read here

Setup

In a nutshell, the steps are these:

  1. get trusted SSL wildcard certificates for your local test environment
  2. install docker
  3. prepare the docker network
  4. spawn an NGINX container that will act as a reverse proxy to access other containers
  5. deploy as many Nextcloud instances and other services as needed

First things first

Before starting to play with docker, you will need a few things:

  1. get a valid wildcard SSL certificate
  2. install docker
  3. add your host user to the docker group

Getting a valid wildcard certificate

This is the number one thing. Please do not go bypass this step. Getting valid SSL certificates will definitely make the next setup steps way easier, as well as easing a lot all the integrations between Nextcloud and its satellites.

There are two pretty easy ways for this:

  1. Use the Let's encrypt DNS challenge, see explanation there
  2. Use mkcert, see here
Let's encrypt DNS challenge mkcert
Advantages really similar to production very quick to setup
enables a local IMAP & SMTP
mail server integration
Drawbacks need to purchase a domain name no IMAP integration possible

As Nextcloud features an email client, the Let's Encrypt DNS challenge can be a better choice.

Install docker

Go there and follow the installation procedure matching your OS.

Add your host user to the docker group

So you don't have to sudo all the time. Follow the instructions there

Dive into the docker setup

Create the network layer

Follow the network documentation there

Tweak your /etc/hosts file

To your /etc/hosts file, add the following line:

172.19.0.1 test.<yourdomain> nc1.<yourdomain> nc2.<yourdomain>

Configure an NGINX reverse proxy for SSL termination

SSL is beautiful to secure client-server communications, but is sometimes a pain to handle for the beginner. For that, we will use nginx, and customize a bit the default docker image. See everything here.

Launch your first nextcloud instance

For this, we will use docker compose. Docker compose is a tool that allows to launch at once several containers, unlike the docker run command we used above.

Each sercice necessary for Nextcloud to work is decribed in a yaml file, where networks, volumes, docker images that services base on, environment variables, etc. are defined.

To follow the tutorial to spin up a first test Nextcloud instance, go there

Additional satellites

  • Adminer (web-based DB client): read here
  • Nextcloud Office (Collabora Online): read here
  • Keycloak (IDP): read here
  • Only Office (online editing): read here
  • OpenProject (project management): read here
  • Nextcloud Whiteboard (based on Excalidraw): read here
  • LDAP server (based on OpenLDAP): read here
  • AppAPI Docker Socket Proxy: read here
  • Stalwart-mail server: read here
  • Nextcloud Talk High-Performance Backend: read here
  • Nextcloud Talk Recording server: read here
  • Documenso: read here
  • Nextcloud Lookup server: read here
  • Nextcloud Global Scale: read here

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published