Issue Description
When attempting to create a Docker container (for either PostgreSQL or Odoo) using the CyberPanel graphical interface (UI), the system returns a Server Error (500) error. This issue occurs consistently on every attempt to create a container via the UI, even though the Docker Engine on the VPS backend is functioning properly and containers can be successfully created and managed via the Docker command-line interface (CLI) (docker run, docker ps, etc.).
General Information
Affected Product: CyberPanel
CyberPanel Version: v2.4.1 Stable
Platform: Ubuntu 22.04 LTS (Jammy Jellyfish).
User Role: Administrator (logged in as admin)
Reinstall VPS: Yes, the issue persists even after a clean reinstall of the VPS.
Docker Engine Status: active (running) (Docker CLI is functioning normally)
Steps to Reproduce
- Log in to the CyberPanel UI as an administrator.
- Navigate to the Docker menu in the left sidebar.
- Select the Create Container option.
- Fill in all the details required for container creation (e.g., for PostgreSQL or Odoo containers, including Image, Tag, Name, Port Mapping, Environment Variables, Volume Mapping, Network Name, etc.).
Example Details Used (for PostgreSQL):Name: odoo18_db
Image: postgres
Tag: 17.5
Select Owner: admin
Memory limit: 1024
Port Mapping: 5432 (Container) → 5432 (Host)
Environment Variables:
POSTGRES_USER: your_odoo_db_username
POSTGRES_PASSWORD: your_strong_database_password
POSTGRES_DB: odoo_main_db
Volume Mapping:
Host Path: /home/yourdomain.com/odoo18/data/db_data
Container Path: /var/lib/postgresql/data/pgdata
Click the “Create Container” button. - Click the “Create Container” button. (Even when I tried on another container/image and without changing any settings, it still resulted in a 500 error when opening the container management page).
Expected Behavior
The Docker container should be successfully created and appear in the container list with a status of Running. No Server Error (500) errors should be displayed. (appears when navigating to the manage docker page)
Actual Behavior
After clicking “Create Container”, the CyberPanel UI displays a Server Error (500) when redirecting to the container page. The container was not successfully created.
Log Analysis
- stderr.log (usually in /home/cyberpanel/stderr.log): This file is found to be empty after the error occurs, providing no traceback or useful error information.
- journalctl -u lscpd.service: While this log can show activity from lscpd (CyberPanel’s main process), there is no clear error traceback or specific message related to the Docker container creation failure found here when the problem occurred. This log mostly shows normal operation logs or general warnings that are not directly related to the container creation bug.
Implications
- Users cannot utilize Docker management features through the CyberPanel UI. - Deployment of Docker-based applications via the CyberPanel UI becomes impossible or severely hampered.
- Forcing users to switch to the Docker CLI for all container management operations, which reduces the added value of the CyberPanel UI.
Additional Information
- Container creation attempts via the Docker CLI (docker run …) work perfectly, indicating that the Docker Engine itself is not problematic, and that the issue lies with CyberPanel’s integration with Docker.
- This issue persists even after reinstalling the VPS, indicating a possible bug in the CyberPanel code itself or a specific compatibility issue with the library version being used.