FAQ

Which languages and frameworks are supported?

Devboxes and Repositories work with anything that can run in Docker. They provide the best experience for JavaScript (including TypeScript), frontend and full-stack, and officially support (with built-in LSP/IntelliSense) Rust, Go, Python, PHP, Ruby on Rails, Elixir, Node and Deno (more languages coming soon).

Sandboxes are more limited. They support JavaScript/TypeScript projects, as well as Node.js.

Create a Sandbox or Devbox from a template (opens in a new tab), or read more about the difference between Sandboxes and Devboxes.

What operating systems and devices are supported?

CodeSandbox is designed for Desktop/Laptop operating systems, browsers and display resolutions.

For those who may like to code on the move, we offer an iOS app (opens in a new tab) for iPhone and iPad.

Our editor may work on other operating systems and mobile devices. While we will take onboard feedback from users on these platforms, we do not officially support them or recommend them for the optimum CodeSandbox experience.

How do I make a sandbox private?

There are several ways to set a sandbox as private. One universal way (that works both for sandboxes and devboxes) is to right-click a sandbox from the dashboard and select Make sandbox private.

💡

A Pro subscription (opens in a new tab) is required to make sandboxes private or unlisted.

You can also change the privacy settings from the editor. How you do it will depend on whether you're using a sandbox or a devbox, as shown below.

Make a browser sandbox private

The browser editor provides two ways to change the privacy settings:

  1. Change the privacy drop-down under Permissions in the Sandbox Info tab.
  2. Click the Share button on the top right and change the privacy drop-down at the top.

Make private in the editor

Make a Devbox private

The Devbox editor also provides two ways to change the privacy settings:

  1. Click the chevron on the right side of your Devbox's name at the top of the screen; click Edit info and then change the drop-down next to Privacy.
  2. Click the Share button on the top right and change the drop-down under Permissions.

I'm getting a 422 error when importing from GitHub, why?

There are a few possible reasons a repo might throw that error on import. The most common are: the lack of a package.json file, or the project using more than 500 modules (files).

If you think it's something else, or you're unable to solve this yourself, then get in touch using our support form (opens in a new tab) and provide a link to the repo you're importing and we can look into this for you.

Why are my start scripts not having an effect?

For performance reasons, we ignore any specified scripts in sandboxes, instead using a default script. If you need to control the scripts, then we recommend using a Devbox.

Can I change the Node version used in a Devbox?

Yes, we have instructions here (opens in a new tab) that tell you how to change the Node version. All recent server sandboxes run in a Devbox.

For container sandboxes that are created after May 10 2021, we run Node v14.18.1 (LTS) by default. For backwards compatibility, the older sandboxes are on Node v10. However, you can specify a node value to alter the version in sandbox.config.json which will be used instead. For further details, see configuration.

💡

This method only applies to legacy sandboxes.

Note that we recommend using Devboxes when you're working with Node.js projects.

How do I change the editor's theme?

To change the theme of a Devbox (opens in a new tab), click on the CodeSandbox logo at the top left, then go to Settings > User Preferences, and select a theme from the Themes dropdown. You can also do it from the command palette (opens in a new tab).

On a Sandbox, you can change the theme from File > Preferences > Color Theme in the editor. You can also set a custom VS Code theme on a Sandbox. Open VS Code, Press (CMD or CTRL) + SHIFT + P, Enter: '> Developer: Generate Color Scheme From Current Settings', copy the contents and paste it into Preferences > Appearance from the top-right avatar menu. After completing that, you need to reload the browser and select "Custom" as your color theme from File > Preferences > Color Theme.

Do sandboxes have any limitations?

We currently provide Sandboxes and Devboxes. Sandboxes have the following limitations:

  • The maximum file upload size is 7MB for Free users and 30MB for Pro users.
  • Imported sandboxes must contain a package.json file.
  • Cannot use more than 500 modules (files). Note that node_modules and dependencies do not count toward this limit.
  • The maximum file size that can be opened in the editor is 2MB. Files uploaded that are larger than that still exist but are linked as a static asset.
  • Terminal commands that alter the filesystem of the container instance aren't synced with files shown in the editor. You'll need to refresh to see files updated this way.
  • When using a container, there is a sync limit of 10 files per second and only files up to 2MB are synced with the editor. Files larger than that still exist but are not shown in the editor's file tree. You're still able to write and read to and from them in your code and they can be seen and edited via the terminal.
  • When using a container, the sandbox sleeps after around 10 minutes and can be woken by opening the sandbox or preview in a web browser.
  • When using a container, the sandbox has a 1GB persistent storage limit, a 1GB vCPU soft limit, and a hard memory limit of 2 GB.

Devboxes are part of our evolved CodeSandbox experience, so we highly advise you to use them to avoid encountering these limitations.

I'm getting a 'Request Entity too Large' error, what should I do?

If you encounter this error when importing or committing, check your sandbox or repo for large binary files and remove them.

Can I use a database on CodeSandbox?

Yes, you can use any database that has a Docker image available with a Devbox. Some popular databases with Docker images include MySQL, PostgreSQL, MongoDB, and Redis.

Do I need to install Docker on my local machine to use it in CodeSandbox?

No, you don't need to install Docker on your local machine. CodeSandbox has built-in support for Docker (opens in a new tab), so you can use it directly in the online development environment.

How do I access the database once it's running in a Docker container?

You can access the database using the appropriate driver for your language or framework. Typically, you'll need to provide the hostname, port number, username, and password to connect to the database.

Can I use multiple databases in the same CodeSandbox project?

Yes, you can use multiple databases in the same project by running multiple Docker containers with different port numbers. However, keep in mind that running multiple databases can put a strain on your system resources and affect performance.

Can I use Docker Compose in CodeSandbox?

Yes, you can use Docker Compose in CodeSandbox to orchestrate multiple containers and define the relationships between them. However, you'll need to create a Docker Compose file and run the docker-compose command in the terminal to start the containers.

Is it safe to use a database in CodeSandbox with Docker support?

Yes, it's safe to use a database in CodeSandbox with Docker support, as long as you follow best practices for security and keep your database credentials private. Docker provides a secure and isolated environment for running containers, so your database is protected from external threats.

How do I troubleshoot issues with my database in CodeSandbox with Docker support?

If you're having issues with your database, you can check the logs of the container to see if there are any error messages. You can also run commands like docker ps and docker logs in the terminal to get more information about the container. Additionally, you can ask for help on the CodeSandbox community forums or consult the documentation of the specific database you're using.

How do I change the font used in a browser sandbox?

Ensure the font you want to use has been installed on your computer, then put the name of it first in the comma-separated list under 'Editor: Font Family' from File > Preferences > Settings in the editor.

💡

This method only applies to legacy sandboxes.

Why is my code in an infinite loop that doesn't allow me to edit?

While we do have infinite loop protection as a configurable option (opens in a new tab) it doesn't prevent all scenarios where infinite loops can occur, such as with incomplete code. When this happens, you can append runonclick=1 to the editor URL to stop the code from being automatically executed, enabling you to edit your code to resolve it. For example: https://codesandbox.io/s/new?runonclick=1 (opens in a new tab)

Can I push/pull from a GitLab, Azure DevOps, or BitBucket repository?

Yes. While our Repositories only have built-in push and sync capabilities for GitHub, you can connect to a remote repository from any other git provider.

To do that, use our terminal to git remote add the remote repository and then add your credentials for it. You can also add the authentication details to the CodeSandbox microVM using environment variables (opens in a new tab).

How do I cancel my Pro or Patron plan?

For Pro users, once you've logged in, you can downgrade your plan on the Settings page (opens in a new tab) once you've selected your Pro workspace.

If you're on one of our legacy Patron plans you can cancel your subscription on the Patron page (opens in a new tab).