{"slug":"chat","name":"A private ChatGPT","kind":"recipe","what":"A ChatGPT-style chat app that runs fully on your computer, even offline.","page":"https://insidethemachine.ai/do/chat","status":"ran","status_label":"Checked: the commands were run end to end by us","status_note":"Run end to end by hand on an Apple M4 Mac with 16 GB on 2026-10-15.","wrapper":"The wrapper scripts are generated from the site data. Every .sh passed bash -n and shellcheck and ran in plan mode on Linux (Debian 13). Every .ps1 passed the PowerShell parser and chat.ps1 ran in plan, verify and rollback mode under PowerShell 7 on Linux with Windows calls mocked. Not run on macOS or real Windows.","wrapper_tested":"2026-10-16, Debian 13 box: step 1 (Ollama install) and the auto-start of `ollama serve` worked. The model download could not be tested: the box's network blocks Ollama's download host. Open WebUI step not reached (it needs python3.11, which Debian 13 lacks).","sh":"https://insidethemachine.ai/install/chat.sh","ps1":"https://insidethemachine.ai/install/chat.ps1","md":"https://insidethemachine.ai/install/chat.md","json":"https://insidethemachine.ai/install/chat.json","one_liner":"curl -fsSL https://insidethemachine.ai/install/chat.sh | bash","one_liner_windows":"irm https://insidethemachine.ai/install/chat.ps1 | iex","actions":{"install":"curl -fsSL https://insidethemachine.ai/install/chat.sh | bash","plan":"curl -fsSL https://insidethemachine.ai/install/chat.sh | bash -s -- plan","verify":"curl -fsSL https://insidethemachine.ai/install/chat.sh | bash -s -- verify","rollback":"curl -fsSL https://insidethemachine.ai/install/chat.sh | bash -s -- rollback --yes"},"env":{"ITM_RAM":"memory in GB instead of detecting it","ITM_MODEL":"ollama tag to use instead of the pick"},"model_by_memory_gb":{"8":"qwen3.5:4b","16":"gemma4:12b","24":"gemma4:12b","32":"qwen3.8:27b","48":"qwen3.8:27b","64":"qwen3.8:27b","96":"qwen3.8:27b","128":"qwen3.8:27b","192":"qwen3.8-flash-next:125b-a6b","256":"qwen3.8-flash-next:125b-a6b","512":"qwen3.8-flash-next:125b-a6b"},"low_memory":null,"platforms":{"macos":{"install":[{"title":"Install Ollama","lines":[{"k":"run","c":"curl -fsSL https://ollama.com/install.sh | sh"}]},{"title":"Download your model","lines":[{"k":"ollama","c":"ollama pull $MODEL"}]},{"title":"Say hi","lines":[{"k":"you","c":"ollama run $MODEL","why":"interactive; run it yourself"}]},{"title":"Add a ChatGPT-style window","lines":[{"k":"mac","c":"brew install python@3.11"},{"k":"run","c":"python3.11 -m venv ~/.venvs/openwebui && source ~/.venvs/openwebui/bin/activate"},{"k":"run","c":"pip install open-webui"},{"k":"you","c":"open-webui serve","why":"starts a server that keeps running; run it in its own window"}]}],"verify":[{"run":"ollama --version","expect":"a version number"},{"run":"ollama list | grep -F \"${MODEL%%:*}\"","expect":"your model is in the list"},{"run":"ollama list | grep -qF \"${MODEL%%:*}\" && ollama run \"$MODEL\" \"Say hi in five words.\"","expect":"a short answer, made on this computer"},{"run":"test -x ~/.venvs/openwebui/bin/open-webui","expect":"Open WebUI is installed"}],"rollback":[{"k":"ollama","c":"ollama rm $MODEL"},{"k":"run","c":"rm -rf ~/.venvs/openwebui"},{"k":"run","c":"rm -rf ~/Library/Caches/pip"}]},"linux":{"install":[{"title":"Install Ollama","lines":[{"k":"run","c":"curl -fsSL https://ollama.com/install.sh | sh"}]},{"title":"Download your model","lines":[{"k":"ollama","c":"ollama pull $MODEL"}]},{"title":"Say hi","lines":[{"k":"you","c":"ollama run $MODEL","why":"interactive; run it yourself"}]},{"title":"Add a ChatGPT-style window","lines":[{"k":"mac","c":"brew install python@3.11"},{"k":"run","c":"python3.11 -m venv ~/.venvs/openwebui && source ~/.venvs/openwebui/bin/activate"},{"k":"run","c":"pip install open-webui"},{"k":"you","c":"open-webui serve","why":"starts a server that keeps running; run it in its own window"}]}],"verify":[{"run":"ollama --version","expect":"a version number"},{"run":"ollama list | grep -F \"${MODEL%%:*}\"","expect":"your model is in the list"},{"run":"ollama list | grep -qF \"${MODEL%%:*}\" && ollama run \"$MODEL\" \"Say hi in five words.\"","expect":"a short answer, made on this computer"},{"run":"test -x ~/.venvs/openwebui/bin/open-webui","expect":"Open WebUI is installed"}],"rollback":[{"k":"ollama","c":"ollama rm $MODEL"},{"k":"run","c":"rm -rf ~/.venvs/openwebui"},{"k":"run","c":"rm -rf ~/Library/Caches/pip"}]},"windows":{"install":[{"title":"Install Ollama","lines":[{"k":"run","c":"irm https://ollama.com/install.ps1 | iex"}]},{"title":"Download your model","lines":[{"k":"ollama","c":"ollama pull $MODEL"}]},{"title":"The rest of the recipe","lines":[{"k":"note","c":"Install Ollama with this PowerShell command, or the installer from ollama.com/download. On Linux, the install command above works as it is. After that, every ollama command on this page is the same. For the chat window on Windows, LM Studio (lmstudio.ai) is the easiest. Open WebUI also runs on Windows; see its page. Steps: https://insidethemachine.ai/do/chat"}]}],"verify":[{"run":"ollama --version","expect":"a version number"},{"run":"ollama list","expect":"your model is in the list"}],"rollback":[{"k":"ollama","c":"ollama rm $MODEL"}]}}}