[GH-ISSUE #10568] how to run ollama in google colab #32716

Closed
opened 2026-04-22 14:31:46 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @mayunqing1230 on GitHub (May 5, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10568

Due to the limitations of Google Colab, it seems that I cannot install and run Ollama directly in Colab. I need to run Ollama in Colab and use ngrok or other software to connect anythinglllm on my computer to Ollama on Colab. How can I do this?

Originally created by @mayunqing1230 on GitHub (May 5, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10568 Due to the limitations of Google Colab, it seems that I cannot install and run Ollama directly in Colab. I need to run Ollama in Colab and use ngrok or other software to connect anythinglllm on my computer to Ollama on Colab. How can I do this?
GiteaMirror added the question label 2026-04-22 14:31:46 -05:00
Author
Owner

@JasonHonKL commented on GitHub (May 5, 2025):

Umm if you are a Pro member of colab you can do it but totally not recommend.

  1. In terminal install go with
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go
  1. Run the following command
curl -fsSL https://ollama.com/install.sh | sh
  1. You should be able to use Ollama in that terminal now

NOTE: you have to do it every time when you refresh the page.

<!-- gh-comment-id:2850902469 --> @JasonHonKL commented on GitHub (May 5, 2025): Umm if you are a Pro member of colab you can do it but totally not recommend. 1. In terminal install go with ```shell sudo add-apt-repository ppa:longsleep/golang-backports sudo apt update sudo apt install golang-go ``` 2. Run the following command ``` curl -fsSL https://ollama.com/install.sh | sh ``` 3. You should be able to use Ollama in that terminal now NOTE: you have to do it every time when you refresh the page.
Author
Owner

@mayunqing1230 commented on GitHub (May 5, 2025):

Umm if you are a Pro member of colab you can do it but totally not recommend.

1. In terminal install go with

sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go

2. Run the following command
curl -fsSL https://ollama.com/install.sh | sh
3. You should be able to use Ollama in that terminal now

NOTE: you have to do it every time when you refresh the page.

Unfortunately, I am a free version user. I have tried many methods on the Internet, but all failed.

<!-- gh-comment-id:2851059703 --> @mayunqing1230 commented on GitHub (May 5, 2025): > Umm if you are a Pro member of colab you can do it but totally not recommend. > > 1. In terminal install go with > > > sudo add-apt-repository ppa:longsleep/golang-backports > sudo apt update > sudo apt install golang-go > > 2. Run the following command > > > ``` > curl -fsSL https://ollama.com/install.sh | sh > ``` > > 3. You should be able to use Ollama in that terminal now > > > NOTE: you have to do it every time when you refresh the page. Unfortunately, I am a free version user. I have tried many methods on the Internet, but all failed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#32716