Mesibo On-Premise Local Configuration
mesibo on-premise allows you to define additional configuration and override database configuration defined in mesibo console by creating a local configuration file /etc/mesibo/mesibo.conf
. This provides greater flexibility and security for your deployment.
Note: Local configuration is OPTIONAL and most installations may not require it at all.
Why Local Configuration?
Local configuration is useful in the following scenarios:
- Security Compliances: mesibo on-premise has been deployed by organizations such as financial institutions, government agencies, and other security-conscious entities that have strict requirements not to share database and other credentials. Local configuration helps meet these regulatory compliance requirements.
- Custom Certificates: Configure SSL certificates from the config file instead of command line
- Advanced Logging: When you need granular control over logging levels for different components
- Network Configuration: For custom hostname validation and server-specific settings
Important: Configuration parameters in the local file take priority over command line parameters and console settings.
Creating the Configuration File
Step 1: Create the Configuration Directory
First, ensure the configuration directory exists on your host system:
sudo mkdir -p /etc/mesibo
Step 2: Create the Configuration File
Create the configuration file using your preferred text editor:
sudo vim /etc/mesibo/mesibo.conf
Step 3: Set Proper Permissions
Ensure the configuration file has appropriate permissions for security:
sudo chmod 600 /etc/mesibo/mesibo.conf
sudo chown root:root /etc/mesibo/mesibo.conf
Step 4: Configure Docker Volume Mount
To allow your mesibo on-premise Docker container to access the local configuration file, you must pass additional argument -v /etc/mesibo:/etc/mesibo:
For example,
docker run \
...
-v /etc/mesibo:/etc/mesibo \
-d mesibo/mesibo
The -v /etc/mesibo:/etc/mesibo
parameter mounts your host's /etc/mesibo
directory to the same path inside the container, allowing mesibo to access your configuration file.
Configuration Sections
Database Configuration
Configure your database connection settings:
database {
host=<db_host>
name=<db_name>
user=<db_username>
pass=<db_password>
port=3306
}
Parameters:
host
: Database server hostname or IP addressname
: Database nameuser
: Database usernamepass
: Database passwordport
: Database port (default: 3306, optional)
Note: You still need to configure dummy database credentials in the mesibo console. Any configuration specified in /etc/mesibo/mesibo.conf
will override the console configuration.
Server Configuration
Configure server-specific settings:
server {
token=<app_token>
hostname=<host_name>
validate=<validate_hostname>
}
Parameters:
token
: Your application token from mesibo consolehostname
: The hostname for your mesibo servervalidate
: Whether to validate hostname (0 or 1)
SSL Configuration
Configure SSL certificates:
ssl {
path=<certificates_path>
}
Parameters:
path
: Full path to the directory containing your SSL certificates
Logging Configuration
Configure detailed logging levels for different components:
logs {
message = 0
calls = 0
network = 0
login = 1
logout = 0
push = 1
script = 0
}
Logging Parameters:
message
: Enable/disable message logging (0 = disabled, 1 = enabled)calls
: Enable/disable call logging (0 = disabled, 1 = enabled)network
: Enable/disable network logging (0 = disabled, 1 = enabled)login
: Enable/disable login event logging (0 = disabled, 1 = enabled)logout
: Enable/disable logout event logging (0 = disabled, 1 = enabled)push
: Enable/disable push notification logging (0 = disabled, 1 = enabled)script
: Enable/disable script execution logging (0 = disabled, 1 = enabled)
Recommended Settings:
- For production environments, enable only essential logging (
login
) to minimize performance impact - For development/debugging, enable additional logging as needed
Setting Local Configuration using Backend APIs
In addition to the local configuration file, certain configuration parameters can be set dynamically using mesibo backend APIs. This is useful for configuring without restarting mesibo on-premise server.
Note that backend API-based configuration changes are temporary and will be reset when the on-premise server restarts. For permanent configuration changes that persist across restarts, you must use the /etc/mesibo/mesibo.conf
file method as explained above.
To set a config, you need to send following JSON request to the backend API, for example:
{
"op": "tempconfig",
"token": "ptlk9hdel1gqxf3p0s15f5f5gtusldej18tl794suzit",
"config": {
"name": "logs.push",
"value": "1"
}
}
Parameter | Description | Default |
---|---|---|
op | MUST have the value - "tempconfig" | Mandatory |
token | Application Token obtained from the mesibo console | Mandatory |
config.name | Configuration parameter name (e.g., "logs.push", "logs.message", "logs.calls") | Mandatory |
config.value | Value depending on the config.name. | Optional, empty to reset |
To use curl
to send configuration request:
curl --header "Content-Type: application/json" \
--request POST \
--data '{
"op": "tempconfig",
"token": "ptlk9hdel1gqxf3p0s15f5f5gtusldej18tl794suzit",
"config": {
"name": "logs.push",
"value": "1"
}
}' \
http://<your-hosted-backend-ip>
For security, not all configuration parameters are supported using backend API. Currently, only logging configurations are supported via the tempconfig
backend API.
Troubleshooting
- Configuration Not Loading: Ensure the Docker volume mount is correct and the file permissions allow reading
- Database Connection Failed: Verify database credentials and network connectivity
- SSL Certificate Issues: Check certificate paths and ensure certificates are valid
- Permission Denied: Verify file ownership and permissions on the configuration file
Debug Steps
- Check Docker container logs for configuration parsing errors
- Verify file exists and is readable:
ls -la /etc/mesibo/mesibo.conf
- Test database connectivity from the Docker host
- Validate SSL certificates if using HTTPS