Skip to content

Deployment Overview of Postiz on Server

Prerequisites and Basic Requirements

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

  • Operating System: Ubuntu (recommended).

  • Privileges: Root or sudo access is required for installing dependencies and managing Docker containers.

  • Domain: A valid domain managed via hostkey.in is required for SSL certificate provisioning.

  • Ports:

  • Port 443: External HTTPS traffic.

  • Port 4007: Internal application communication.

FQDN of the final panel on the hostkey.in domain

The application is accessible via a specific subdomain generated based on the server ID.

Parameter Value
Prefix postiz
Domain hostkey.in
Full template postiz{Server_ID_from_Invapi}.hostkey.in

File and Directory Structure

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

  • /opt/postiz: Contains the application source files and Docker Compose configuration.

  • /root/nginx: Contains the Nginx and Certbot orchestration files.

  • /data/nginx/user_conf.d: Stores Nginx virtual host configurations.

  • /data/nginx/nginx-certbot.env: Configuration file for SSL certificate management.

Application installation process

The application is installed using a combination of repository cloning and Docker Compose:

  1. The deployment script clones the postiz-docker-compose repository from GitHub into the /opt/postiz directory.

  2. The configuration files within the repository are updated to map the local localhost:4007 addresses to the correct external FQDN (e.g., https://postiz{Server_ID}.hostkey.in).

  3. Docker Compose is used to pull the required images and start the application services in detached mode.

Access Rights and Security

  • Firewall: The system must allow incoming traffic on port 443 (HTTPS).

  • SSL/TLS: SSL certificates are managed via Certbot to ensure all traffic is encrypted.

  • Container Isolation: Application containers run within a Docker network, while the Nginx proxy operates in host network mode to facilitate seamless certificate management and routing.

Databases

The application uses internal database services defined within the docker-compose.yaml file (managed via the Postiz deployment package). Data is persisted through Docker volumes to ensure data integrity across container restarts.

Docker Containers and Their Deployment

The deployment consists of two primary functional components:

Nginx Proxy Container

  • Image: jonasal/nginx-certbot:latest

  • Network Mode: host

  • Volumes:

  • nginx_secrets:/etc/letsencrypt (SSL certificates)

  • /data/nginx/user_conf.d:/etc/nginx/user_conf.d (Nginx configurations)

  • Environment Variables:

  • [email protected]

Postiz Application Container

  • Image: Managed via the cloned repository images.

  • Container Name: postiz{Server_ID}.hostkey.in

  • Internal Port: 4007

  • Restart Policy: Default Docker restart policy as defined in the source compose file.

Application Update Instructions

To update the Postiz application, navigate to the installation directory and pull the latest images:

cd /opt/postiz
docker compose pull && docker compose up -d

Location of configuration files and data

  • Application Configuration: /opt/postiz/docker-compose.yaml

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

  • SSL Certificates: Managed within the nginx_secrets Docker volume.

Available ports for connection

Port Service Access Type
443 HTTPS (Nginx) External
4007 Postiz API/Web Internal

Starting and Stopping the application

The application is managed using Docker Compose commands from the /opt/postiz directory:

  • Start the application: docker compose up -d

  • Stop the application: docker compose down

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