SimpleCloud Controller

The controller is pretty easy to understand. It's just a small program, that keeps track of server groups and their online servers and manages them. It's the heart of SimpleCloud v3.

Understanding the controller

The structure of the controller is very simple. It checks every few seconds if there are any updated on servers or server groups. If there are any updates, it will try to talk to a server-host and apply those changes. The contacted server-host will do the rest of the work, like starting, stopping, or updating a server.

For example, if you want to start a server, the controller will send a message to a server-host and tell it to start a server. The server-host will then start the server and tell the controller that the server is now running. At last, the controller updates the status of the server in the database.

Installation

When you install SimpleCloud, the controller is automatically installed. If you want, you can install the controller manually by running the CLI command below, but it's not recommended. Let SimpleCloud handle the installation of the controller.

# Install the controller
simplecloud install controller

Using docker

You can run the controller in Docker. We provide a Docker image for the controller, you can use. You can find a guide on how to run SimpleCloud in Docker here.

If you want every server to run in Docker, you can use the server-host-docker droplet.

Crash handling

The controller is not responsible for running servers, it's just responsible for managing them. If the controller crashes, the servers will continue to run. The only thing that will not work is the management of the servers. You can't start, stop, or update a server until the controller is running again.

That also means, you can restart the controller at any time. The controller will automatically detect all running servers and server groups and update the database accordingly.

Controller vs v2 manager

The controller is a lot more lightweight and easier to manage than the old v2 Manager. The controller is just a small program that runs in the background and manages all your servers and server groups. The old v2 Manager was a big program that was responsible for managing servers, server groups, templates, modules and so on.

But like the old v2 Manager, the controller is the heart of SimpleCloud. Without the controller, SimpleCloud would not work and at the moment there is no way to run multiple controllers at the same time.

Was this page helpful?