How to Config Custom Domains for IBM Cloud Code Engine Applications

IBM Cloud Code Engine emerges as a revolutionary, fully managed, serverless platform designed to seamlessly run various containerized workloads, ranging from web applications and microservices to event-driven functions and batch jobs. In this guide, we will explore the intricate process of configuring custom domains for your applications hosted on IBM Cloud Code Engine, enhancing their visibility and user experience.

Prerequisites for Configuring Custom Domains on IBM Cloud Code Engine:

1. IBM Cloud Code Engine Permissions: To leverage the IBM Cloud Code Engine service, users must possess the necessary permissions. As of the latest available data, these permissions involve roles such as codeengine.writer or codeengine.admin. For detailed guidance on managing these permissions, refer to the official IBM Cloud documentation here. As of the last update, there are various permission levels, each providing distinct access to Code Engine resources. The role assignment could involve specific IBM Cloud Identity and Access Management (IAM) policies tailored to the organization’s security and access control policies.

2. Running Application: Before initiating the process, ensure that an application is already deployed on IBM Cloud Code Engine. If not, the IBM Cloud provides a comprehensive set of sample applications for testing and learning purposes. The number of available sample applications may vary, but as of the last check, there are approximately 20 sample applications covering various programming languages and frameworks. These applications can be easily deployed, offering users hands-on experience with the IBM Cloud Code Engine environment.

3. DNS Access: Access to modify the Domain Name System (DNS) settings is crucial for custom domain configuration. Users need the ability to manage DNS settings for a public domain or hostname, whether owned or purchased. IBM Cloud Internet Services, which supports CNAME flattening, is commonly utilized for these configurations. As of the latest information, users are encouraged to use this feature for root domain configurations, enabling them to use their root domain (e.g., instead of a subdomain like This feature simplifies the DNS configuration process and enhances the user experience.

4. TLS/SSL Certificate: Acquiring a TLS/SSL certificate signed by a public certificate authority is an essential step in ensuring secure communication with custom domains. Certificates can be obtained from various certificate authorities, and the process typically involves generating a Certificate Signing Request (CSR) and submitting it to the chosen authority. Costs associated with obtaining these certificates can vary based on the certificate type, duration, and the chosen certificate authority. As of the latest data, Let’s Encrypt is a popular choice for obtaining free SSL/TLS certificates, with a growing number of users leveraging its services for securing their web applications.

See also  XaaS Revolutionizes the Last Leg of Digital Transformation

Example Scenario:

Example Scenario: Configuring Custom Domains on IBM Cloud Code Engine

Let’s delve into a practical scenario where we have a test application already deployed on IBM Cloud Code Engine. The application’s original hostname, for instance, is: In this example, our goal is to enhance accessibility by exposing this application through two custom domains:

  1. Custom Domain:
  2. Custom Domain:

This scenario represents a common use case where organizations seek to establish a branded online presence or simplify user access through memorable domain names. The example domains, and, are utilized for illustrative purposes and can be replaced with actual domain names owned or managed by the user.

Figures and Additional Information:

1. Original Hostname:

  • Original Hostname:
  • Details: This is the default hostname assigned by IBM Cloud Code Engine during the application’s deployment. It typically includes a combination of application-specific identifiers and the IBM Cloud region.

2. Custom Domains:

  • Custom Domain 1:
  • Custom Domain 2:
  • Details: These custom domains are chosen for their simplicity and relevance. Users can substitute these examples with their preferred domain names.

3. Objective:

  • Objective: Exposing the existing test application through custom domains for a user-friendly and branded user experience.
  • Benefits: Custom domains contribute to brand identity, improve user experience, and facilitate easier recall of application access points.

4. Configuration Process:

  • Steps: The process involves obtaining TLS/SSL certificates for the custom domains, configuring DNS settings, and updating IBM Cloud Code Engine with the custom domain information.
  • Complexity: The complexity of the configuration process may vary based on DNS provider and certificate authority choices.

Step-by-Step Instructions for Configuring Custom Domains on IBM Cloud Code Engine:

  1. Generate CSR for TLS Certificate:

    • Install Certbot:
      • Execute the following command to install Certbot:
        sudo apt-get install certbot
      • Details: The command installs Certbot, a widely used tool for handling SSL certificates.
    • Generate CSR and Obtain Certificate:
      • Utilize Certbot to generate the Certificate Signing Request (CSR) and obtain the TLS certificate from Let’s Encrypt CA for both custom domains.
        certbot certonly --manual --preferred-challenges dns --email [email protected] --server --agree-tos --domain
        certbot certonly --manual --preferred-challenges dns --email [email protected] --server --agree-tos --domain
      • Follow the on-screen instructions to deploy DNS TXT records for domain ownership verification.
  2. Add Domain to Code Engine Application UI:

    • IBM Cloud Console Navigation:
      • Navigate to IBM Cloud console > Projects > Your project name > Applications > Application name > Domain mappings tab.
    • Configuration Steps:
      • Select the target application for custom domain mapping.
      • Click on “Create” under Custom domain mappings.
      • Paste the contents of fullchain.pem into the Certificate chain and privkey.pem into the Private key.
      • Provide the Domain name (e.g., and corresponding CNAME Target.
      • Repeat the process for each custom domain.
  3. Create CNAME Records in DNS:

    • Create CNAME Records:
      • Create CNAME records in your domain’s DNS servers pointing to the specified CNAME targets.
        bash CNAME CNAME
    • DNS Provider Interaction:
      • Proceed to create these records using your DNS provider’s interface or tools.
See also  IBM's Tech Evolution: AI, Wasm, and Serverless Trends

Figures and Additional Information:

These detailed figures complement the step-by-step instructions, enhancing the overall guidance provided for users aiming to configure custom domains on IBM Cloud Code Engine securely and efficiently.

  1. Certbot Installation:
    • Figure 1: Certbot Installation Execution:
      • Description: A visual representation of a sample terminal displaying the execution of the Certbot installation command.
      • Details: The figure provides users with a clear illustration of the terminal commands involved in installing Certbot.
  2. CSR Generation and Certificate Acquisition:
    • Figure 2: Certbot Commands Execution:
      • Description: Screenshots showcasing the execution of Certbot commands for CSR generation and certificate acquisition.
      • Details: Multiple screenshots guide users through the steps of executing Certbot commands, emphasizing the generation of the Certificate Signing Request (CSR) and obtaining the TLS certificate.
  3. IBM Cloud Console Screenshots:
    • Figure 3: IBM Cloud Console Custom Domain Setup:
      • Description: Visual representations of the steps involved in adding custom domains through the IBM Cloud console.
      • Details: The figure includes screenshots capturing key moments in the process of configuring custom domains within the IBM Cloud console, providing users with a visual guide.
  4. DNS CNAME Records Creation:
    • Figure 4: DNS CNAME Records Example:
      • Description: An example showing the syntax for creating CNAME records in the domain’s DNS servers.
      • Details: The figure illustrates the correct syntax for creating CNAME records, aiding users in accurately configuring their domain’s DNS settings.


Congratulations! You have successfully configured custom domains for your IBM Cloud Code Engine application. After a brief activation period, your application will be accessible via the specified custom domains ( and This guide empowers you to elevate your application’s branding and user experience, showcasing the potential of IBM Cloud Code Engine in simplifying infrastructure management.

FAQs: Configuring Custom Domains for IBM Cloud Code Engine Applications

1. What permissions are required for using IBM Cloud Code Engine?

To utilize IBM Cloud Code Engine, ensure you have the necessary permissions. Refer to the official [IBM Cloud documentation](link to documentation) for guidance on managing these permissions.

See also  Getting Started: IBM Code Engine Tutorial

2. Can I test the custom domain configuration with a sample application?

Certainly! You can deploy a test application on IBM Cloud Code Engine. Follow the steps outlined in the [IBM Cloud documentation](link to documentation) to deploy a sample application.

3. How do I obtain access to modify DNS settings for my custom domain?

Ensure you have access to modify the DNS settings of your public domain or hostname. If you own or have purchased a domain, you should have the ability to manage its DNS settings. Refer to your domain registrar’s documentation for assistance.

4. What type of TLS/SSL certificate is required for custom domains?

Acquire a TLS/SSL certificate signed by a public certificate authority. The certificate should cover the custom domains you intend to use, such as and

5. How can I install Certbot for generating CSR and obtaining a certificate?

Follow the step-by-step instructions in the guide to install Certbot. The provided terminal command ensures the correct installation of Certbot for generating the Certificate Signing Request (CSR) and obtaining a certificate from Let’s Encrypt CA.

6. What information should be provided while adding a custom domain in the IBM Cloud Code Engine application UI?

Navigate to the IBM Cloud console, go to your project, select the application, and under Domain mappings, click on “Create” for custom domain mappings. Paste the contents of fullchain.pem into the Certificate chain and privkey.pem into the Private key. Provide the Domain name (e.g., and CNAME Target.

7. How do I create CNAME records in DNS for my custom domain?

Refer to the guide for the syntax and example of creating CNAME records in your domain’s DNS servers. This step ensures proper mapping of custom domains to the specified CNAME targets.

8. Are there visual representations available for the configuration steps in the IBM Cloud console?

Yes, the guide includes screenshots representing the steps involved in adding custom domains through the IBM Cloud console.

9. How long does it take for the custom domain configurations to be fully activated?

The activation time may vary, but it generally takes a few minutes for the custom domain configurations to be fully active in the IBM Cloud Code Engine system.

10. Where can I find additional support or assistance?

For additional support or assistance, refer to the [IBM Cloud Code Engine documentation](link to documentation) or reach out to the IBM Cloud support team for prompt assistance.

Add a Comment

Your email address will not be published. Required fields are marked *