Skip to content

LM Studio: developing a portable version of the application that can be installed and run directly from a USB stick. #327

@EduardTechRo

Description

@EduardTechRo

Hello,

I would like to propose an innovative feature for LM Studio: developing a portable version of the application that can be installed and run directly from a USB stick.

This functionality would set LM Studio apart from other local AI tools, as no similar application currently offers a truly portable solution. Here are some compelling reasons why this feature would be a valuable addition:

Advantages of a Portable LM Studio
Flexibility Across Systems:
A portable version would allow users to carry their LM Studio setup, including configurations and models, across multiple devices without needing to install or configure the software repeatedly.

Accessibility for Non-Technical Users:
By eliminating the need for installation and complex setup processes, LM Studio could become more accessible to a broader audience, including non-technical users who may otherwise hesitate to adopt local AI tools.

Enhanced Privacy and Security:
A portable version ensures that no data or application traces are left on the host system, which is ideal for professionals or researchers working in shared or restricted environments.

Innovation and Differentiation:
Introducing a portable LM Studio would position the application as a pioneer in the AI tool market. This unique capability would likely attract more users and set LM Studio apart from competing solutions.

Offline Capabilities:
A portable setup would allow users to store models and resources on the USB stick, enabling full offline functionality. This is especially valuable in environments with limited or no internet access.

Implementation Considerations
The portable version should bundle all necessary dependencies and configurations for a plug-and-play experience.
Users should have the option to select which models or data to include, optimizing space on the USB device.
Lightweight options could be explored to ensure compatibility with older or less powerful systems.
Potential Use Cases
Researchers: Easily switch between lab and personal systems while maintaining the same AI environment.
Students: Use LM Studio on shared or library computers without needing installation permissions.
Field Professionals: Carry pre-trained models for offline analysis and decision-making in remote areas.
This feature would make LM Studio a standout tool in the ecosystem of local AI solutions, fostering greater adoption and satisfaction among its user base.

Thank you for considering this suggestion. If more details or discussions are needed, I would be happy to contribute additional ideas or use cases to support the implementation of this feature.

Best regards, Edd

Activity

odrobnik

odrobnik commented on Jan 25, 2025

@odrobnik

I have my models on an external SSD which I have connected to my Mac Studio via Thunderbolt. So that's already possible to have your models on a portable external drive.

semmyk-research

semmyk-research commented on Jan 25, 2025

@semmyk-research

I support @EduardTechRo request. Explicitly articulated by Edd. A true privacy-aware portable app: installation, settings (.lmstudio), working folder (Data: --user-data-dir=./Data...) and models.
As @odrobnik pointed out, one can have their models at a central location (like an ext SSD) and load their downloaded models. Indeed, I can, currently, share my models between LM Studio on Windows (extracted to folder of my choice) and on WSL.

[settings]
WSL/Linux: /home/$user/.cache/lm-studio
Windows: users$user.lmstudio

[Data]
set with --user-data-dir=./Data...

EduardTechRo

EduardTechRo commented on Jan 25, 2025

@EduardTechRo
Author

Thank you for your responses! I appreciate the input and insights from both @odrobnik and @semmyk-research

To clarify, my request is indeed about a fully self-contained software solution that can run entirely off a USB stick. While I understand that models can currently be stored and loaded from an external SSD or other portable drives, the goal here is to have everything—installation, settings, user data, working folders, and models—consolidated into a single portable setup.

This approach would allow users to simply plug in their USB stick, open LM Studio without any additional setup, and have it work seamlessly on any compatible system. Such a solution would:

Streamline Portability: Users wouldn’t need to rely on installing or configuring software on multiple systems or managing separate settings. Everything lives on the USB stick, ready to use.

Enhance Privacy: By keeping all settings, data, and history contained on the USB, no traces are left on the host computer—perfect for privacy-conscious users.

Ease Workflow: Whether switching between devices or operating in environments where installation is not feasible, this setup would simplify usage immensely.

While it’s true that current workarounds, like external drives for models, are effective, an officially supported portable solution would elevate LM Studio as a standout tool in this space. It would offer an unparalleled combination of flexibility, usability, and privacy.

Thank you again for considering this idea, and I hope it sparks further discussion about the potential of a fully portable LM Studio experience! Alternatively, any other solution addressing this need would be equally appreciated.

odrobnik

odrobnik commented on Jan 25, 2025

@odrobnik

@EduardTechRo The problem though is that the inferencing power necessary is tied to hardware (in particular a powerful GPU with enough RAM), so you couldn't really carry this around with you.

So your premise is flawed, you said you wanted to "run entirely off a USB stick": while you might be able to get a large enough stick for some models, there are no sticks with built in inferencing.

Which is why the only truly portable solution is to have inferencing happen in the cloud, via some sort of private cloud system (like Apple is building, and Microsoft has for their corporate clients in Azure). In that case you have no need for LM Studio.


Having said that, maybe there would be some sort of use case for LM Studio to allow for distributed inferencing in one or more multiple private clouds. Like if I could have LM Studio running on a couple of my Macs and they would expose the models they serve via one VPN-tunnelled API, that would be something. Then I wouldn't even have to have a USB stick.

I would just go to a website that keeps this tunnel open for me. And then I use something like OpenWebUI to access an OpenAI-style API that is tunneled to my LM Studios running in my Home/Office.

In a way I could do this already myself, I would just have to open the port on my router and forward it to my main Mac Studio. Then with dyndns I would have the address available. But it would be more awesome if LM Studio could keep the connection alive to a server in the cloud, say https://privatecloud.lmstudio.ai/[USERNAME]/".

So technically, when I start LM Studio, I would have an option: Publish to Cloud. This would make a connection to lmstudio.ai and keep it alive. Then when I connect to the publish private cloud address then the server would forward my requests down to the LM Studio running in my home and stream back the results.

EduardTechRo

EduardTechRo commented on Jan 25, 2025

@EduardTechRo
Author

@odrobnik ! I appreciate your technical insights and the additional perspective on cloud-based solutions and distributed inferencing.

However, I’d like to clarify my initial request with a bit more context (and perhaps a touch of humor). Imagine something along the lines of Blade Runner 2049’s holographic girlfriend—a scenario where you plug a device into any compatible system, and it just works, seamlessly running the models stored on it.

For the sake of argument, let’s assume that any device where you plug in the USB stick already has the necessary hardware power to run the models—be it a high-end laptop, desktop, or even a specialized system. If it doesn’t meet the requirements, a simple incompatibility message would suffice ("This system does not support the required inferencing power").

The core idea is not to enable inferencing on the stick itself but rather to provide a self-contained software solution that includes the models, configurations, and application, allowing users to transport their environment and have everything ready to go on a supported system.

I completely understand the appeal and practicality of cloud-based solutions, especially for distributed inferencing, and I agree that such functionality (like a "Publish to Cloud" feature) would be amazing for LM Studio. However, my use case is more about offline portability and accessibility for those who either cannot or prefer not to rely on cloud solutions.

The beauty of this approach lies in the simplicity:
Plug in the stick.
Run the application.
If the system supports the necessary hardware, the experience works seamlessly.
It’s not intended as a universal solution but rather as a niche feature for privacy-conscious or offline users who already have access to compatible systems.

I hope this clarifies the intent behind my request and sparks further discussion about the possibilities of enhancing LM Studio’s portability.

semmyk-research

semmyk-research commented on Jan 25, 2025

@semmyk-research

Firstly, the concept of USB stick in year 2025 extends way beyond USB flashdrive or stick. It encompasses all that is

  • flashdrive, sticks; your 4Gb, 8Gb, 16Gb, 32Gb, 64Gb
  • external storage: portable SSD including portable NVMe that easily extends to 1Tb, 2Tb, 4Tb

Regarding inference, that's is a separate engagement in the context of portable app. Though valid.
Ditto, Cloud-based

Portable LMStudio
Different approaches possible.

  • downloadable zip file
  • PortableApp
  • PortApp

Essential for Portable LMStudio:

  • enable --user-data-dir=./Data... to make LMStudio stores it working data, setting, state
  • move or integrate .lmstudio to within the Data folder

I've testrun

  • extract LMStudio files from the installation exe
  • run from extracted folder
  • load my existing models in my central repository (a proxy of sort for models loaded from 'portable' storage)
  • -- My Models Directory points to location of my existing models rather than the default.
  • For LMStudio 0.3.6, response is currently gibberish for Qwen 2.5 Coder 14B Instruct
  • I'll update to LMStudio 0.3.8 an dtest again.
    NB: LMStudio 3.6 running in WSL (within Win 11) has a good response, albeit 'excruciately' slow.

So, it's possible in principle. It is possible to achieve the requested portability.

Streamline Portability: Users wouldn’t need to rely on installing or configuring software on multiple systems or managing separate settings. Everything lives on the USB stick, ready to use.
Enhance Privacy: By keeping all settings, data, and history contained on the USB, no traces are left on the host computer—perfect for privacy-conscious users.

With Jan.ai, I am able to run in 'portable mode' using the same approach for LMStudio. Extract from the exe, run from extracted folder, 'import' model.
PS: Jan.ai allows for easy import of models from existing files and folders without moving the models from their current location. From what I see, Jan.ai simply uses symlink (junction).

jokedul

jokedul commented on Jan 25, 2025

@jokedul

Wow, @semmyk-research , you are truly the MVP here! I genuinely appreciate the effort and detail you’ve put into testing and exploring solutions for this.

Honestly, whether it’s LM Studio, Jan.ai, GPT4All, or any other tool that manages to deliver a portable version, it would be a massive win for everyone in the community. The flexibility, privacy, and convenience that come with a fully portable solution are invaluable, and your insights show just how feasible this could be with the right approach.

If you manage to make significant progress with this—or even better, achieve full portability—you’d absolutely be a hero! A detailed guide or a video tutorial on YouTube showcasing how to set it up would be an incredible resource for all of us. I’m sure many in the community would benefit from and appreciate it.

Ps
(It should be noted that Ive tried with PortableApps.com
but without success.)

EduardTechRo

EduardTechRo commented on Jan 25, 2025

@EduardTechRo
Author

That sounds fantastic, @semmyk-research! Honestly, I’m surprised more people aren’t trying to tackle this. The potential benefits of a truly portable solution like this are immense—whether it’s for privacy, flexibility, or just pure convenience.

A portable setup would make so much sense for a variety of use cases, from researchers working across multiple systems to hobbyists and privacy-conscious users who want to keep everything self-contained. It’s a solution that seems to align perfectly with the growing need for user autonomy and accessibility in AI tools. Also For less tech-savvy users, a portable solution would eliminate the complexity of installations and configurations, offering a simple plug-and-play experience.

Your approach and testing really shine a light on how achievable this could be with the right effort. It makes me wonder why it’s not a more widespread priority!

semmyk-research

semmyk-research commented on Jan 25, 2025

@semmyk-research

Did a quick search now. Interestingly, someone is interested and working on this: LM Studio Portable Launch Script (LMS PLS) by @v1ckxy An interesting approach. IT doesn't address privacy and novice.

Once, I am opportune, I will

  1. document my current approach
  2. do a YouTube video explanation
  3. Work on a portable.zip and/or a PortableApp/PortApp solution
    However, I can't promise when.
EduardTechRo

EduardTechRo commented on Jan 25, 2025

@EduardTechRo
Author

That’s amazing, @semmyk-research! I really appreciate you taking the time to explore this and even considering documenting your approach and creating a YouTube tutorial. Please do let me know when you manage to put together a video or a guide—I’d love to check it out and share it with others who might benefit from it.

I also hope this discussion inspires others in the community to contribute to finding a solution for this need. There’s so much potential here, and seeing more people work on it could bring this idea to life even faster. Thanks again 🤜🏼🤛🏼

v1ckxy

v1ckxy commented on Feb 6, 2025

@v1ckxy

Hi, good morning.
Just saw the mention here so as Jack the Ripper would say, let's go part by part.

@semmyk-research about your comment:

IT doesn't address privacy and novice.

I don't fully understand if this is sarcasm or not 🤔; I thought the instructions were easy to follow and the code simple to read .

@EduardTechRo
Personally, I don't find a good idea to use "exes" for portables 😣
As you end up with a compiled binary for which you don't have the source, you don't know what it really does (ehem, malware)

In a idyllic world, any dev will add a portable mode to any app (and will try to keep all the files next to the app), such as Visual Studio Code did ( https://code.visualstudio.com/docs/editor/portable )

Portable mode in vscode couldn't be easier:

  • Create "data" dir in the same path as the vscode.exe
    • During launch will see it and will stop throwing data across %APPDATA% and %USERPROFILE% ( or $HOME )

Before that, vscode required a launcher or tinkering with command line options.

So...

Going back to the main topic

As I had a few problems with the current implementation of the app:

  • I couldn't easily select the GPU I wanted to perform inference on 🤨

    • Typically, you want to do inference on a given GPU, not all of them
    • Plus it doesn't make sense to automagically split a model when it properly fits on one.
  • App throws a lot of files in a lot of places (and I'm quite picky about this nowadays behavior)

    • %USERPROFILE%\.cache\lm-studio

      • was changed in ¿0.3.8 build 4? to %USERPROFILE%\.lmstudio
    • %APPDATA%\LM Studio

    • %LOCALAPPDATA%\lm-studio-updater

  • I wanted to easily sync app files between computers.

    • Nothing's easier than having all the files in one place 😎.

... I end up doing things my way 🤣.

// And btw... As I realized that the installer uses NSIS, I had updated the launch script to auto-install it accordingly (plus I made some fixes to the script)

I'll upload an updated script between today or tomorrow, I want to check a few things with the latest version (0.3.9b6) beforehand. Done.

v1ckxy

v1ckxy commented on Feb 10, 2025

@v1ckxy

I've been busier than I thought these days so I haven't been able to update this before.

Let's see...

  • I've almost completely reworked my script:

    • Now auto-installs then runs LM Studio in one shot.
    • Handles HKCU NSIS reg keys (given that installer was directly deleting previous version, those need to be deleted)
    • Ligthweight and with less spam
      • However I added some debug scripts full of console clutter
  • It looks like that starting from version 0.3.8b4 onwards, there were some changes:

    • A new file was created inside %UserProfile%, called .lmstudio-home-pointer
      • Should contain fully expanded %UserProfile% path pointing to \.lmstudio dir.
      • .lmstudio is not inside .cache anymore
    • NSIS installer creates some reg keys pointing to current installed version.
      • That point fixed, at least for current version and "current user" installations.
        • If you had previously installed LM Studio, those need to be deleted or your currently installed app will be nuked, so...
  • And what about updates?

    • Simply rename "App" directory, add the new installer under "\Installer" path and launch the script again.
      • Technically, will be installed again under the same path.

      I miss a "disable update check" option
      (or at least, I don't know how to disable it)

If anyone wants to have a look at it, it can be found here.

mikaddoCLT

mikaddoCLT commented on Jun 16, 2025

@mikaddoCLT
Void2258

Void2258 commented on Nov 16, 2025

@Void2258

As a practical matter, I need one folder installation. This is a requirement for my use of this software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @odrobnik@Void2258@v1ckxy@jokedul@mikaddoCLT

        Issue actions