Since you can't set system-wide environment variables without admin rights, you'll use a launch script. Create a file LaunchUnityHub.bat at the root of your portable drive:
@echo off set UNITY_CACHE_DIR=D:\PortableUnity\Cache set UNITY_TEMP_DIR=D:\PortableUnity\Temp set UNITY_EDITOR_LOG_DIR=D:\PortableUnity\Logs set LOCALAPPDATA=D:\PortableUnity\LocalAppData
start "" "D:\PortableUnity\Hub\Unity Hub.exe"
Double-click this batch file every time you want to run Unity. It redirects all Unity temp and cache files to your portable drive.
scoop bucket add versions
There are two primary methods to achieve this. The first is the manual way (best for power users), and the second is the "Unity Hub" way (easiest but slightly less portable).
The biggest hurdle is adding build targets (Android SDK, NDK, JDK). Since you're on a portable drive, you must also portablize the Android SDK. unity portable install
Workaround: Use Unity Personal and carry your Unity ID credentials. You'll have to re-authenticate every time you switch computers (requires internet).