CLAUDARIS

/klaw-DAR-iss/ — a moveable docker container for Claude Code. using Arch btw.
ARCHLINUX TMUX SELF-HOSTED NO-RESTART-POLICY

Configure

Run the interactive wizard — press enter at any prompt to keep the current/default value:

./claudaris config

It writes your answers to .env (gitignored — every user keeps their own), which every other command sources. Set NAME to something unique to you (e.g. chris-claude) if more than one person is running a container from this same repo checkout. Re-run config / configure any time to update it.

variablepurposedefault
NAME Image name, container name, and hostname inside the container (shows up as root@$NAME in the prompt). claudaris
DATA_DIR Host directory for volume mount data — bashrc, aliases, Claude auth, ssh keys. /data/$NAME
WORKSPACE_DIR Host directory mounted as /projects inside the container. /home/$USER/projects

Commands

Everything runs through the single claudaris entry point.

configconfigure
Interactive wizard — writes NAME, DATA_DIR, WORKSPACE_DIR to .env.
./claudaris config
build
Builds the image (always --no-cache --pull, so it picks up the latest Claude Code release).
sudo ./claudaris build
start
Creates or restarts the container with all volumes wired up.
sudo ./claudaris start
connect
Starts the container if needed, then attaches your tmux session.
sudo ./claudaris connect
removestop · rm
Stops and removes the container so the next start recreates it fresh.
sudo ./claudaris remove

Optional: SSH access to other nodes

To let the container SSH out to other machines, create $DATA_DIR/ssh on the host and populate it with keys/config before running ./claudaris start. If present, it's bind-mounted read-only to /root/.ssh.

off by default — nothing is mounted unless the directory exists.

Internals

Persistent login. Claude Code is installed at build time under /root, so a rebuild always picks up the latest release. Two files are bind-mounted individually to survive that: ~/.claude/.credentials.json (the OAuth token) and ~/.claude.json (account/onboarding state — Claude Code checks this too, so persisting the token alone isn't enough to avoid a re-login prompt after a rebuild). ./claudaris start seeds both from empty on the host the first time it runs.

Self-stopping. The container stops itself once its tmux session ends (any shell exit — Ctrl+D, exit, crash) instead of running forever, and there's no Docker restart policy — connect and start both bring it back up automatically if you find it stopped.

Dotfiles. .bashrc and bash_aliases are both bind-mounted as single files so they can be tweaked per-host (e.g. a coworker importing their own aliases) without a rebuild. ./claudaris start seeds them from files/bashrc and files/bash_aliases the first time it runs, without overwriting later edits. Anything that needs to survive regardless (PATH, zoxide, git identity) lives in /etc/... inside the image instead of under /root.

Hostname. The container is started with --hostname "$NAME", so the prompt reads root@claudaris (or whatever you set NAME to) instead of a random container ID.

Repo layout