Skip to content

Deployment Overview of Dokku on Server

Prerequisites and Basic Requirements

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

  • Operating System: Ubuntu

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

  • Ports:

  • 443 (HTTPS) for external traffic.

  • 80 (HTTP) for SSL certificate challenges and redirection.

FQDN of the final panel on the hostkey.in domain

The application uses a dynamic subdomain based on the server ID. The template is defined as follows:

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

Application installation process

The installation of Dokku is performed using a dedicated bootstrap script and system package management:

  1. Bootstrap Script: The official Dokku bootstrap script for version v0.34.8 is downloaded from the official repository to /tmp/bootstrap.sh.

  2. Installation: The installer is executed with the specific version tag (DOKKU_TAG=v0.34.8) to ensure environment consistency.

  3. Global Domain Configuration: The application is configured with a global domain using the pattern dokku{Server_ID}.hostkey.in.

  4. Core Dependencies: Essential system dependencies required for Dokku's core functionality are installed via the internal plugin manager.

Docker Containers and Their Deployment

The deployment utilizes a Docker container to manage Nginx and SSL certificates via Certbot.

Nginx-Certbot Container

This container acts as a reverse proxy and handles automated SSL certificate management.

  • Image: jonasal/nginx-certbot:latest

  • Network Mode: host

  • Restart Policy: unless-stopped

  • Environment Variables:

  • CERTBOT_EMAIL: [email protected]

  • Configuration is further supplemented by an external environment file located at /data/nginx/nginx-certbot.env.

  • Volumes:

  • nginx_secrets:/etc/letsencrypt (External volume for SSL certificates)

  • /data/nginx/user_conf.d:/etc/nginx/user_conf.d (Local directory for Nginx configuration files)

Application Update Instructions

To update the Dokku application, you must re-run the installation script with the desired version:

  1. Download the latest bootstrap script from the official source.

  2. Execute the script using the DOKKU_TAG variable to specify the target version.

For the Nginx proxy container, use the following command in the /root/nginx directory:

docker compose pull && docker compose up -d

Location of configuration files and data

The following directories are used for storing critical application data and configurations:

  • Nginx Configuration Directory: /root/nginx

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

  • SSL Certificates: Managed via the nginx_secrets Docker volume.

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

Available ports for connection

Port Protocol Purpose
443 HTTPS Secure web access to Dokku and hosted applications
80 HTTP Standard web traffic and SSL certificate validation
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×