# How to run on colab?

**URL:** <https://community.labelstud.io/t/how-to-run-on-colab/524>\
**Category:** Label Studio Support\
**Created:** [March 26, 2025, 8:48am UTC](https://community.labelstud.io/t/how-to-run-on-colab/524 "2025-03-26T08:48:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mavizasyon](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.labelstud.io/mavizasyon/32/339_2.png) [@mavizasyon](https://community.labelstud.io/u/mavizasyon)\
**Post date:** [March 26, 2025, 8:48am UTC](https://community.labelstud.io/t/how-to-run-on-colab/524/1 "2025-03-26T08:48:15Z")

</div>

Hi, I want to run label studio on Colab to further run sam2 ml backend on Colab machines online. So I came across the following code for Colab;

```auto
!pip install label-studio
!pip install pyngrok # install the pyngrok 

import os
os.makedirs('/content/drive/My Drive/label_studio_data', exist_ok=True)
# Import necessary modules
import subprocess
from pyngrok import ngrok
import time

# Start Label Studio in the background with data directory set to Google Drive
subprocess.Popen(['label-studio', 'start', '--port', '8000', '--data-dir', '/content/drive/My Drive/label_studio_data'])

# Wait for a few seconds to allow Label Studio to start
time.sleep(5)

# Set your ngrok authentication token
ngrok.set_auth_token("YOUR_AUTH_TOKEN")

# Open a ngrok tunnel to the Label Studio server
ngrok_tunnel = ngrok.connect(8000)
print('Public URL:', ngrok_tunnel.public_url)

```

after setting up ngrok and giving the auth\_token, it generated me the link, things went smoothly, and I came across with authentication. But the issue is after sign up it, I cannot proceed. What should I do? Is there a tutorial to follow for Colab?

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/labelstudio/original/1X/55ecd065fc41a3a4f4bf6aecdd50b6251957ee5a.png)
