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 and configuration.

  • 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 to allow the Dokku bootstrap process to complete successfully.

FQDN of the final panel on the hostkey.in domain

The application uses a specific domain template for its global configuration.

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 dedicated bootstrap script and manual configuration steps:

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

  2. Bootstrap Execution: The official Dokku bootstrap script (version v0.38.34) is downloaded from https://dokku.com/install/v0.38.34/bootstrap.sh and executed to install the core application components.

  3. Global Domain Configuration: The global domain for the instance is set using the command: dokku domains:set-global dokku{Server_ID_from_Invapi}.hostkey.in.

  4. Dependency Installation: Core dependencies required by Dokku are installed via the plugin manager using dokku plugin:install-dependencies --core.

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

Access Rights and Security

  • Firewall: Ensure that port 443 is accessible from the public internet.

  • User Permissions: The installation process requires administrative privileges. Configuration files are managed under /root/nginx and /data/nginx.

Docker Containers and Their Deployment

The deployment utilizes a Docker container to handle SSL termination and Nginx proxying via Docker Compose.

Container Name Image Ports Volumes Environment Variables Restart Policy
nginx jonasal/nginx-certbot:latest Host Network Mode - nginx_secrets:/etc/letsencrypt
- /data/nginx/user_conf.d:/etc/nginx/user_conf.d
[email protected] (plus settings from /data/nginx/nginx-certbot.env) unless-stopped

Application Update Instructions

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

  1. Download the updated bootstrap script for the target version.

  2. Execute the installer with the specific tag:

    sudo DOKKU_TAG=v0.38.34 bash /tmp/bootstrap.sh
    

Location of configuration files and data

  • Nginx Compose File: /root/nginx/compose.yml

  • Nginx Environment Variables: /data/nginx/nginx-certbot.env

  • User Configuration Directory: /data/nginx/user_conf.d

  • SSL Certificates (Docker Volume): nginx_secrets

Available ports for connection

  • HTTPS: 443 (via Nginx proxy)
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×