Skip to content

Deployment Overview of FASTPANEL on Server

Prerequisites and Basic Requirements

To ensure a successful deployment, the server must meet the following requirements:

  • Operating System: Debian, Ubuntu, CentOS, Rocky Linux, or AlmaLinux.

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

  • Network/Ports:

  • 8888: Internal management port for FastPanel.

  • 443: External HTTPS traffic via Nginx proxy.

  • 80: External HTTP traffic (used for ACME challenges).

FQDN of the final panel on hostkey.in domain

The application uses a specific domain template to assign a Fully Qualified Domain Name (FQDN) based on the server ID and provided configuration.

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

File and Directory Structure

The deployment creates several directories to manage Nginx configurations, SSL certificates, and webroot challenges:

  • /root/nginx: Contains the Docker Compose configuration for the proxy service.

  • /data/nginx: Main directory for user-defined Nginx configurations.

  • /data/nginx/user_conf.d: Stores specific site configuration files.

  • /data/nginx/letsencrypt/.well-known/acme-challenge: Used for Certbot SSL validation.

Application installation process

The installation of FastPanel is performed using a dedicated shell script that automates the setup of necessary system components and the panel itself.

  1. System Preparation: The package cache is updated, and wget is installed. A configuration is added to /etc/apt/apt.conf.d/99lock-timeout to ensure the installer waits for the dpkg lock rather than failing immediately during unattended upgrades.

  2. Script Execution: The installation script is downloaded from http://repo.fastpanel.direct/install_fastpanel.sh and executed via bash.

  3. Verification: The system verifies that the nginx and mogwai services are present to confirm a successful installation.

  4. User Setup: A system user named fastuser is created/configured with a secure password.

Access Rights and Security

  • Firewall: Ensure ports 80 and 443 are open for external access, and port 8888 is accessible (typically via the local proxy).

  • User Management: A dedicated user fastuser is managed by the system to handle panel operations.

  • SSL/TLS: The deployment automatically configures SSL certificates using Certbot to secure traffic on port 443.

Docker Containers and Their Deployment

The deployment utilizes a Docker container to act as a reverse proxy, handling SSL termination and routing traffic to the FastPanel service.

Nginx Proxy Container

  • Image: jonasal/nginx-certbot:latest

  • Ports: Uses network_mode: host to bind directly to the host's network interfaces.

  • Volumes:

  • nginx_secrets:/etc/letsencrypt: Persistent storage for SSL certificates.

  • /data/nginx/user_conf.d:/etc/nginx/user_conf.d: Custom Nginx configuration files.

  • /data/nginx/letsencrypt:/var/www/letsencrypt: Webroot for ACME challenges.

  • Environment Variables:

  • CERTBOT_EMAIL: Configured via an environment file (/data/nginx/nginx-certbot.env).

  • Restart Policy: unless-stopped.

Custom Scripts and Additional Setup

The deployment includes several automated configuration steps:

  • Nginx Configuration Generation: A dynamic Nginx configuration is generated to proxy traffic from port 443 to the internal FastPanel service running on 127.0.0.1:8888.

  • SSL Automation:

  • An initial HTTP-only configuration is deployed to allow Certbot to validate domain ownership via the .well-known/acme-challenge/ directory.

  • Once certificates are obtained, the Nginx configuration is updated to include an SSL block for HTTPS.

  • A dry-run of the certificate renewal process is performed to ensure long-term validity.

Application Update Instructions

To update the main application, follow the procedure corresponding to your deployment method:

  • Docker Proxy: To update the proxy service, navigate to /root/nginx and run:

    docker compose pull && docker compose up -d
    

  • FastPanel Core: Updates are typically managed through the FastPanel interface or by re-running the installation script.

Location of configuration files and data

  • Nginx Proxy Configs: /root/nginx/compose.yml

  • User Site Configs: /data/nginx/user_conf.d/

  • SSL Certificates: Managed via Docker volume nginx_secrets.

  • Environment Variables: /data/nginx/nginx-certbot.env

Available ports for connection

Port Service Access Type
80 HTTP (Redirect to HTTPS) External
443 HTTPS (Nginx Proxy) External
8888 FastPanel Management Internal/Localhost

Starting and Stopping the application

The proxy service is managed via Docker Compose:

  • Start: Navigate to /root/nginx and run docker compose up -d.

  • Stop: Navigate to /root/nginx and run docker compose down.

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