# Jupyterlab UI and API hosted on a different server

**URL:** <https://discourse.jupyter.org/t/jupyterlab-ui-and-api-hosted-on-a-different-server/23905>\
**Category:** Zero to JupyterHub on Kubernetes\
**Tags:** how-to, help-wanted, notebook\
**Created:** [February 12, 2024, 1:17pm UTC](https://discourse.jupyter.org/t/jupyterlab-ui-and-api-hosted-on-a-different-server/23905 "2024-02-12T13:17:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_goyal](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@mr\_goyal](https://discourse.jupyter.org/u/mr_goyal)\
**Post date:** [February 12, 2024, 1:17pm UTC](https://discourse.jupyter.org/t/jupyterlab-ui-and-api-hosted-on-a-different-server/23905/1 "2024-02-12T13:17:32Z")

</div>

Hi,  
Is it possible to run Jupyterlab UI and API in different server and interacting through API gateway.

Request Flow -

User → Jupyterlab UI → API Gateway → /user///lab?

This kind of setup i am looking into it.

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [February 12, 2024, 2:43pm UTC](https://discourse.jupyter.org/t/jupyterlab-ui-and-api-hosted-on-a-different-server/23905/2 "2024-02-12T14:43:46Z")

</div>

Z2JH includes configurable-http-proxy which is kind of an API gateway already:

User → configurable-http-proxy → JupyterHub UI → start JupyterLab and add a route to configurable-http-proxy  
User → configurable-http-proxy → JupyterLab

You could implement your own alternative to configurable-http-proxy to use your own API gateway:

> **[Proxies](https://jupyterhub.readthedocs.io/en/stable/reference/api/proxy.html)**
>
> Module: jupyterhub.proxy: API for JupyterHub’s proxy. Custom proxy implementations can subclass Proxy and register in JupyterHub config: Route Specification: A routespec is a URL prefix (\[host\]/pat...

For example [GitHub - jupyterhub/traefik-proxy: JupyterHub proxy implementation with traefik](https://github.com/jupyterhub/traefik-proxy)
