Cart

    Sorry, we could not find any results for your search querry.

    Getting started with Claude Code

    Claude Code is a terminal-based coding agent from Anthropic that can read files, edit code, and run commands in your working directory. Running it on a VPS gives you a persistent Linux environment for long-running coding sessions, remote repositories, and development work that continues independently from your laptop.

    In this guide, you install Claude Code on a Linux VPS and use it securely over SSH. This is a practical setup for development and automation work, because the language model itself runs through Anthropic or a configured cloud provider and not on your VPS.

    • Claude Code requires a supported Anthropic account or configured cloud-provider authentication, and at least 4 GB of RAM on an x64 or ARM64 system.
       
    • This article assumes you use a VPS. If your VPS also hosts production services, keep Claude Code away from sensitive directories and secrets.
     

     

    Why a GPU is not required

     

    For a standard Claude Code setup, your VPS does not perform model inference itself. In practice, this means a CPU-only VPS is enough as long as the server has sufficient memory, internet access, and a supported Linux distribution.

    Your VPS mainly provides the shell, filesystem access, git repository, and runtime environment in which Claude Code works. A faster CPU and more memory improve local tasks such as package installs, tests, indexing, and builds, but a GPU is not a requirement for the Claude Code client itself.


     

    Installing Claude Code manually

     

    • Skip this chapter if you ordered a Claude VPS with Claude preinstalled.
       
    • The steps below assume you're using Ubuntu or Debian.
     

     

    Step 1

    Connect to your VPS via SSH or the VPS console.


     

    Step 2

    Update your server and install the tools used in this guide:

    sudo apt -y update && sudo apt -y upgrade && sudo apt -y install curl git build-essential tmux

    In this command, curl downloads the installer, git is used for repositories, build-essential provides common build tools for local dependencies, and tmux keeps your shell session running after you disconnect from SSH. With most installations, these packages will come preinstalled.


     

    Step 3

    Install Claude Code with Anthropic's recommended Linux installer:

    curl -fsSL https://claude.ai/install.sh | bash

    Want a slightly more conservative release track? Install the stable channel instead:

    curl -fsSL https://claude.ai/install.sh | bash -s stable

    In the second command, stable selects Anthropic's delayed stable release channel instead of the default latest channel.


     

    Step 4

    Reload your shell and verify that Claude Code is available:

    source ~/.bashrc
    claude --version

    If the version number is shown, Claude Code is installed correctly. Please note: The installer may not add ~/.local/bin to PATH in shell config, if you experience an error at this stage, try exporting it explicitly for this session.

    export PATH="$HOME/.local/bin:$PATH"

     

    Step 5

    Finally, start Claude Code:

    claude

    On first launch, Claude Code takes you through an onboarding process, see the next chapter for the steps involved. 

    Do you want to use Ollama? Simply hit ctrl + c to cancel the onboarding, head on to the chapter about using Ollama with Claude Code and head back to the Claude Code onboarding chapter afterwards.


     

    Claude Code onboarding

     

    Step 1

    When you first run Claude Code (using the command claude), or log in to a VPS with Claude Code preinstalled, you will be greeted by the following screen (with some different colors):

    Welcome to Claude Code v2.1.132
    …………………………………………………………………………………………………………………………………………………………
    
         *                                       █████▓▓░
                                     *         ███▓░     ░░
                ░░░░░░                        ███▓░
        ░░░   ░░░░░░░░░░                      ███▓░
       ░░░░░░░░░░░░░░░░░░░    *                ██▓░░      ▓
                                                 ░▓▓███▓▓░
     *                                 ░░░░
                                     ░░░░░░░░
                                   ░░░░░░░░░░░░░░░░
           █████████                                        *
          ██▄█████▄██                        *
           █████████      *
    …………………█ █   █ █………………………………………………………………………………………………………………
    
     Let's get started.
    
     Choose the text style that looks best with your terminal
     To change this later, run /theme
    
       1. Auto (match terminal)
     ❯ 2. Dark mode ✔
       3. Light mode
       4. Dark mode (colorblind-friendly)
       5. Light mode (colorblind-friendly)
       6. Dark mode (ANSI colors only)
       7. Light mode (ANSI colors only)
    
     ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
      1  function greet() {
      2 -  console.log("Hello, World!");
      2 +  console.log("Hello, Claude!");
      3  }
     ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
      Syntax theme: Monokai Extended (ctrl+t to disable)

    Use the arrow keys to switch to your desired theme and hit enter to continue.


     

    Step 2

    Next, choose your LLM provider. Have you opted for Ollama, see the next chapter? Then this step will be skipped. 

    Claude Code can be used with your Claude subscription or billed based on API usage through your Console account.
    
     Select login method:
    
     ❯ 1. Claude account with subscription · Pro, Max, Team, or Enterprise
    
       2. Anthropic Console account · API usage billing
    
       3. 3rd-party platform · Amazon Bedrock, Microsoft Foundry, or Vertex AI

    Depending on your choice you'll either be presented with an option to:

    1. Paste a URL to log in (Claude Code with subscription on VPS), for example:
      Browser didn't open? Use the url below to sign in (c to copy) 

      https://claude.com/cai/oauth/authorize?code=true&client_id=9d1c250a-e61b-44d9-88ed-5944d1962f5e&response_type=code&redirect_ uri=https%3A%2F%2Fplatform.claude.com%2Foauth%2Fcode%2Fcallback&scope=org%3Acreate_api_key+user%3Aprofile+user%3Ainference+u ser%3Asessions%3Aclaude_code+user%3Amcp_servers+user%3Afile_upload&code_challenge=EmFjVdDZa_t9LTV5k9aRG0mYI2WuyYuMoUcQJWJ1fD E&code_challenge_method=S256&state=5K1j3i21eZ0se8vu6qAQg4HosOqkTzo0Kn9fOOFxbp0
       
    2. Log into your Anthropic account in your browser (running Claude Code locally with an Anthropic subscription).
       
    3. Provide API credentials (Anthropic Console Account).
       
    4. Provide credentials for the third party platform.

     

    Step 3

    You're now presented with a security warning. Simply press ‘Enter’ to continue to the next warning. 

     Security notes:
    
     1. Claude can make mistakes
        You should always review Claude's responses, especially when
        running code.
    
     2. Due to prompt injection risks, only use it with code you trust
        Learn more: https://code.claude.com/docs/en/security
     
     Press Enter to continue…

    And next you'll get a final warning (press ‘Enter’ again):

    ───────────────────────────────────────────────────────────────────────────
     Accessing workspace:
    
     /home/username
    
     Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source project,
      or work from your team). If not, take a moment to review what's in this folder first.
    
     Claude Code'll be able to read, edit, and execute files here.
    
     Security guide
    
     ❯ 1. Yes, I trust this folder
       2. No, exit

    And finally, you'll be reminded of the option to work with teams:

     On a team?
    
     Ask a teammate to run /team-onboarding and share the guide.
     Paste it as your first message and I'll get you set up.
    
     Press Enter to continue…

    Press ‘Enter’ one final time to finalize the onboarding process.

    From this point on, simply chat with Claude Code to use it. For example, close Claude Code for now, git clone a Git repository to your VPS, navigate to the directory, launch Claude Code and tell it something like “I'm working in this git repo for <description of project> and I'm looking to fix a bug in file <filename>. Please help me fix it.”. 


     

    Using Ollama with Claude Code

     

    As an alternative to a paid Anthropic account, you can also use an LLM hosted on your own Ollama installation on the same server, or a remote server. To do this, simply set environment variables as follows:

    export ANTHROPIC_AUTH_TOKEN=ollama
    export ANTHROPIC_BASE_URL=http://localhost:11434

    From this point on, launch Claude by specifying the Ollama hosted model (the model must be present and available on your Ollama server):

    claude --model ollama/qwen2.5-coder:14b
    • In this guide we cover the installation of Ollama.
       
    • The most secure options of handling environment variables are explained in this article.
       
    • Tip: if you're running Ollama on a remote server, limit its IP access by creating firewall rules restricting access to the Ollama server to specific IPs, such as your server which is running Claude Code.
     

     

    Tips for using Claude Code safely on a VPS

     

    Claude Code can read files, modify code, and run shell commands. For that reason, it is worth taking a few minutes to separate your working environment from the rest of the server.


     

    Step 1

    Start a persistent terminal session before opening Claude Code:

    tmux new -s claude

    If your SSH connection drops, tmux keeps the session alive. Reconnect later with:

    tmux attach -t claude

     

    Step 2

    Work inside a dedicated project directory instead of your full home directory or system paths:

    mkdir -p ~/projects/example-project
    cd ~/projects/example-project
    claude

    This keeps the scope of file access predictable and makes it easier to review what Claude Code can reach.


     

    Step 3

    Open the Claude Code permissions overview from inside Claude Code with:

    /permissions

    Claude Code distinguishes between read access, shell commands, and file edits. Review those permissions before you let it work in an important repository, and keep the default approval flow unless you are operating in a deliberately isolated development environment.


     

    Step 4

    Avoid running Claude Code as root unless you truly need system-wide changes. If you normally log in as root, create a separate user first:

    adduser claude
    usermod -aG sudo claude
    su - claude

    A separate user reduces the risk of accidental changes to system files. Use sudo only for the commands that actually need elevated privileges.


     

    Step 5

    Do not use bypassPermissions on a VPS that also contains production data, deployment keys, or customer information. Anthropic explicitly recommends using that mode only in isolated environments. On a normal development VPS, the default permission mode is the safer choice.


     

    Frequently asked questions

     

    How can I change my Claude Code theme?

    Use the command:

    /theme
     
     

    How do I stop getting permission prompts?

    While this is considered insecure, you can prevent Claude Code from asking you for permission to make changes. Simply add the argument --dangerously-skip-permissions when launching Claude Code, for example:

    claude --model ollama/qwen2.5-coder:14b --dangerously-skip-permissions
     
     

    How can I update Claude Code?

    If you installed Claude Code with the native installer, it updates automatically in the background and applies the new version the next time you start it. To force an update immediately, run:

    claude update

    If you installed the stable channel, Claude Code stays on that release track until you change it.

     
     

     


     

    Claude Code works well on a VPS without a GPU because the VPS provides the development environment while the model runs remotely through Anthropic or a supported cloud provider. With a small amount of preparation, especially a dedicated user, a dedicated project directory, and a tmux session, you get a practical and controlled remote coding setup.

    Need help?

    Receive personal support from our supporters

    Contact us