Domains
When attaching a service to an instance, Unikraft Cloud exposes the instance on a subdomain of unikraft.app by default.
You can also use your own custom domain instead.
Configuring your external DNS provider
Before Unikraft Cloud can launch an app, you need to ensure that you have configured things correctly with your DNS provider:
-
For a subdomain you own such as
docs.mydomain.com, a CNAME is enough. In this case, you can just add a CNAME record with your sub-domain (docs) as the host and point the record to Unikraft Cloud's metro (for example,fra.unikraft.app). -
For an apex domain (for example,
mydomain.com), add one of: ALIAS1, ANAME1, or a flattened CNAME record. Depending on your provider, leave the host field empty or enter@. Point the record to the metro (for example,fra.unikraft.app). If the provider doesn't support these record types, add an A record pointing to the metro IP address.
You can find information about the Unikraft Cloud metros available to you, as well as their IP addresses, via the CLI.
You can have many domains for the same service. Unikraft Cloud also supports wildcard domains.
Launching your app
Assume the goal is to use NGINX as an app:
Log into Unikraft Cloud and select a metro close to you.
This guide uses fra (Frankfurt, DE):
The UKC_TOKEN and UKC_METRO environment variables are only supported by the legacy CLI.
With this in place, use the CLI to create an instance of the web server and link it to a custom name. Unikraft Cloud does this through the domain flag:
The resulting output of the deploy command should be like:
When you issue the domain flag, Unikraft Cloud requests a new certificate from the public certificate authority. To check the validation status of the certificate, use the CLI:
You should see it first in pending:
Unikraft Cloud requests a certificate from Let's Encrypt using the ACME protocol. It can take a few seconds before issuing the certificate. If there are misconfigurations or DNS changes that your external DNS provider hasn't propagated yet, this can take much longer.
After their state changes to valid, check the deployment with curl:
Code
Learn more
- The CLI reference and the legacy CLI reference.
- Unikraft Cloud's REST API reference, in particular the sections on instances, service groups and certificates.
- The certificates documentation for more information on how to use custom certificates with your services.