Skip to content

Deployment Overview of Dokku on Server

Prerequisites and Basic Requirements

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

  • Operating System: Ubuntu.

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

  • Network/Ports:

  • Port 443 (HTTPS) must be open for external traffic.

  • Domain Configuration: The server hostname must resolve to 127.0.0.1 in the /etc/hosts file.

FQDN of the final panel on the hostkey.in domain

The application uses a dynamic domain template based on the server ID.

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

Application installation process

The installation of Dokku is performed using a combination of an official bootstrap script and dependency configuration:

  1. System Preparation: The server's /etc/hosts file is updated to ensure the local hostname resolves to 127.0.0.1.

  2. Bootstrap Script: The official Dokku bootstrap script (version v0.34.8) is downloaded from https://dokku.com/install/v0.34.8/bootstrap.sh and executed.

  3. Global Domain Configuration: The global domain for the instance is set to {prefix}{Server_ID_from_Invapi}.hostkey.in.

  4. Core Dependencies: The command dokku plugin:install-dependencies --core is executed to install necessary system components for Dokku's core functionality.

  5. Reverse Proxy Setup: A Docker Compose deployment is initialized in /root/nginx to manage SSL certificates and Nginx routing.

Access Rights and Security

  • Firewall: The application relies on the host's firewall allowing traffic on port 443.

  • User Privileges: Administrative tasks are performed with root privileges.

  • SSL/TLS: SSL certificates are managed via a dedicated container using Let's Encrypt.

Docker Containers and Their Deployment

The deployment includes one application-related container used for Nginx and SSL management:

Image Ports Volumes Environment Variables Restart Policy
jonasal/nginx-certbot:latest Host Network Mode - nginx_secrets:/etc/letsencrypt
- /data/nginx/user_conf.d:/etc/nginx/user_conf.d
[email protected] unless-stopped

Note: This container operates using the host's network mode to facilitate direct access to ports.

Application Update Instructions

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

DOKKU_TAG=v0.34.8 bash /tmp/bootstrap.sh

For the Nginx reverse proxy component, 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 configurations and certificates:

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

  • SSL Certificates: Managed via the nginx_secrets Docker volume.

  • Docker Compose Files: /root/nginx/compose.yml

Available ports for connection

Port Service Access Type
443 HTTPS (Nginx) External
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×