Running Theia (VSCode-like IDE) in the Cloud & Sharing it Securely

Do you want a VSCode-like IDE running in your Linux cloud server accessible from anywhere? In this post, I’ll walk you through:

  1. Installing and building Theia
  2. Securely forwarding your IDE through SSH using push-pull-port shell scripts.

Let’s go!

On Your Cloud Server

Prerequisites

Make sure you have the latest stable Node.js, git, and python3.

For Linux:

Install the required development tools and libraries (Ubuntu/Debian, for other distros, see the Theia docs):

1
2
3
sudo apt-get update
sudo apt-get install -y build-essential make gcc pkg-config python3 git
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev

Globally install corepack (for yarn and pnpm):

1
npm install -g corepack

Cloning and Building Theia

Clone the repo and install dependencies:

1
2
3
git clone https://github.com/eclipse-theia/theia-ide.git
cd theia-ide
yarn

Building Theia is memory-intensive (~4GB RAM required).

To check your current max heap size (MB):

1
node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))'

If less than 4000, temporarily boost Node.js heap:

1
export NODE_OPTIONS="--max-old-space-size=4096"

Now build:

1
yarn build

Then download plugins:

1
yarn download:plugins

Running Theia

Start Theia (recommended to use tmux for a persistent session):

1
yarn browser start

By default, it starts at http://localhost:3000/.

On Your Local Machine

Secure Remote Access

Open-sourcing a dev server is risky. Instead, securely tunnel access to your local machine using push-pull-port—dead-simple shell scripts to “push” or “pull” TCP ports via SSH.

Benefits:

  • No port forwarding rules
  • No VPN
  • Auto-reconnecting
  • Jargon-free

Prerequisites

  • autossh (for robust tunnels):

    • Ubuntu
      1
      sudo apt install autossh
    • macOS
      1
      brew install autossh
  • SSH keys set up for passwordless login to your cloud server.

    Generate an SSH keypair (if not yet):

    1
    2
    ssh-keygen
    ssh-copy-id [-p <ssh_port>] <user>@<host>

Pull Theia Cloud Port to Your Local Machine

To “pull” remote port 3000 to your local port 13000:

1
sh pull-remote-port.sh -r 3000 -u your-ssh-user -h cloud.example.com -l 13000
  • Now, visit http://localhost:13000 in your browser—it connects right to your private cloud Theia instance, securely, via SSH.

Tip: You can specify a custom SSH port with -p.

Credits


Running Theia (VSCode-like IDE) in the Cloud & Sharing it Securely
https://jifengwu2k.github.io/2026/03/06/Running-Theia-VSCode-like-IDE-in-the-Cloud-Sharing-it-Securely/
Author
Jifeng Wu
Posted on
March 6, 2026
Licensed under