Skip to content

Add support for ngrok subdomain#31

Merged
shubham3121 merged 2 commits intomainfrom
feat/ngrok-subdomain
Jan 21, 2026
Merged

Add support for ngrok subdomain#31
shubham3121 merged 2 commits intomainfrom
feat/ngrok-subdomain

Conversation

@shubham3121
Copy link
Member

This pull request introduces support for storing and utilizing the ngrok username alongside the authentication token, enabling the use of a custom subdomain for ngrok tunnels. It also refactors the provisioner and healthcheck logic for improved clarity and reliability, and makes several improvements to settings and marketplace synchronization.

Ngrok username support and proxy service enhancements:

  • Adds a new ngrok_username field to the Settings model and database, including migration and repository methods for storing and retrieving the username. (backend/syft_space/alembic/versions/616fe141adf9_save_ngrok_username_to_settings.py, backend/syft_space/components/settings/entities.py, backend/syft_space/components/settings/repository.py) [1] [2] [3]
  • Updates ProxyService to require and use the ngrok username when establishing tunnels, ensuring tunnels use a custom subdomain. This includes persisting the username, supporting auto-connect on startup, and handling reconnection logic with the username. (backend/syft_space/components/shared/proxy_service.py) [1] [2] [3] [4] [5] [6]
  • Modifies settings handlers to fetch and pass the username from the default marketplace when configuring or disconnecting the proxy, and ensures the username is synchronized with the database. (backend/syft_space/components/settings/handlers.py) [1] [2]

Settings and marketplace synchronization improvements:

  • Refactors public URL synchronization to always use the default marketplace, updating the signature and logic of sync_public_url_to_marketplace to accept a Marketplace instance rather than a Tenant. (backend/syft_space/components/settings/handlers.py)
  • Ensures that proxy configuration and disconnection properly handle the absence of a default marketplace, raising appropriate errors. (backend/syft_space/components/settings/handlers.py) [1] [2]

Provisioner and healthcheck logic improvements:

  • Refines the logic for checking if a Weaviate container is running and healthy, ensuring more robust status reporting and aligning health status values. (backend/syft_space/components/dataset_types/weaviate_local/weaviate_provisioner.py) [1] [2] [3]
  • Updates dataset healthcheck handler to use the new provisioner status logic and report health status more accurately. (backend/syft_space/components/datasets/handlers.py) [1] [2]

Provisioner startup improvements:

  • Changes provisioner manager startup to initialize provisioners in the background, preventing server startup from being blocked. (backend/syft_space/components/datasets/provisioner_manager.py)

- Store ngrok_username in Settings alongside token for persistence
- ProxyService creates tunnel with subdomain: {username}.openmined.ngrok.app
- Auto-connect on startup restores tunnel with correct subdomain
- Reconnection maintains subdomain after connection loss
@shubham3121 shubham3121 merged commit 6c119da into main Jan 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant