Hosting Backend APIs with mesibo On-Premise

When using mesibo On-Premise, mesibo has no access to your database. As a result, only a limited set of operations — useradd, userset, and usertoken — can be performed through the mesibo-hosted backend API. For all other operations such as group management or sending messages, you must use the real-time APIs, for example the real-time group management APIs.

For this reason, hosting the backend APIs on your own server is the recommended setup for all On-Premise deployments. When you host the backend APIs, all backend API calls go directly to your own database without passing through mesibo at all, keeping your data entirely within your control. It also gives you full access to the complete backend API, ensures your database is updated instantly for all operations, and unlocks additional endpoints like usersget, groupsget, and more.

Hosting the Backend API Server

The mesibo backend API server is bundled with the mesibo Docker image as a FastCGI server, making it compatible with any web server. By default, it is not started. To enable it, pass the -b <port> option before the app token when starting mesibo On-Premise. For example, the following command starts mesibo On-Premise and launches the backend FastCGI server on port 5000:

$ sudo docker run -v /etc/letsencrypt/archive/mesibo.example.com:/certs --net=host \
    --ipc=host --name mesibo --rm -d mesibo/mesibo -b 5000 <APP_TOKEN>

Confirm it is running by checking the logs:

$ sudo docker logs mesibo

You should see an entry confirming the backend API server has started.

E2002-152356-187 (6406): --------------------- mesibo backend ---------------------
E2002-152356-187 (6406):  Build: 3056 (Fri Feb 20 06:36:29 2026)
E2002-152356-187 (6406):  FastCGI Port: 5000
E2002-152356-187 (6406): ----------------------------------------------------------

Configuring Your Web Server

Once mesibo is running with the backend FastCGI server enabled, configure your web server to forward requests to it. All major web servers — Apache, nginx, lighttpd, IIS — support FastCGI. If you are already serving PHP on your web server, you are already using FastCGI.

Below is an nginx example that maps https://<your-web-server>/mesiboapi to the mesibo backend FastCGI server on port 5000:

location /mesiboapi {
    fastcgi_param SCRIPT_FILENAME $request_filename;
    include        fastcgi_params;
    fastcgi_pass   <your docker IP address>:5000;
}

Refer to your web server's documentation for equivalent configuration in Apache, lighttpd, or IIS.

Restart your web server after making changes, then open the configured URL in a browser. If everything is set up correctly, you will see:

{"error":"MISSINGOP","result":false}

This is the expected response — it confirms the backend API is reachable. It simply means no operation was specified in the request.

Using the Backend API

Once hosted, your backend API is available at https://<your-web-server>/mesiboapi. Use this URL in place of https://api.mesibo.com/backend for all backend API calls. The API itself is identical — refer to the backend API documentation for the full list of supported operations.