You'll need a machine on which you can run code-server. You can use a physical machine you have, or you can use a VM on GCP/AWS.
At the minimum, we recommend:
- 1 GB of RAM
- 2 CPU cores
You can use any Linux distribution, but our docs assume that you're using Debian hosted by Google Cloud (see the following section for instructions on setting this up).
Your environment must have WebSockets enabled, since code-server uses WebSockets for communication between the browser and the server.
The following steps walk you through setting up a VM running Debian using Google Cloud (though you are welcome to use any machine or VM provider).
If you're signing up with Google for the first time, you should get a 12-month trial with $300 of credits.
After you sign up and create a new Google Cloud Provider (GCP) project, create a new Compute Engine VM instance:
- Using the sidebar, navigate to Compute Engine > VM Instances.
- Click Create Instance.
- Provide a name for new instance.
- Choose the region that's closest to you based on GCP ping.
- Choose a zone (any option is fine).
- We recommend choose an E2 series instance from the general-purpose family.
- Change the instance type to custom and set at least 2 cores and 2 GB of RAM. You can add more resources if desired, though you can also edit your instance at a later point.
- Though optional, we highly recommend switching the persistent disk to an SSD with at least 32 GB. To do so, click change under Boot Disk. Then, change the type to SSD Persistent Disk, and set the size to 32. (You can also grow your disk at a later date).
- Go to Networking > Networking Interfaces and edit the existing interface to use a static internal IP. Click Done to save.
- If you don't have a project-wide SSH key, go to Security > SSH Keys to add your public key.
- Click Create to proceed.
Notes:
- To lower costs, you can shut down your server when you're not using it.
- We recommend using the
gcloud cli
to avoid using the GCP Dashboard if possible.