Don't use Claude Code on your computer

Because it's even better to use it on a different computer.

Ha! My first clickbait headline. Now that you're here...

Ever start working on a feature or project with Claude Code (or Codex or OpenCode or whatever you use), only to have it take longer than you expect and then you have to run to a meeting but you really want the feature to finish but the Wifi disconnects or you close your laptop or you have to drive home and now the feature is half done and you have to come back and figure out what happened and get it to start up again?

Never again!

With any old computer, a mini PC, or a Raspberry Pi, you can easily have a dedicated Claude Code machine that never shuts off.

Step 1: Get the computer

Like I said, any old computer will do. I would recommend using Linux (or Pi OS if it's a Raspberry Pi), but macOS will do. Windows... you can do it but you're on your own.

Step 2: Set up remote access

The easiest way to remotely access your machine is with Tailscale (which is awesome, btw). Set up Tailscale on your laptop, desktop, and/or phone, then install it on the computer. Once you're connected to the tailnet, you can SSH into the server using either its hostname or Tailscale IP. From my laptop's terminal, I can type:

ssh ryan@claudebox

and I'm in. Connected, logged in, and ready to roll

Step 3: Keep that session going even after you disconnect

By default, things you start up in your SSH session are going to quit when SSH disconnects, which defeats the purpose of this whole endeavor. Thankfully, there's tools for that. I like Zellij, so that's what I'll recommend, but you can also use screen or tmux to do the same thing.

Zellij allows you to create a persistent terminal session (or multiple sessions) that you can connect and reconnect, keeping your Claude Code session running even when SSH disconnects.

Once you've installed Zellij (on the Raspberry pi or whatever), there's two options for how to use it on your machine - automatically, or manually. I'll describe both options below.

Option A: Auto-connect Zellij

To connect to Zellij automatically when you connect via SSH, put the following into your shell config on the remote machine (pick the right one for either bash, zsh, or fish):

Bash (~/.bash_profile):

if [[ -n "$SSH_TTY" ]] && [[ -z "$ZELLIJ" ]] && [[ -z "$ZELLIJ_SKIP" ]]; then
    exec zellij attach --create main
fi

Zsh (~/.zshrc):

if [[ -n "$SSH_TTY" ]] && [[ -z "$ZELLIJ" ]] && [[ -z "$ZELLIJ_SKIP" ]]; then
    exec zellij attach --create main
fi

Fish (~/.config/fish/config.fish):

if status is-interactive
    and set -q SSH_TTY
    and not set -q ZELLIJ
    and not set -q ZELLIJ_SKIP
    exec zellij attach --create main
end

Option B: An alias

Obviously, you could also just type the command every time, but aliases make it so much easier. And by using a named session (I used the name main, but you can call it whatever you want), you can easily reconnect to the same session every time.

Bash (/.bash_profile) or Zsh (~/.zshrc):

alias z='exec zellij attach --create main'

Fish (~/.config/fish/fish.config):

alias --save z 'exec zellij attach --create main'

Step 4: Connect

Log into the remote computer and start your Zellij session (either automatically or with the z alias. Once you're connected, you can disconnect from the session at any time with CTRL+o + d. Next time you log in, you can start up the session again. Typing CTRL+d or exit will end your session, and you'll start a new one the next time you connect.

Step 5: Install and Configure Claude Code

(or Codex or whatever)

Once you're connected, you can install and authenticate with Claude Code or Codex or whatever terminal coding agent you want.

With Claude Code, there's a couple settings you can put in ~/.claude/settings.json to make things easier). Explanations are below to help you figure out what you want (or don't want):

{
  "permissions": {
    "defaultMode": "auto"
  },
  "skipDangerousModePermissionPrompt": true,
  "remoteControlAtStartup": true,
  "agentPushNotifEnabled": true

}

Default permissions

It's a pain to deal with Claude's constant requests for permissions to run commands or edit things. Since you're editing on a separate machine that doesn't have all your normal files, you can (fairly) safely give Claude permission to just do what it wants. If you're really bold, you can set the default to bypassPermissions to give Claude all power, but Anthropic recently released auto mode, which lets it do most things without asking, but with a safety harness for risky operations. In ~/.claude/settings.json, put:

{
  "permissions": {
    "defaultMode": "auto"
  }
}

(or bypassPermissions for the dangerous option)

If you do bypassPermissions, you may want to add the following option so Claude will stop asking you if you trust it:

{
  "permissions": {
    "defaultMode": "bypassPermissions"
  },
  "skipDangerousModePermissionPrompt": true
}

Turn on Remote control

Claude Remote Control allows you to tap into a Claude Code session from the app on your phone or laptop. It's an easy way to send instructions or get notifications when you're not easily able to connect via SSH.

With these config options in ~/.claude/settings.json, Claude Remote Control will be started automatically for each Claude code session, and it will be able to send you push notifications when it needs your input.

{
  "remoteControlAtStartup": true,
  "agentPushNotifEnabled": true
}

Step 6: Profit‽‽

Now you're basically ready to rock. You can have Claude start a project, or clone a project and start adding features. I've got a couple other little tips below, but you've got the basics already.

Github

Create an SSH key with ssh-keygen, then you can either add the public key to your own account (kinda risky), or you can play it a little safer and create a new Github account just for your computer. Then you can add that account as a collaborator on whatever projects you want it to be able to work on.

Running dev servers

Running dev servers is easy as pi. You can either have Claude run them for you by asking it real nice, or just open a separate Zellij tab (CTRL+t + n) and run the server there. Then you can just connect to it from your laptop's browser at hostname:port (I use http://claudebox:4000, for example).

Zellij is cool

There's more cool things you can do with Zellij, like opening multiple panes (like separate windows) and tabs, floating panes, multiple sessions, and even a file browser. Check out their screencasts to learn more and get awesome.

Good luck!