Claude Code is a command-line AI coding agent commonly associated with the Anthropic ecosystem. In this guide, we will cover the installation of Claude Code on Windows and Ubuntu, and most importantly, how to connect it to the public API endpoints of immers.cloud instead of relying on an official subscription. By the end of this article, you will have a fully functional terminal assistant ready to write and modify code directly within your project.
h2>Installation
While the official documentation describes the installation process in detail, there is a critical caveat: as of November 12, 2026, Anthropic has enforced an updated Supported Regions policy, leaving Russia outside the list of supported countries. These restrictions now apply not only to companies registered in Russia but also to organizations in third countries controlled by Russian individuals, affecting Claude.ai, Claude Code, the API, and models accessed via cloud platforms.
Therefore, even if you plan to use only the Claude Code CLI without the official Claude API, following the standard official instructions "as is" for installation and launch will not work — an alternative approach is required.
Important warning about the VPN or proxy usage:
The first solution that often comes to mind is using a VPN or proxy. While many users take this route, it is crucial to understand that Anthropic ties access to the user's physical location. Furthermore, the updated Usage Policy explicitly prohibits bypassing the list of supported regions, and sanctions can now be applied based on mere suspicion, without requiring concrete proof of violation.
There is a simpler and safer path: installation via package managers. The installation process itself, unlike the authorization step, does not perform regional checks, as the binary is downloaded from a public package registry rather than directly from Anthropic's servers.
For Windows, you can immediately use winget install Anthropic.ClaudeCode
After the installation is complete, restart your terminal to apply the changes.

For Ubuntu, you can use npm. Before proceeding with the installation, it is highly recommended to use a VPS for a more secure agent workflow.
By definition, the agent requires system-level access: it executes shell commands, edits files, and interacts with the network. Consequently, your project data and environment variables become part of its operational context. An isolated environment is significantly safer. A dedicated server hosts only your project, containing no personal correspondence, payment details, or credentials for other work services. Furthermore, if anything goes wrong, the environment can be completely redeployed in a matter of minutes.
Additionally, a remote server runs 24/7 without draining your local laptop's resources, allowing you to experiment freely. If a configuration breaks, only the isolated environment is affected, making it trivial to tear down and recreate. Therefore, a highly convenient option is to provision a dedicated server directly through the immers.cloud.
While the official Claude documentation specifies minimum system requirements (Ubuntu 20.04+, 4 GB+ RAM, x64 or ARM64 processor), we recommend provisioning a budget-friendly CPU server with slightly more RAM for optimal performance. For example, use the cpu.2.8.40 configuration with the Ubuntu 24.04 (Jul 2026) [UEFI] pre-installed image.
To do this, navigate to the server creation page, configure the parameters to suit your task, and wait until the server status changes to Active.
Installation Steps:
Connect to your server via SSH and execute the following commands:
node -vsudo apt updatesudo apt install -y nodejsmkdir -p ~/.npm-globalecho 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrcnpm install -g @anthropic-ai/claude-codeOnce Claude Code is installed, its first run will attempt to reach Anthropic's official servers for update checks and telemetry.
To ensure the agent immediately connects to the public immers.cloud endpoint without encountering network or authorization errors, you must pre-configure the settings.json file with the required environment variables and place it in the following directory:
| Windows | Ubuntu |
|---|---|
%USERPROFILE%\.claude\settings.json |
~/.Claude/settings.json Create the directory:: mkdir -p ~/.Claude Create and open the file in the nano text editor:nano ~/.Claude/settings.json Paste your JSON configuration, then save the file: Press Ctrl + O, then Enter (to save). Verify that the file is in place and contains no syntax errors:cat ~/.Claude/settings.json |
Verify that the file is in place and contains no syntax errors:
{
"env": {
"ANTHROPIC_BASE_URL": "https://chat.immers.cloud/v1/endpoints/generate",
"ANTHROPIC_AUTH_TOKEN": "your-immers.cloud-token",
"ANTHROPIC_API_KEY": "",
"ANTHROPIC_MODEL": "qwen3.8-27b",
"CLAUDE_CODE_EFFORT_LEVEL": "medium",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS":200000,
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}
ANTHROPIC_BASE_URL: Points the agent to the public immers.cloud API.ANTHROPIC_AUTH_TOKEN: Your personal token, available on the Token Management page after completing registration and account verification.ANTHROPIC_MODEL: The exact model name as listed on the Model Catalog page — filter by the "Available for Trial" tag.CLAUDE_CODE_MAX_CONTEXT_TOKENS: Specifies the maximum context window supported by the model at this endpoint. For public endpoints, this value can be found in the Context field within the Public Endpoint section on the model's page. For private endpoints, refer to the Context field on the endpoint's specific dashboard page.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: Disables all background network requests from Claude Code (e.g., automatic updates, telemetry/analytics collection, crash reporting, etc.). Note that with this enabled, you will need to update the software manually using npm install -g @anthropic-ai/claude-code@latest (Linux/macOS).Private Endpoints: If you have deployed a private endpoint, set this variable to the exact value found in the Model Name field on your private endpoint's dashboard page. If your private endpoint hosts a model that is also available on a public endpoint, using the default URL does not currently guarantee that inference will be routed specifically to your private endpoint rather than the public one.
After completing the setup, verify that Claude Code is installed correctly and accessible in your terminal by checking its version:

and run the Claude Doctor command, which verifies your installation, authorization, and PATH configuration.

You are now ready to launch the agent itself. To do this, open your terminal, navigate to your project directory, and start Claude Code using the following command:
cd /path/to/your/repo
claude
During the first launch, you will be prompted to complete the initial setup (e.g., selecting a UI theme, confirming that you trust the repository, etc.).
At the end of the setup process, you may see a warning stating: Model "qwen3.8-27b" isn't recognized. This simply indicates that Claude Code could not find the qwen3.8-27b model name in its internal Anthropic model registry. You can safely ignore this warning, as the agent will still function correctly with your custom endpoint configuration.

The agent is now fully operational and ready for use.
To verify that everything is working correctly, try submitting a simple prompt and observe the resulting changes directly in your development environment.

Alternatively, you can interact with the agent using the official Claude Code extension by Anthropic. This extension is available in the respective editor marketplaces and is compatible not only with VS Code, but also with Cursor and Windsurf.
Once installed, the AI agent integrates seamlessly into your editor, appearing as a dedicated side panel for a more streamlined workflow.

During a session, Claude Code is controlled via slash commands. You can find the complete list in the official documentation, but the following commands are sufficient to get started:
| Command | Description |
|---|---|
| /help | Show all available commands |
| /init | Create a CLAUDE.md file |
| /clear | Clear the current conversation history |
| /compact | Compress the context window to save tokens |
| /context | Show current context window usage |
| /resume | Return to a previous session |
| /add-dir | Add another working directory to the context |
| /model | Select a different model |
| /exit | Exit Claude Code |
It is crucial to understand that Claude Code's built-in cost-tracking commands will not display accurate information when used with a third-party API. To check your spending, use the /status command inside the session and the Token Consumption page in your immers.cloud dashboard. This page displays your actual token usage and the corresponding billing charges based on your active rates.
If you decide to try a different model and your ANTHROPIC_BASE_URL is set to the Endpoints Generation Page, you can switch models directly within an active Claude session using the following command:
/model
When you run this command, an interactive menu will appear. You can use the Up/Down arrow keys to select the model, and the Left/Right arrow keys to adjust the reasoning parameter.
Note: The first few rows in this menu will display models from Anthropic's internal registry. You should skip these and select the specific immers.cloud model you intend to use.