New

Introducing a new and improved editor powered by VS Code Web

Learn more
arrow_back
Blog chevron_right Highlights
Feb 7, 2023

Cloud development inside your network with Tailscale

How Tailscale can connect an application running in CodeSandbox to your private resources.

AJ Foster
AJ Foster
Cloud development inside your network with Tailscale

At CodeSandbox, we use CodeSandbox Repositories for the majority of our development work (working on the product, inside the product).

This cloud development workflow saves us a lot of time and effort. However, we also have some services that are not available on the public internet — the kind of thing that a CodeSandbox Repository environment might not have access to.

Normally, to develop an application that requires access to internal resources, you have two choices: open up the internal resources to the world, or spend a lot of time mocking the services in your development environment. Neither option is particularly great, so we're excited to announce a partnership with Tailscale to bring CodeSandbox Repositories into your network.

What is Tailscale?

Tailscale lets you easily manage access to private resources, quickly SSH into devices on your network, and work securely from anywhere in the world. It uses a secure Wireguard mesh network to connect devices, virtual machines, and servers — and now CodeSandbox Repository environments — regardless of their location.

We use Tailscale at CodeSandbox to manage network access for private resources, including some of the services that make up the product itself.

Using Tailscale with CodeSandbox

Integrating a CodeSandbox Repository with Tailscale requires an auth key, a secret you embed in the CodeSandbox environment to allow registration on your network. Admins can create them on the auth key page of the Tailscale admin console.

Tailscale currently works in CodeSandbox environments by adding a container to a Dockerized application setup (for example, using docker-compose). The additional container runs the Tailscale client and provides networking for the other containers. Running applications will have access to private resources on your tailnet.

In the screenshot below, you can see an example of a CodeSandbox Repository environment connected to our tailnet.

Tailscale Console showing a CodeSandbox environment

For more information about the auth key and container setup, check out our documentation.

What this enables

After going through the straightforward setup instructions, you can leverage this integration right away for some useful use cases:

  • Providing access to internal resources for applications running inside CodeSandbox.
  • Exposing applications to your internal resources from inside of CodeSandbox.
  • Seeing running CodeSandbox environments in your Tailscale dashboard.
  • Controlling everything using optional tagging and ACLs in Tailscale.

We're excited to open up this new set of possibilities for CodeSandbox development environments. Get started by checking out Tailscale and taking a look at our documentation.



Keep reading about Highlights .

Enabling communities to learn with CodeSandbox and IngressiveForGood
Highlights May 25, 2022

Enabling communities to learn with CodeSandbox and IngressiveForGood

CodeSandbox in collaboration with Ingressive4Good supporting developers in communities to build and learn new skills.

    Fusing Open Source and Work with Paul Henschel
    Highlights Dec 1, 2020

    Fusing Open Source and Work with Paul Henschel

    Coders and creators of all kinds use CodeSandbox to prototype and share their ideas. This creator profile showcases the sandboxes of web animation pioneer Paul Henschel and we chat about the symbiotic relationship he's forged between his open-source contributions and professional work.

      Curiosity-driven Development with Charlie Gerard
      Highlights Nov 30, 2020

      Curiosity-driven Development with Charlie Gerard

      Coders and creators of all kinds use CodeSandbox to prototype and share their ideas. This creator profile showcases the sandboxes of creative technologist Charlie Gerard and we chat to her about how she harnesses her curiosity to inspire and drive her creative experiments.