Skip to content

Deployment Overview of BrainyCP on Server

Prerequisites and Basic Requirements

To ensure a successful deployment, the following requirements must be met:

  • Operating System: Ubuntu

  • Privileges: Root or sudo access is required for installation.

  • Network Ports:

  • 80/443: External web traffic (HTTPS).

  • 8000: Internal application port.

  • 8002: Proxy communication port.

FQDN of the final panel on the hostkey.in domain

The access URL for the control panel is generated based on a specific template:

Parameter Value
Prefix brainycp
Domain hostkey.in
Full template brainycp{Server_ID}.hostkey.in

Application installation process

The installation of BrainyCP is performed using a dedicated installer script through the following steps:

  1. Dependency Check: The system ensures that wget is installed to facilitate the download of the installer.

  2. Installer Download: The official BrainyCP installer script is downloaded from http://core.brainycp.com/install.sh and stored at /root/install.sh.

  3. Execution: The installation script is executed non-interactively using the command:

    yes | bash ./install.sh
    

  4. System Reboot: A system reboot is performed automatically following a successful installation to finalize all service configurations and kernel updates.

Docker Containers and Their Deployment

The deployment utilizes a Docker container to manage Nginx and SSL certificates via Certbot. This container is managed using a compose.yml file located in /root/nginx/.

Nginx-Certbot Container

  • Image: jonasal/nginx-certbot:latest

  • Network Mode: host

  • Restart Policy: unless-stopped

  • Environment Variables:

  • CERTBOT_EMAIL: [email protected]

  • Volumes:

  • nginx_secrets:/etc/letsencrypt (External volume for SSL certificates)

  • /data/nginx/user_conf.d:/etc/nginx/user_conf.d (Configuration directory mapping)

Custom Scripts and Additional Setup

The deployment includes several configuration adjustments to integrate the application with the Nginx proxy:

  • Nginx Configuration Modification: The system automatically modifies the site configuration files located in /data/nginx/user_conf.d/. It removes existing proxy_pass directives within the location / block and replaces them with a new directive pointing to the internal service:

    proxy_pass http://127.0.0.1:8002;
    

  • Directory Setup: A directory structure is created at /root/nginx to house the proxy configuration files.

Application Update Instructions

To update the BrainyCP application, you must re-run the installation script:

bash /root/install.sh

For the Nginx proxy container, use the following command in the /root/nginx directory:

docker compose pull && docker compose up -d

Location of configuration files and data

The following paths are used for application data and configurations:

  • Installation Directory: /usr/local/brainycp

  • Nginx User Configurations: /data/nginx/user_conf.d/

  • SSL Certificates: Managed via the nginx_secrets Docker volume.

  • Proxy Compose File: /root/nginx/compose.yml

Available ports for connection

The following ports are utilized by the system:

Port Usage
443 Secure Web Access (HTTPS)
8000 Internal Application Service
8002 Local Proxy Communication
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×