Architecting Remote Development in PhpStorm via JetBrains Gateway
Learn how PhpStorm's Remote Development architecture splits the IDE into a thin client and a heavy backend to offload indexing and analysis to remote servers.
18 Jun 2026, 11:13 UTC

The Resource Bottleneck Problem
Large PHP projects—particularly those with massive vendor directories and complex static analysis requirements—often exhaust local machine RAM and CPU during indexing. This leads to UI freezes and decreased productivity. The takeaway is that by decoupling the IDE's heavy lifting (indexing and analysis) from the UI (rendering and input), you can move the computational burden to a high-performance remote server while maintaining a local-feeling experience.
The Client-Server Split
PhpStorm's Remote Development architecture utilizes a split-brain design. Instead of a single application, the environment is divided into two distinct components: the JetBrains Client and the IDE Backend.
- JetBrains Client: A thin frontend that handles rendering, keyboard input, and basic UI state. It does not index files or run the PHP interpreter.
- IDE Backend: A full instance of the PhpStorm engine running on a remote host. It manages the project's file system, performs static analysis, indexes the codebase, and executes terminal commands.
Smallest Suitable Design
For a standard engineering team, the leanest deployment involves a remote Linux server (Ubuntu or similar) with SSH access and a local machine running JetBrains Gateway. The Gateway acts as the orchestrator, deploying the IDE backend to the server and launching the client locally. This removes the need for complex VPNs or remote desktop software, as only the IDE protocol traffic is transmitted over SSH.
Trust and Data Boundaries
The boundary of trust is established at the SSH layer. The local client does not have direct access to the remote file system; instead, it requests file contents and analysis results from the backend via a proprietary protocol.
| Operation | Execution Location | Data Boundary |
|---|---|---|
| Code Indexing | Remote Backend | Server Disk/RAM |
| UI Rendering | Local Client | Local GPU/RAM |
| PHPUnit Execution | Remote Backend | Remote Environment |
| Keybindings/Input | Local Client | Input Buffer |
Operational Checks and Verification
To verify that the architecture is functioning as intended and not falling back to local processing, perform the following checks:
Resource Distribution Check
Run a full project re-index and monitor system resources. You should see a spike in CPU and RAM on the remote server, while the local machine remains relatively idle.
On the Remote Server (via SSH):
# Run top or htop to monitor the IDE backend process
htop
# Look for 'phpstorm' or 'idea' processes consuming significant memory
Connectivity Heartbeat
The client and backend maintain a persistent heartbeat. If the connection drops, the client will enter a "Reconnecting" state. You can verify the connection stability by pinging the remote host from your local terminal to ensure latency is within acceptable limits (typically <100ms for a fluid experience).
Failure Modes
- Network Latency Spikes: High latency does not crash the IDE, but it introduces "input lag," where characters appear seconds after typing. This is a limitation of the thin-client model.
- Backend Process Crash: If the remote IDE backend crashes (e.g., due to an Out-Of-Memory error), the local client will lose all project context. You must restart the backend via JetBrains Gateway.
- SSH Timeout: Aggressive SSH timeout settings on the server can kill the backend session. Ensure
ClientAliveIntervalis configured in/etc/ssh/sshd_configto keep the session active.
Design Constraints and Scaling
The current design assumes the remote server has sufficient vertical scale to handle the project's index. If the project grows to a size where the remote server's RAM is exhausted, the backend will swap to disk, causing severe performance degradation. In this scenario, the design must change from a single remote host to a higher-spec instance or a dedicated development VM.
Rollback Procedure
Since this architecture changes where the IDE runs rather than modifying the project code, rolling back involves:
- Closing the JetBrains Client.
- Deleting the IDE backend installation on the remote server (typically located in
~/.cache/JetBrains). - Opening the project locally in a standard PhpStorm installation.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.