For Desktop's local HTTP port, set UNSLOTH_DESKTOP_PORT=9000 in its launch environment and fully restart the app. Unset or empty uses 8888. Choose 1024–65515. If the port is busy, Desktop tries the next 20. It rejects ranges with browser-restricted ports. This covers backend restarts after updates. unsloth studio -p and LAN use separate ports.
Unsloth Studio (web UI)
macOS, Linux, WSL:
curl -fsSL https://unsloth.ai/install.sh | sh
Windows:
irm https://unsloth.ai/install.ps1 | iex
Homebrew:
brew install --cask unsloth
Docker
Use our Docker imageunsloth/unsloth. On Linux and Mac, set up GPU access once with
# for a public Cloudflare HTTPS link: use -e UNSLOTH_STUDIO_SECURE=1 instead of -p 8000:8000, and -p 127.0.0.1:8888:8888 instead of -p 8888:8888
docker run -d --name unsloth --gpus all --ipc=host \
-p 8000:8000 -p 8888:8888 \
-v "$PWD":/workspace/host \
-v unsloth-workspace:/workspace \
-v "$HOME/.cache/huggingface":/workspace/.cache/huggingface \
-v unsloth-studio:/opt/unsloth-studio \
unsloth/unsloth && docker logs -f unsloth
See Docker docs for more information. For notebooks only, use the unsloth/unsloth:core tag; all tags and options are on Docker Hub. For AMD there is a separate image: unsloth/unsloth-rocm.
Launch
unsloth studio
HTTP Secure Deployment
unsloth studio --secure
Remote HTTPS & LAN Access
Server-side tools are on by default - so be careful! Keep your password safe, or use --disable-tools when exposing Unsloth.
Global HTTPS Access:
Creates a free Cloudflare link that serves Unsloth - you can access the link globally (even on your phone!)
unsloth studio --secure
-H 0.0.0.0 and different ports also work:
unsloth studio -H 0.0.0.0 -p 8888
LAN Access (home network): Settings > API keys > LAN access
For a reverse proxy or custom domain, run the proxy on the same machine as Desktop (e.g., Cloudflare Named Tunnel, nginx, or Caddy). Set a comma-separated list of allowed hostnames, then quit and reopen Desktop.
export UNSLOTH_STUDIO_PROXY_HOSTS=studio.example.com # Linux: start Unsloth Desktop from this shell
launchctl setenv UNSLOTH_STUDIO_PROXY_HOSTS studio.example.com # macOS
setx UNSLOTH_STUDIO_PROXY_HOSTS studio.example.com # Windows
Forward the allowed hostname in Host or X-Forwarded-Host. In cloudflared, leave the HTTP Host Header override unset. Sign in with the password under Settings > Remote access > Remote password.
For HTTPS with your own certificate, set both variables before unsloth studio (Docker or systemd). Either --ssl-certfile or --ssl-keyfile overrides both.
UNSLOTH_STUDIO_SSL_CERTFILE=/path/to/full-chain.pem \
UNSLOTH_STUDIO_SSL_KEYFILE=/path/to/private-key.pem \
unsloth studio
Password management & headless starts
Exposing Unsloth (--secure, --cloudflare, or a non-loopback -H) asks once at the terminal for a new admin password. Ctrl+C there aborts the launch rather than exposing the auto-generated one; set a password non-interactively instead, or use -H 127.0.0.1 to stay off the network.
Headless starts:
UNSLOTH_STUDIO_PASSWORD='your-strong-password' unsloth studio --secure # via env var
Reset your password:
unsloth studio reset-password
Developer, Nightly, Uninstall
To see developer, nightly and uninstallation etc. instructions, see advanced installation.
Install torchao first on Windows: --torch-backend looks for it only on the PyTorch index, which has no recent Windows torchao, so a one-step install silently resolves an old Unsloth.
Keep the install-time package cache under the Unsloth Studio directory instead of reusing an existing uv cache. Downloads are slower the first time, and an explicit UV_CACHE_DIR still wins over this:
curl -fsSL https://unsloth.ai/install.sh | UNSLOTH_ISOLATE_UV_CACHE=1 sh
Discard the previous environment immediately when reinstalling, instead of keeping a copy until the new one works. A reinstall normally holds both at once, so it needs room for two; this needs room for one, at the cost of not being able to undo a failed install:
curl -fsSL https://unsloth.ai/install.sh | UNSLOTH_INSTALL_NO_ROLLBACK=1 sh
Cap Unsloth's native CPU thread pools on high-core hosts: UNSLOTH_CPU_THREADS=8 unsloth studio -p 8888.
Vulkan, custom llama.cpp backends:
Choose the llama.cpp build for GGUF chat at install time. The installer chooses PyTorch separately based on your GPU.
export UNSLOTH_LLAMA_CPP_BACKEND=vulkan # or cpu, cuda, rocm, auto
curl -fsSL https://unsloth.ai/install.sh | sh
$env:UNSLOTH_LLAMA_CPP_BACKEND="vulkan" # or cpu, cuda, rocm, auto
irm https://unsloth.ai/install.ps1 | iex
Set the PyTorch index family.
curl -fsSL https://unsloth.ai/install.sh | UNSLOTH_TORCH_INDEX_FAMILY=cpu sh # or a family like rocm7.2
For chat only (GGUF models, plus MLX models on Apple Silicon), skip PyTorch.
curl -fsSL https://unsloth.ai/install.sh | UNSLOTH_NO_TORCH=1 sh
audio.cpp audio engine:
Setup also installs audio.cpp (prebuilt by unslothai/audio.cpp), which runs the audio.cpp speech, music and speech-to-text models on the Audio page, in Voice settings and behind /v1/audio/*. It is optional and never blocks setup:
UNSLOTH_SKIP_AUDIO_CPP_INSTALL=1 skips it.
UNSLOTH_AUDIO_CPP_ACCELERATOR=cpu (or cuda, vulkan, metal) picks the bundle instead of auto-detecting.
AUDIOCPP_SERVER_PATH=/path/to/audiocpp_server uses your own build.
Uninstall
MacOS, WSL, Linux:curl -fsSL https://raw.githubusercontent.com/unslothai/unsloth/main/scripts/uninstall.sh | sh
Windows (PowerShell):irm https://raw.githubusercontent.com/unslothai/unsloth/main/scripts/uninstall.ps1 | iex
You can delete old model files either from the bin icon in model search or by removing the relevant cached model folder from the default Hugging Face cache directory. By default, HF uses:
@software{unsloth,
author = {Daniel Han, Michael Han and Unsloth team},
title = {Unsloth},
url = {https://github.com/unslothai/unsloth},
year = {2023}
}
If you trained a model with 🦥Unsloth, you can use this cool sticker!
License
Unsloth uses a dual-licensing model of Apache 2.0 and AGPL-3.0. The core Unsloth package remains licensed under Apache 2.0, while certain optional components, such as the Unsloth Studio UI are licensed under the open-source license AGPL-3.0.
This structure helps support ongoing Unsloth development while keeping the project open source and enabling the broader ecosystem to continue growing.
Thank You to
The llama.cpp library that lets users run and save models with Unsloth
The Hugging Face team and their libraries: transformers and TRL
The Pytorch and Torch AO team for their contributions
Use together with unsloth: extensions, drivers, servers and companion tools.
transformersPythie’s Index: 90Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.122.3M downloads/mo