Relay Servers
A Relay server is a component that acts as an intermediary between the JetBrains IDE client on the developer's local machine and the IDE backend running in a remote environment. It enables secure communication even if inbound connections to dev environments are restricted by firewalls or other security policies. If you want to use JetBrains IDEs in dev environments, you should have at least one Relay server in your CodeCanvas deployment.
Depending on your setup, a Relay server may already be installed (e.g., in a single-cluster installation). In distributed setups or when scaling to multiple regions, you might need to add more Relay servers. We recommend deploying it as close to the target dev environments as possible to reduce latency (e.g., within the same dev environment cluster or in the same region). However, you can also deploy the Relay server in the CodeCanvas application cluster if needed.
Prerequisites
A Kubernetes cluster where you want to deploy the Relay server (we will refer to it as the Relay cluster). It is possible to deploy the Relay server in the dev environment cluster itself.
The Relay cluster is network-accessible from the CodeCanvas application cluster and the dev environment cluster.
The Relay cluster must have an ingress controller installed and configured.
You have a domain name for the Relay server (e.g.,
relay.example.com
) that resolves within the Relay cluster.A cert-manager must be installed in the Relay cluster. Ensure the cert-manager is properly configured to issue certificates for your Relay server's domain.
Deploy Relay server
In CodeCanvas, select Administration in the header navigation, then in the sidebar menu, select Relay Servers.
Click New connection.
Specify a Relay server Name and a Relay server URL (e.g.,
wss://relay.example.com
), then click Save. The server will be added to the list of Relay servers in the Inactive state.Open the newly added Relay server and copy the Connection snippet (a Kubernetes secret manifest). The snippet looks like this:
apiVersion: v1 kind: Secret metadata: name: codecanvas-relay-secret namespace: "RELAY_NAMESPACE_PLACEHOLDER" type: Opaque data: JWT_PUBLIC_KEY: <encoded-public-key>Here:
metadata.name
is the name of the secret. In our example, it iscodecanvas-relay-secret
.RELAY_NAMESPACE_PLACEHOLDER
– the Kubernetes namespace where the Relay server should be deployed. You can create a new namespace withkubectl create namespace RELAY_NAMESPACE_PLACEHOLDER
or use an existing one.<encoded-public-key>
– the encoded generated public key value
Create a Kubernetes secret file (e.g.,
relay-secret.yaml
) and paste the snippet.Apply the secret to the Relay cluster:
kubectl apply -f relay-secret.yamlCreate a
relay.values.yaml
file with the following content:application: ingress: ingressClassName: "INGRESS_CLASS_PLACEHOLDER" hostname: "RELAY_DOMAIN_PLACEHOLDER" annotations: "cert-manager.io/cluster-issuer": "CERT_MANAGER_NAME_PLACEHOLDER" tlsEnabled: true secret: existingSecretName: "SECRET_NAME_PLACEHOLDER" ## Alternatively to secret, you can provide the not-encoded public key value # relayJwtPublicKey: GATEWAY_PUBLIC_KEY_PLACEHOLDERHere:
INGRESS_CLASS_PLACEHOLDER
– an ingress class name in the Relay cluster.RELAY_DOMAIN_PLACEHOLDER
– a domain name reserved for the Relay server, e.g.,relay.example.com
.CERT_MANAGER_NAME_PLACEHOLDER
– a name of the cert-manager issuer in the Relay cluster.SECRET_NAME_PLACEHOLDER
– a name of the Relay server secret. In our example, it iscodecanvas-relay-secret
.GATEWAY_PUBLIC_KEY_PLACEHOLDER
– alternatively to providing a secret name, you can provide the not-encoded public key value directly. You can copy it from the Relay server page in CodeCanvas from the Public key field.
Apply the changes to the Relay cluster:
helm upgrade -n RELAY_NAMESPACE_PLACEHOLDER --wait --install \ -f relay.values.yaml \ codecanvas-relay \ oci://public.registry.jetbrains.space/p/codecanvas/release-charts/codecanvas-relay \ --version 2025.1.2Replace
RELAY_NAMESPACE_PLACEHOLDER
with the Kubernetes namespace where the Relay server is deployed.In CodeCanvas, open the Relay server page and ensure that the server is in the Active state.
The custom Relay server is now ready for use. When configuring a computing platform, select the custom Relay server from the Relay server dropdown.