This guide is aimed at helping researchers set up a virtual machine capable of running R and Python in the cloud using Google Cloud Platform (GCP). It primarily documents first-hand experience setting up and using a virtual machine on GCP. Similar setups can be achieved with AWS and Microsoft Azure, though these guides focus specifically on Google Cloud. This has been an invaluable tool for me since the beginning of my PhD, and has drastically increased my productivity across many projects.
This guide is a mix of personal experience and tips with some more standard instructions on how to set up your own virtual work environment. It is written with a view to aid applied economics researchers. I have borrowed from many sources, and tried my best to correctly attribute these.
We will first configure our cloud-based server using the Google Cloud Virtual Machine (VM) and Visual Studio Code (VSCode). You’ll be able to leverage the VM’s resources – like additional processing power and memory – for your coding projects while working within your VSCode setup.
Author: Peter John Lambert, London School of Economics
Contributors: Yannick Schindler, Suraj Rajesh, Yifan Wang, Juan Bautista Sosa, Tongmeng Xie, Pauline Bucher, Thiemo Fetzer, and Luca Barbato.
We welcome any questions or feedback, which you can leave on our GitHub Issues page.
We will cover the following steps to set up your local machine for remote development using a Google Cloud Virtual Machine (VM):
-
Why do I need my own virtual machine? Pros and Cons
- Understand the advantages and costs of using a virtual machine, helping you decide if it’s the right solution for your needs.
-
Step 1: Install and Configure VSCode
- Set up Visual Studio Code, a powerful code editor that supports remote development.
-
Step 2: Create a Google Account
- Create a Google account, which is necessary for accessing Google Cloud services.
-
Step 3: Set up a Google Cloud Account
- Configure your Google Cloud account and start using VM instances.
-
Step 4: Create a Virtual Machine (VM)
- Create and configure a new virtual machine on Google Cloud, including specific recommendations on the configuration of the VM.
-
Step 5: Generate and Configure SSH Keys
- Generate SSH key pairs and configure them to securely connect to your virtual machine from VSCode.
-
Step 6: Connect to the VM Using VSCode
- Connect your local VSCode setup to the virtual machine, enabling remote development.
-
Step 7: Install Necessary Scripts and Tools on the VM
- Install essential scripts and tools on your virtual machine, ensuring it’s ready for development tasks.
-
Step 8: Open an R Script in VSCode
- Create and run R scripts in VSCode, leveraging the power of the virtual machine.
-
Step 9: Open a Python Notebook in VSCode
- Create and run Python notebooks in VSCode, allowing interactive development on the virtual machine.
-
Step 10: Starting and Stopping the VM
- Manage the start and stop operations of your virtual machine.
-
Step 11: Create a Static IP Address
- Assign a static IP address to your virtual machine to avoid reconfiguration issues when the machine restarts.
-
Step 12: Installing GitHub Copilot
- Set up GitHub Copilot in VSCode to enhance your programming experience.
There are at least three reasons to set up a virtual machine: (1) Flexibility, (2) Scalability, (3) Productivity. Reasons not to set up include the technical barriers to entry (though this guide aims to offset this!) and cost. On cost, I would argue that the relevant counterfactual would be purchasing a mid-range laptop (32GB of memory or higher) which will depreciate, puts an upper bound on the power available to you, and requires upfront liquidity to purchase.
While it is very common for universities to have their own computational resources for working with big data, I have found that having my own server affords a great deal more flexibility. The most obvious advantage is that I can turn the machine on and off as needed, and do not have to submit jobs to a schedule nor compete for resources with others. The ability to work in real-time drastically increases productivity and avoids lengthy wait times, which (for me) disrupt my workflow substantially.
Another way in which a virtual machine offers flexibility is in costs. Apart from the cost of data storage, you will not pay for any computational resources when not using the machine (unlike personal hardware). And if a project is going to be dormant for a while, you can download the data to a personal hard disk and shut down the virtual machine completely – at which point your costs become essentially zero.
The best feature of Google Cloud is its on-demand scalability. Unlike physical hardware, where you’re limited by the specifications you purchased, a cloud VM can be resized at any time to meet your needs:
- Vertical scaling: Need more power for a computationally intensive task? You can temporarily upgrade your VM to a machine with more CPUs and RAM, then downgrade when the task is complete. This means you only pay for extra power when you actually need it.
- GPU access: For machine learning workloads or parallel computing tasks, you can attach NVIDIA GPUs to your VM without having to purchase expensive hardware.
- Storage flexibility: Start with minimal storage and expand as your data grows. You can also attach persistent disks or use Cloud Filestore for shared storage across multiple VMs (see our Filestore mounting guide).
- Multiple VMs: For large-scale data processing, you can spin up multiple VMs to parallelize your work, then terminate them when done.
The combination of flexibility and scalability translates directly into productivity gains:
- No hardware maintenance: Google handles all the physical infrastructure, security updates, and system maintenance.
- Work from anywhere: Access your development environment from any device with an internet connection. Your work continues even if your laptop breaks.
- Consistent environment: Your VM maintains its state between sessions. No more “it works on my machine” problems when collaborating with others.
- Integration with cloud services: Seamlessly integrate with other Google Cloud services like BigQuery for large-scale data analysis, Cloud Storage for data lakes, or Vertex AI for machine learning.
While cloud computing offers many advantages, it’s important to understand the cost structure:
| Cost Component | Description | Typical Range |
|---|---|---|
| Compute (vCPUs + RAM) | Charged per hour of VM uptime | $0.02 – $2.00/hour depending on machine type |
| Storage | Charged per GB per month | $0.04 – $0.17/GB/month |
| Network egress | Data transferred out of GCP | First 1GB free, then $0.12/GB |
| Static IP | Charged when reserved but not in use | $0.01/hour |
💡 Cost-saving tips:
- Use Spot VMs for up to 60-91% discount on compute costs
- Always stop your VM when not in use
- Use the GCP Pricing Calculator to estimate costs
- Set up billing alerts to avoid surprises
- Consider committed use discounts for long-term projects
First, we need to install and configure Visual Studio Code (VSCode), a popular code editor that supports remote development.
- Download and install VSCode from the official website.
-
Open VSCode.
-
Click on the Extensions tab on the left sidebar
-
Search for “Remote – SSH: Editing Configuration Files” and click “Install” to add the extension to VSCode.
To use Google Cloud services, you need a Google account. If you don’t already have one, follow these steps to create a Gmail account.
Now that you have a Google account, you can set up your Google Cloud account to start using VM instances.
Navigate to Google Cloud, and you will automatically be prompted to log in with your Gmail account.
-
Click on the “START FREE” button at the upper right corner of the page.
-
Choose your country and organization when prompted.
-
Add billing information to your account. You will receive $300 worth of free Google Cloud credits to get started.
-
If you need more detailed instructions, refer to the official Google Cloud setup guide or this step-by-step tutorial.
In this step, you will create a new VM in your Google Cloud account.
-
On the top left, you would be able to view and click on ‘Select a project’ (1)
-
Then, on the subsequent window, select ‘New Project’ (2)
-
Navigate to the Google Cloud Console.
-
Install the ‘Compute Engine API’ when prompted
-
In the left-hand menu, click on “Compute Engine” and then “VM instances”.
-
Select “Create Instance” and configure the settings.
-
Name: Give your VM a name.
-
Region and Zone: Select the location for your VM. The default (“us-central1-a”) is usually the cheapest.
-
Machine Type: Choose a machine type based on your needs. For beginners, “e2-medium” (2 vCPUs, 4 GB memory) is a good starting point.
-
Click “Change” next to the Boot disk section.
-
In the Operating System dropdown, select “Ubuntu”.
-
In the Version dropdown, select “Ubuntu 20.04 LTS”.
-
Click “Select” to confirm.
-
For additional storage capacity, navigate to ‘Disks’ and click on ‘ADD NEW DISKS’.
-
Customise the boot disk size based on your task requirements; this will be charged regardless of VM usage intensity.
You can reduce costs by selecting “Spot” instances under the VM provisioning model, which are significantly cheaper. However, Google can temporarily shut down the VM when the instance is not in use or if there is higher demand for a particular period. In general, this could happen once or twice a week, but it depends on a case-by-case basis.
-
In “Firewall”, enable options like “Allow HTTP traffic” and “Allow HTTPS traffic”
-
In “Management”, enable “Deletion protection”
To securely connect VS code to your VM from your local computer, you need to generate SSH key pairs.
Open Command Prompt (CMD) and enter the following command:
ssh-keygen -t rsa -f [directory where you want to save the key] -C [username] -b 2048Here the username is simply your google account username with no dots or dots replaced by ‘_’. For example, if I want to save the key in this directory “C:\Users\wyf19.ssh\google_cloud_key2” and my username is “wyf1997203lse”. Then the command will become:
ssh-keygen -t rsa -f C:\Users\wyf19\.ssh\google_cloud_key2 -C wyf1997203lse -b 2048Then the output would look like:
Locate the generated keys. The file ending in .pub is the public key, and the other file is the private key.
Open the public key file with a text editor and copy its contents.
Creating an SSH key on a Mac to connect to a Google Cloud VM via Visual Studio Code is similar to the process on Windows. Here are the instructions you need to follow:
Open Terminal:
You can find Terminal in the Applications > Utilities folder, or use Spotlight search (Cmd + Space) and type “Terminal”
Generate the SSH key:
Run the following command in the Terminal:
ssh-keygen -t rsa -f ~/.ssh/[key_filename] -C "[your_email@example.com]" -b 2048Replace [key_filename] with the desired name for your key (e.g., google_cloud_vm_key), and [your_email@example.com] with your email address.
For instance, to generate an SSH key with the external IP 34.46.40.16 using your username rsuraj02 the command will be
ssh-keygen -t rsa -f ~/.ssh/google_cloud_vm_key -C "rsuraj02@example.com" -b 2048
Follow the prompts:
-
You will be asked to specify the location to save the key. The default location is usually fine (~/.ssh/), but you can specify a different path if needed.
-
You will also be prompted to enter a passphrase for added security. Press Enter if you do not want to set a passphrase.
Save paths to public and private keys:
Once the keys are generated, save the paths to both the private and public keys displayed in the terminal. The path with the extension ‘.pub’ is the public key.
View the public key:
Enter the below command to view and copy the public key:
cat ~/.ssh/google_cloud_vm_key.pub-
Navigate to the Google Cloud Console.
-
In the left-hand menu, click on “Compute Engine”.
-
Click on your VM instance name.
-
Click “Edit” and navigate to the SSH key section.
-
Click “Add Item” and paste your public key. Save the changes.
-
Reset the VM instance to apply the changes
With your SSH keys configured, you can now connect to the VM using VSCode.
-
Press
Ctrl + Shift + P(Windows) orCmd + Shift + P(Mac) to open the Command Palette -
Type “Remote-SSH: Connect to Host” and select it
-
Click “Configure SSH Hosts” and choose the file where your SSH key is stored
-
Add the following details:
Host [VM name]
HostName [External IP of the VM]
User [Google Cloud username]
IdentityFile [Path to your private key]- The External IP can be found by navigating to ‘Compute Engine’
-
Press
Ctrl + Shift + P(Windows) orCmd + Shift + P(Mac) and select “Remote-SSH: Connect to Host” -
Choose the configured host
-
Select “Linux” as the system type and continue (may not be required to choose system type in Mac)
Once connected, you can install the necessary tools and scripts on your VM.
First, we need to update the package list and install essential packages that are commonly required for software development and system operations. These packages include tools for handling software properties, package management, and development libraries.
sudo apt-get update
sudo apt-get install -y software-properties-common dirmngr ed gpg-agent \
less locales vim-tiny wget ca-certificates \
build-essential libcurl4-openssl-dev libssl-dev libxml2-dev
sudo apt update
sudo apt upgradeNext, we will add the Comprehensive R Archive Network (CRAN) repository to our sources list and import the public key to ensure secure package installation. We then install the R base package and its development tools, which are crucial for running R and building packages.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get update
sudo apt upgrade
sudo apt-get install -y r-base r-base-dev
sudo apt-get install -y libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-
dev \
libpng-dev libtiff5-dev libjpeg-dev libcairo2-dev libudunits2-dev libpoppler-cpp-dev \
libgdal-dev cmake
sudo apt update
sudo apt upgradeWe then install essential R packages for data manipulation, visualization, and development, which are widely used in data science and will provide a solid foundation for your projects.
sudo Rscript -e "install.packages(c('tidyverse', 'dplyr', 'ggplot2', 'devtools', 'formatR', 'remotes', 'selectr', 'languageserver', 'rmarkdown', 'httpgd', 'data.table'), repos='http://cran.rstudio.com/')"In addition to core packages, we install specific R packages that are useful for various data science tasks, including text processing, statistical modeling, and advanced plotting.
sudo Rscript -e "install.packages(c('fixest', 'devtools', 'janitor', 'lubridate', 'doParallel', 'tmaptools', 'rmarkdown', 'textclean', 'qdapRegex', 'quanteda', 'tokenizers', 'stringi', 'DescTools', 'readtext', 'rvest', 'xml2', 'DescTools', 'zoo', 'stargazer', 'readxl', 'ggplot2', 'scales', 'ggpubr', 'ggpmisc', 'egg', 'extrafont'), repos='http://cran.rstudio.com/')"Python is a versatile programming language commonly used in data science. We install Python and pip, a package manager for Python, to facilitate the installation of Python packages.
sudo apt-get install -y python3 python3-pipRadian is an enhanced R console that provides multiline editing and rich syntax highlighting. We install Radian to improve the R programming experience.
Copy code
pip3 install -U radian
#Ensure the path to Radian is included in the PATH environment variable
echo $PATH
nano ~/.bashrc
#Add the following line to ~/.bashrc**
export PATH=$PATH:/home/YOUR_USER_NAME/.local/bin
source ~/.bashrc
echo $PATHReturnVisual Studio Code (VSCode) is a powerful code editor with numerous extensions for various programming languages. We install VSCode and essential extensions for Python, R, and other development tools.
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code # or code-insiders
# Install VSCode extensions
code --install-extension mechatroner.rainbow-csv
code --install-extension ms-python.python
code --install-extension ms-toolsai.jupyter
code --install-extension ms-vscode.cpptools
code --install-extension github.copilot
code --install-extension GitHub.copilot-chat
code --install-extension REditorSupport.r
code --install-extension ms-python.vscode-pylance
code --install-extension eamodio.gitlens
code --install-extension vscodevim.vim
code --install-extension RDebugger.r-debuggerSetting the default locale ensures that your system uses the correct language and regional settings, which can prevent issues with software that relies on locale settings.
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8Install additional R packages directly from GitHub for specialized functionalities.
sudo Rscript -e "install.packages('devtools', repos='https://cloud.r-project.org/')"
sudo Rscript -e "install.packages('extrafont', repos='https://cloud.r-project.org/')"
sudo Rscript -e "devtools::install_github('trinker/textclean')"
sudo Rscript -e "devtools::install_github('Mikata-Project/ggthemr')"
sudo Rscript -e "extrafont::font_import()"
sudo Rscript -e "extrafont::loadfonts(device='postscript')"
sudo Rscript -e "print(extrafont::fonts())"The above code requires
If you need additional storage, attach a persistent disk. Be cautious not to format an existing disk if it contains important data.
# Get the device name
ls -l /dev/disk/by-id/google-*
# Create a folder and mount the disk
sudo mkdir -p /mnt/disks/pdisk
sudo mount -o discard,defaults /dev/nvme0n2 /mnt/disks/pdisk
# Make the disk read/writable
sudo chmod a+w /mnt/disks/pdisk
# Edit the fstab file to mount the disk on boot
sudo blkid /dev/nvme0n2
sudo vim /etc/fstab
# Add this line to /etc/fstab
UUID=e73634e9-81bd-459d-9286-0af3273150c1 /mnt/disks/pdisk ext4 discard,defaults,nofail 0 2
cat /etc/fstabAnaconda is a popular Python distribution for data science that includes many pre-installed packages. Mamba is a faster, drop-in replacement for the conda package manager. This step is optional if you prefer to use the system Python installed in Step 7.6.
# Download the Anaconda installer (check https://www.anaconda.com/download for latest version)
wget https://repo.anaconda.com/archive/Anaconda3-2024.02-1-Linux-x86_64.sh
# Make the installer executable and run it
chmod +x Anaconda3-2024.02-1-Linux-x86_64.sh
./Anaconda3-2024.02-1-Linux-x86_64.sh
# Follow the prompts:
# - Press Enter to review the license, then type 'yes' to accept
# - Press Enter to confirm the default installation location, or specify a custom path
# - Type 'yes' when asked to initialize conda
# Reload your shell configuration
source ~/.bashrc
# Verify the installation
conda --version
# Install Mamba for faster package management (optional but recommended)
conda install -n base -c conda-forge mamba
# Verify Mamba installation
mamba --version
# Create a new environment for your project (example)
mamba create -n research python=3.11 numpy pandas matplotlib scikit-learn jupyter
# Activate the environment
conda activate research💡 Tips:
- Use
mambainstead ofcondafor faster package installation and dependency resolution- Create separate environments for different projects to avoid dependency conflicts
- See the Conda documentation for more on environment management
Radian is an enhanced R console for the R language. To configure it in your VSCode settings, first, you need to find where Radian is installed on your VM.
Open the terminal and run the following command:
whereis radianThis command will display the path where Radian is installed. It might look something like /usr/local/bin/radian. Next, you need to add this path to your VSCode settings to make sure VSCode uses Radian as the R console.
-
Press
Ctrl + Shift + P(Windows) orCmd + Shift + P(Mac) to open the Command Palette. -
Type “Preferences: Open Remote Settings” and select it.
- In the settings.json file that opens, add the following configuration. Replace /usr/local/bin/radian with the path you found in the previous step:
{
"r.bracketedPaste": true,
"r.rterm.linux": "/home/rsuraj02/.local/bin/radian",
"r.lsp.path": "/usr/bin/R",
"r.lsp.debug": true,
"r.lsp.diagnostics": true,
"r.rterm.option": [
"--no-save",
"--no-restore"
],
"r.plot.useHttpgd": true,
"terminal.integrated.env.linux": {
"R_HOME": "/usr/lib/R"
}
}This configuration does the following: r.bracketedPaste: Enables bracketed paste mode in the R console. r.rterm.linux: Specifies the path to the Radian executable. r.plot.useHttpgd: Uses the httpgd package for rendering plots. Step 7.7.1: Saving Settings Save the changes to the settings.json file. Restart VSCode to apply the new settings.
With VSCode configured and connected to your VM, you can start working with R scripts.
-
Download and install R (version 3.4.0 or higher) for your platform from the CRAN website.
-
For Windows users: During installation, check the option “Save version number in registry” to allow the R extension in VSCode to automatically find the R executable.
-
Open R and run the following command to install the
languageserverpackage to enhance the coding interface:install.packages("languageserver") -
Choose the mirror closest to your location
-
Open VSCode and go to the Extensions tab on the left sidebar.
-
Search for “R” and install the extension provided.
-
In VSCode, click on “File” and then the “New File” as shown below
-
Click on the R document. An R Document (.R) is a basic script for running R code.
-
Write your R code in the document or markdown.
Example:
print('Hello, R!') -
To run the code, highlight the lines you want to execute and press
Ctrl + Enter(Windows) orCmd + Enter(Mac). The output will appear in the terminal at the bottom of the VSCode window using the configured Radian console. -
Also, if radian is configured correctly, you should be able to view
r$>in the command line of the terminal
- VSCode also supports Jupyter notebooks, allowing you to work with Python in an interactive environment. Python is already installed through the setup script. To use Python through Jupyter Notebook in VScode
-
Go to the Extensions tab in VSCode.
-
Search for “Python” and install the extension provided by Microsoft.
-
Search for “Jupyter” and install the extension provided by Microsoft.
-
In VSCode, click on “File” and then the “New File” as shown below
-
Click on Jupyter to use Python in a Jupyter notebook. Name the file with a .ipynb extension, for example, example_notebook.ipynb.
Before running any code, ensure that the notebook is using the correct Python kernel. View the top right button as indicated below; if the kernel isn’t installed, then select it to choose the Python interpreter installed on your VM.
- Click on the ‘+ Code’ icon to create a new code cell. Click on ‘+ Markdown’ to add a markdown to type in plain text comments, which are useful for writing reports. Refer to https://jupyter.brynmawr.edu/services/public/dblank/Jupyter%20Notebook%20Users%20Manual.ipynb for further guidance in using Jupyter Notebook.
Write your Python code in the cell.
Example:
print("Hello, Python!")-
Click the run icon next to the cell or press
Shift + Enter(Windows and Mac) to execute the code. The output will appear directly below the cell.
-
Navigate to the Google Cloud Console.
-
In the left-hand menu, click on “Compute Engine”.
-
Find your VM in the list and click the “Start” button.
-
In the left-hand menu, click on “Compute Engine”.
-
Find your VM in the list and click the “Stop” button.
Every time the instance is started, the public IP is modified, requiring modifications to the “SSH configuration” setting in your VScode. To avoid this, you can assign a static IP address.
-
Navigate to the Google Cloud Console.
-
In the left-hand menu, click on “Compute Engine”.
-
Click on your VM instance name.
-
Click “Edit”.
-
Navigate to “Network interfaces”
-
Click “External IPv4 Address”.
-
Select “Reserve Static Address”
-
Select a name and click “Reserve”
-
Open your Visual Studio Code editor.
-
Click on the Extensions tab on the left sidebar.
-
Type “GitHub Copilot” in the search bar and press Enter.
-
Click the “Install” button next to the GitHub Copilot extension.
-
Once installed, you will be prompted to sign in to your GitHub account. Follow the on-screen instructions to complete the authentication process.
-
Click on the icon shown below to verify that Copilot is running.
-
Open any file or start a new one (see steps 9 and 10). GitHub Copilot will start providing code suggestions as you type.
For detailed instructions and tips on how to use GitHub Copilot effectively in VScode, refer to GitHub Copilot in VSCode.
Now that you have your VM set up, you might want to:
- Set up a clean project structure: For a simple, reproducible directory layout (raw data vs derived data, scripts, manuscript outputs, and AI context), see our Research Project Folder Structure guide.
- Mount shared storage: If you need persistent storage that can be shared across VMs or team members, see our Filestore mounting guide.
- Set up version control: Configure Git on your VM for version control.
- Explore BigQuery: For large-scale data analysis, consider using BigQuery alongside your VM.
- Google Cloud Console – Main dashboard for managing GCP resources
- Compute Engine Documentation – Official VM documentation
- GCP Pricing Calculator – Estimate your costs
- Google Cloud Free Tier – Details on free credits and always-free resources
- Spot VMs Documentation – Learn about cost-effective preemptible instances
- GCP Best Practices – Enterprise best practices
- VSCode Documentation – Official documentation
- Remote Development Overview – Remote development guide
- VSCode Keyboard Shortcuts – Productivity shortcuts
- VSCode Settings Sync – Sync settings across machines
- The R Project – Official R website
- CRAN – Comprehensive R Archive Network
- R for Data Science – Free online book by Hadley Wickham
- Tidyverse – Collection of R packages for data science
- RStudio Cheatsheets – Quick reference guides
- Python.org – Official Python website
- Anaconda Documentation – Anaconda distribution docs
- Jupyter Documentation – Jupyter notebooks guide
- Python Data Science Handbook – Free online book
- GitHub Copilot Documentation – Official Copilot docs
- GitHub Copilot in VSCode – VSCode-specific guide
- GitHub Education – Free Copilot access for students/educators
- The Turing Way – Guide to reproducible research
- Software Carpentry – Computing skills for researchers
- Research Computing at LSE – LSE-specific resources
- SSH Key Management – SSH key generation guide
- GCP IAM Best Practices – Identity and access management
- Two-Factor Authentication – Securing your Google account
| Issue | Solution |
|---|---|
| Can’t connect via SSH | Check that your VM is running and your IP address hasn’t changed. Verify your SSH key is correctly added to the VM. |
| “Permission denied (publickey)” | Ensure your private key path is correct in your SSH config and the public key is added to GCP. |
| VM is slow | Consider upgrading to a larger machine type or check for resource-intensive processes. |
| Running out of disk space | Add a persistent disk or expand your boot disk in the GCP console. |
| Connection timeout | Check that your firewall rules allow SSH traffic (port 22). |
For more help, see the GCP Troubleshooting Guide.
This guide is maintained by the Applied Economics with AI community. If you have any questions, suggestions, or encounter issues:
- Open an issue on our GitHub repository
- Contact: Peter John Lambert at LSE
We hope this guide helps you enhance your research capabilities. Happy coding!
Last updated: January 2026