Skip to main content

Configuring your server to deploy your Copilot agent

Learn how to deploy your Copilot agent to a server that is accessible to the internet.

Note

GitHub Copilot Extensions is in public preview and subject to change.

Your Copilot agent must be hosted on a server that is accessible to the internet. This guide will help you set up a server to run your Copilot agent. In this guide, we will use ngrok to create a tunnel to your local server, but you could also use a service like localtunnel or serveo.

Alternatively, if you are a Codespaces user, you can use the built-in Codespaces port forwarding. For more information, see "Forwarding ports in your codespace."

Prerequisites

Configuring your server

  1. Visit the ngrok setup & installation page.

  2. If you do not yet have an account, follow the instructions on screen to sign up.

  3. Under "Agents," ensure the correct operating system is selected.

  4. Under "Installation," follow the instructions for your operating system to download and install ngrok.

  5. Under "Deploy your app online," selection Ephemeral domain or Static domain.

  6. Run the command provided in your terminal, replacing the port number with the port your agent is configured to run on. For example:

    • For an ephemeral domain:

      Shell
      ngrok http https://127.0.0.1:3000
      
    • For a static domain:

      Shell
      ngrok http --domain=YOUR-STATIC-DOMAIN.ngrok-free.app 3000
      

      Note

      The Blackbeard demo extension is configured to run on port 3000 by default.

  7. In your terminal, next to "Forwarding," copy the URL that ngrok has assigned to your server. You will need this forwarding endpoint when you are configuring your GitHub App.

    Note

    Do not copy the -> https://127.0.0.1:XXXX part of the URL.

    Keep the terminal window open while you are using your agent.

Next steps