Skip to content

Deployment Overview of OpenPanel on Server

Prerequisites and Basic Requirements

To deploy OpenPanel on a server, the following prerequisites must be met:

  • Operating System: Ubuntu (compatible with the provided installation script).

  • Privileges: Root access or sudo privileges are required to execute the installation script and manage Docker containers.

  • Domain Configuration: A valid domain name must be configured for the server to handle SSL certificates and reverse proxy rules.

  • Ports: The server must allow incoming traffic on standard web ports (80 and 443) for HTTP and HTTPS traffic.

File and Directory Structure

The OpenPanel deployment utilizes the following directory structure for configuration and data:

  • /etc/openpanel/caddy/: Contains the main Caddy configuration file (Caddyfile) used for reverse proxying and SSL management.

  • /root/: The installation script is downloaded and executed from this directory.

  • Docker Volumes: Data persistence for OpenPanel and its dependencies is managed via Docker volumes, though specific volume paths are handled internally by the container orchestration.

Application Installation Process

OpenPanel is installed using a dedicated shell script provided by the developers. The installation process involves the following steps:

  1. Download the installation script to the /root/ directory.

    curl -o /root/installation_script.sh https://openpanel.org/install.sh
    chmod +x /root/installation_script.sh
    
    Note: The actual download URL may vary based on the official OpenPanel documentation, but the script is executed from /root/installation_script.sh.

  2. Execute the installation script with the required parameters:

    /root/installation_script.sh --domain=<your-domain> --username=admin --password=<your-password>
    

  3. --domain: Specifies the domain name for the OpenPanel instance.

  4. --username: Sets the initial administrator username.

  5. --password: Sets the initial administrator password.

  6. The script automatically handles the setup of Docker containers and configuration files. The installation is considered complete when the Caddy configuration file appears at /etc/openpanel/caddy/Caddyfile.

Docker Containers and Their Deployment

OpenPanel relies on Docker for containerization. The deployment includes the following containers:

  • caddy: Acts as the reverse proxy and handles SSL certificate management via ACME.

  • Other internal containers required for the OpenPanel application stack are managed by the installation script.

The containers are started and managed using Docker commands. If configuration changes occur, the caddy container is restarted to apply updates:

docker restart caddy

Proxy Servers

The deployment uses Caddy as the reverse proxy server. Key aspects of the proxy configuration include:

  • Configuration File: Located at /etc/openpanel/caddy/Caddyfile.

  • SSL/TLS: Caddy automatically manages SSL certificates using the ACME protocol.

  • Domain Handling: The Caddyfile is configured to route traffic for the specified domain to the internal OpenPanel services.

  • Webmail Configuration: The installation script may include or remove specific server blocks for webmail services depending on the configuration flags.

Permission Settings

File and directory permissions are set during the installation process:

  • The installation script is executed with executable permissions (0755).

  • Configuration files in /etc/openpanel/caddy/ are managed by the root user and the Caddy container.

  • Backup copies of the Caddyfile are created at /etc/openpanel/caddy/Caddyfile.bak before any modifications.

Starting, Stopping, and Updating

Management of the OpenPanel services is handled through Docker:

  • Restarting the Proxy: If the Caddyfile is modified, restart the Caddy container to apply changes:

    docker restart caddy
    

  • Stopping Services: To stop the OpenPanel stack, stop the relevant Docker containers:

    docker stop caddy
    

  • Updating: Updates to the application or configuration are applied by re-running the installation script or manually updating the Caddyfile and restarting the container.

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×