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.inis 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:
-
The deployment script clones the
postiz-docker-composerepository from GitHub into the/opt/postizdirectory. -
The configuration files within the repository are updated to map the local
localhost:4007addresses to the correct external FQDN (e.g.,https://postiz{Server_ID}.hostkey.in). -
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:
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:
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_secretsDocker 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