Claude Code and Codex on your server: work from Russia without VPN and without risk to your account
Claude Code and Codex CLI are not available in all countries, and Russia is not included in the list of supported ones. The most annoying thing here is not that the service does not open, but that attempts to solve this on your computer often end in the loss of your account. Below is an analysis of a scheme in which your device does not bypass anything at all, and the agent works in the country where it is supposed to work.
Short answer
The agent runs on a rented server in a supported country. You connect to this server and work on it: terminal, files, launching tasks. Nothing is configured on your phone and laptop and no tunnel is raised.
The difference is fundamental. In the first case, you are trying to look like a user from another country, and the service has every right to notice this. In the second, you literally work on a machine that is parked in this country.
Why are accounts blocked?
Judging by what people describe in discussions, it is not the fact of another country that triggers, but the discrepancies. The account was registered in one place, the payment was made from another, the session was opened from a third, and an hour later again from the first. Plus well-known address ranges of popular VPN services that have been marked for a long time.
The server gives a different picture: the same address, the same machine, stable sessions without jumping between countries. This is not a guarantee, because we are not the ones who write the service rules, and you still have to read them. But this is fundamentally more honest behavior than disguise.
Separately: your account in the service remains yours. No shared keys or resold access, the limits and subscription are yours.
What you will need
Server. A regular VPS from any provider, Linux, from one gigabyte of memory. The agent is enough: it runs text and runs your commands, rather than rendering video. You choose the country.
Service account. Yours, with your subscription.
A way to reach the server. This is where the real work begins, because the SSH client on the phone is not good for this. More on this below.
Installing Claude Code on the server
If you already have a running agent on another machine, do not rewrite the commands manually. Give him access to an empty server and describe the task in words: install yourself, configure autostart, check that everything starts up after a reboot. He sees a specific system and will cope faster than you can according to someone else’s instructions.
If you install it yourself, on a fresh Ubuntu it looks like this:
apt update && apt install -y nodejs npm git
npm i -g @anthropic-ai/claude-code
claude
When you launch it for the first time, the agent will ask you to log in. Then it lives in your environment, with your keys and your repositories.
Installing Codex CLI
With Codex the scheme is the same, only the package is different:
npm i -g @openai/codex
codex
Both agents live quietly on the same machine and do not interfere with each other: they are just console programs in your environment. Many people do this in order to compare them on the same task, and at the same time have a backup option when one of the services has limits or a failure.
How to do this if you are not an administrator
A separate console, keys, setting up autorun: this is usually where people give up. In Remotai, this path is collected in one window, and it looks like this.
- We rented a server from a provider, received an address, login and password. This is the only step that is not being taken by us.
- We opened Remotai in the browser and added the server via SSH. There is no need for a separate SSH client; the server console opens right here.
- Clicked “Install Remotai”. The application will show the installation command and open the server terminal in the same window, all you have to do is insert and run. The installer will install the service, configure autostart and immediately print the connection code.
- Enter this code in “My Computers”. The server will be included in the general list next to your computers: with its own terminals, files and system, without an intermediary machine.
- Next, install an agent. Either by command in the same terminal, or simply ask the agent you already have about it.
From this point on, the server is no different from your home computer in the application. The only difference is that it does not turn off and is located in another country.
Is it possible to work without a VPN?
Yes, and this is the main advantage of the scheme. A VPN is needed when you are trying to access a service from your device. Here the server reaches out to the service, not you. Your phone connects only to your own server, and no special settings are needed for this.
A useful side effect: the laptop is no longer part of the circuit. You can close it, discharge it, or even leave it at home, and the task will continue to be performed.
How to approach an agent from your phone
An agent on the server is useless if you can't respond to it at the right time. And he constantly asks: confirm the plan, select an option, allow writing to the file.
A regular SSH client on your phone solves the problem halfway. The network breaks down and the session dies along with the process if you forgot about tmux. Esc and arrows live on a separate panel, which you access every once in a while, and the agent interfaces rest on them. Scrolling fights with the agent because it redraws the entire screen.
We made a tool for this task. A small service is installed on the server next to the agent: it itself keeps the connection out, so public IP address and port forwarding are not needed. Your phone or browser works like a remote control. The task experiences a loss of connection: the application is closed, the network is lost, the phone is dead, but the process on the server continues to work and gives up its entire screen the next time it is connected.
Install and try
Opens in the browser, no application required. The first 7 days are free and without a card, then 900 ₽ per month. Server rental is paid to its provider separately.
How it worksHow much does it cost per month
We count three expense items honestly.
Server: approximately 300 to 800 rubles per machine, which is enough for an agent. Subscription to the service itself: at the rates of its owner, you have your own. Access tool: 900 rubles per month, while local work on your computer is free forever.
The scheme is more predictable than trying to keep an agent on a laptop, which you close and take away with you.
If you don't want to bother
We set up and configure the server for a turnkey agent: we select a provider and country, install the system, deploy Claude Code or Codex, set up autostart and access from the phone, and check that everything starts up after a reboot. One-time 8,000 rubles, then you only pay for the server and subscriptions. You can write to us at Telegram.
What this circuit doesn't do
It doesn't change your Internet access and doesn't tunnel anything for you: you connect to your machine and work on it.
It does not cancel the rules of services. The account is yours, the limits are yours, the responsibility is also yours, and the terms of use are worth reading yourself.
And it's not free: the server charges money every month, even when you don't use it.
Frequently asked questions
Do I need my computer for this to work?
No. The agent and tools live on the server; you need a phone to watch and respond. You can work without a laptop at all.
Is this a VPN?
No. A VPN changes your network access, and it changes where work gets done. Your traffic remains yours, you connect to your own server.
What other agents work like this?
Any console: Claude Code, Codex CLI, Kimi, Gemini CLI, opencode. The scheme does not depend on a specific agent.
Which server to choose?
Any Linux-VPS with a gigabyte of memory or more will do. What is more important is not the power, but what country it is located in and how stable the provider is.
What happens if the server reboots?
When autostart is configured, the service starts itself and restores communication. Terminals with history are returned, unfinished tasks are visible in the list.