LXDMosaic Production Settings
Settings and operational considerations for running LXDMosaic in a production environment.
MySQL Binary Log Management
This section does not apply to SNAP users (which use SQLite).
It has been reported here that the MySQL binary log can grow to unexpectedly large sizes with the default configuration.
By default, the binlog is purged every 30 days. Most users will not notice any impact, but if you are affected, consider increasing the purge frequency. A recommended approach from StackExchange:
-- Apply immediately in the running MySQL instance
mysql> SET GLOBAL expire_logs_days = 3;
-- Make it persistent by adding to your my.cnf:
# [mysqld]
# expire_logs_days = 3
Note: We do not recommend disabling the binary log entirely, as it can be important for recovery in the event of power loss or crash. Proceed with caution.
Modern MySQL (8.0+) Note
In MySQL 8.0.20+, expire_logs_days was deprecated in favor of binlog_expire_logs_seconds. The equivalent setting would be:
-- 3 days in seconds
mysql> SET GLOBAL binlog_expire_logs_seconds = 259200;
-- Persistent in my.cnf:
# [mysqld]
# binlog_expire_logs_seconds = 259200
Memory Limit for Backups
When downloading backups through the web interface, PHP's memory limit may need to be increased. The installation script sets memory_limit = -1 (unrestricted), but if you manage your own PHP configuration, ensure sufficient memory is available:
; In php.ini
memory_limit = 1024M
Service Reliability
Ensure both services remain running:
- Apache / HTTPD – Handles PHP requests and static assets.
- Node.js WebSocket Service (
lxdmosaic_node.service) – Manages real-time console connections and event streaming.
Use systemd to monitor and auto-restart these services. Check status with:
systemctl status apache2 # or httpd on CentOS
systemctl status lxdmosaic_node
SSL Certificates
The default installation uses self-signed certificates. For production deployments, replace these with properly signed certificates and update the following paths in .env:
CERT_PATH=/etc/ssl/certs/your-domain.pem
CERT_PRIVATE_KEY=/etc/ssl/private/your-domain.key
Then restart Apache and the Node.js service.