Server installation
You want to run a website with OpenCms. So you need to set up a web server and install OpenCms on it.Of course, you may also use a container approach, or set up more than just one server, or .... Here you'll learn about the hardware and software requirements for running OpenCms in the web. And get some basic hints on suitable setups.
Your final productive OpenCms installation will depend on your concrete needs. This topics should provide only some valuable hints.
Hardware requirements
Do not use a shared server. OpenCms is Java-based and you need to run a JVM on the server. Furthermore, OpenCms will keep a lot of information in the memory of the server, if you want to run a well performing website. Therefore, we do not recommend using a shared server - OpenCms will constantly allocate system resources.
Memory is the most important performance factor. Memory is much more influential than CPU speed. It is recommended to have at least 2GB of memory available.
In many scenarios it will suffice if all elements of an OpenCms installation (OpenCms itself in the servlet containter, the DBMS, optionally an additional webserver) reside on one computer, or are splitted over several servers. Sites expecting heavy traffic will probably need a clustered configuration where the load is distributed across more than one OpenCms instance. For a clustered installation use the Alkacon OCEE Cluster Manager.
Software requirements
We only mention relevant components.
In essence, to run OpenCms you need:
- A Java Development Kit: OpenCms requires JDK 8 or higher.
- A servlet container: OpenCms runs as servlet in a servlet container. We recommend Apache Tomcat.
- A database management system: OpenCms stores all content in a database. It is best tested with MySql/MariaDB. But also other databases are supported.
Running OpenCms in a Docker container
Additional components
Depending on your requirements, it can be valuable to access OpenCms via a proxy, e.g., HaProxy, nginx, .... This might for example be the case when you have a cluster setup and need load balancing, you need to access various different backends depending on the URLs, ....
Installing OpenCms behind a proxy should work out of the box. But you might also want to serve resources that are statically exported by OpenCms directly from the proxy. To achive this, have a look at the traditional installation with the Apache Webserver. You need only the parts about the rewrite rules concerned with static export.
An advanced setup with docker could, for example, include a container for HaProxy, a container for OpenCms (connecting to an external database) and one for a Let's Encrypt certbot. HaProxy could do the encryption with the certificates provided by the certbot, could serve statically exported resources and manage the interplay of potentially more backends.
The best setup for you - and the components you might use - will depend on your concrete needs and there is no "best" solution we can provide here.
Setup automatization
The OpenCms setup can be completely automatized via the Auto-Setup and the OpenCms shell.
Read the according topics, or have a look at the OpenCms docker to get an impression of a completely automatic setup.