Is it possible to use a custom domain when using the Koyeb sandbox?

I need to host a web application by running npm run app in the sandbox, but I want the URL to be exposed to “my custom domain” instead of Koyeb domain. Is this possible current? OR When will this be implemented?

Hello @kincjf,

I’ve just updated our Python SDK to allow passing the ID of an existing App. It should be possible to do now.

First you need to create an app and configure a custom domain. You can’t just create an “App” using our UI but you can do it with our CLI:

koyeb app create my-new-app

or SDK:

import os
from koyeb.sandbox.utils import get_api_client

token = get_api_client("your api token")
clients = get_api_client(api_token)
app_client = clients[0]
apps_api.create_app(app={"name":"my-app"})

Then, using our UI, you can configure a custom domain for your app.

After that, when creating a new Sandbox, you can pass the app ID like this:

        sandbox = Sandbox.create(
              .
              .
              .
            app_id=app_id,  # <<-- Use the existing app instead of creating a new one
        )

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.