Skip to content

LinuxPatch Appliance Deployment Overview

Prerequisites

The following conditions are required for the application to function correctly:

  • An operating system with Docker and Docker Compose support.

  • Internet access to download images and clone the repository.

  • The docker service must be installed.

  • root privileges or sudo access to manage containers and directories.

FQDN of the final panel on hostkey.in domain

Access to the application is provided via the following pattern:

Parameter Value
Prefix linuxpatch
Domain hostkey.in
Full Pattern linuxpatch{Server_ID_from_Invapi}.hostkey.in

File and Directory Structure

The main application data and configurations are located in the following directories:

  • /root/linuxpatch — the main application working directory, containing the source code (repository) and deployment files.

  • /root/linuxpatch/data — the application data directory, including configuration files (.env), certificates (certs), and logs (logs).

  • /data/nginx/user_conf.d — the directory for Nginx proxy configuration files.

Application Installation Process

Deployment is performed by cloning the https://github.com/linuxpatch/self-hosted.git repository into the /root/linuxpatch directory.

The process includes:

  1. Creation of required Docker directories and volumes.

  2. Generation of the .env configuration file with unique credentials (database, SMTP, administrator).

  3. Generation of docker-compose.yml based on a template with environment variable substitution.

  4. Starting containers via docker compose up -d.

Permissions and Security

  • The /root/linuxpatch directory has root:root ownership with mode 0644.

  • Directories for certificates and logs inside the container (data/certs, data/logs) have access mode 755.

  • All credentials (database, SMTP, and administrator passwords) are generated randomly during the initial installation and are stored in the /root/linuxpatch/data/.env file.

Databases

The application uses two main storage systems:

DB Type Image Purpose
MySQL (Percona) percona/percona-server:8.0 Main application data store
Redis redis:6 Session storage and caching

Database data is persisted in Docker named volumes: linuxpatch-mysql-data and linuxpatch-redis-data.

Docker Containers and Execution

The application is deployed as a group of containers joined in the linuxpatch-app-network network.

Nginx (Proxy/SSL)

  • Image Name: jonasal/nginx-certbot:latest

  • Ports: 80:80, 443:443

  • Volumes:

    • nginx_secrets:/etc/letsencrypt

    • /data/nginx/user_conf.d:/etc/nginx/user_conf.d

  • Environment Variables: [email protected]

  • Restart Policy: unless-stopped

LinuxPatch App (Main Application)

  • Image Name: linuxpatch/appliance:latest

  • Command: ./web

  • Ports: 80, 443 (via expose)

  • Volumes: ./data:/app/data

  • Environment Variables: DB, Redis, SMTP, TLS settings, and administrator credentials.

  • Restart Policy: unless-stopped

Percona Server (Database)

  • Image Name: percona/percona-server:8.0

  • Command: mysqld

  • Volumes: linuxpatch-mysql-data:/var/lib/mysql

  • Restart Policy: unless-stopped

Redis (Cache)

  • Image Name: redis:6

  • Command: redis-server

  • Volumes: linuxpatch-redis-data:/data

  • Restart Policy: unless-stopped

Application Update Instructions

Updates are performed by pulling new image versions and restarting the containers:

docker compose pull && docker compose up -d

Permissions Settings

The following permissions are set for the correct operation of configuration scripts:

  • The configure.sh file has execution permissions (0744).

  • Data and config directories are created with appropriate access rights to ensure log writing and certificate reading capabilities.

Available Connection Ports

Port Protocol Purpose
80 TCP HTTP (redirection)
443 TCP HTTPS (primary access)
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×