Skip to main content
Git integration runs the separate git-bridge service. Users clone and push through ${OVERLEAF_SITE_URL}/git/<project id>; the Ayakaleaf Pro pod forwards those requests to git-bridge, and git-bridge calls back into the pod for project content and history. Turning it on also enables the MCP server and is required by GitHub, GitLab, Gitea and Dropbox Synchronisation. This page extends the single-replica installation from Using Kubernetes. For several replicas, see Horizontal scaling.
1

Deploy git-bridge

45-git-bridge.yaml
10.96.100.80 must be a free address inside your cluster’s service CIDR (kubeadm’s default is 10.96.0.0/12).
2

Point Ayakaleaf Pro at it

Add to 30-config.yaml:
30-config.yaml (additions)
3

Clone a project

Create a Git authentication token in Account Settings, then:
Use git as the user name and the token as the password.

Why the manifest looks like this

  • A fixed ClusterIP as GIT_BRIDGE_HOST. The nginx inside the Ayakaleaf Pro image forwards /git/ with a resolver set to 127.0.0.11, Docker’s built-in DNS. Kubernetes has no DNS server there, so a host name such as git-bridge fails with 502 and “git-bridge could not be resolved” in /var/log/nginx/error.log. An IP address needs no lookup.
  • overleaf-internal. git-bridge needs ports 3000 (web API) and 3100 (history) of the Ayakaleaf Pro pod. A separate ClusterIP Service keeps them inside the cluster; adding them to the NodePort Service would publish them on every node.
  • enableServiceLinks: false. The Service git-bridge would make Kubernetes add GIT_BRIDGE_PORT=tcp://10.96.100.80:8000 to the pod; git-bridge reads GIT_BRIDGE_PORT as its listening port and stops with MalformedJsonException ... path $.port.
  • One replica with its own volume. git-bridge keeps a git repository per cloned project on disk and must not run twice. Back up its volume.

Tested on Kubernetes

On Kubernetes 1.37 with three replicas behind HAProxy and git-bridge as overleaf-0’s sibling, our end-to-end tests for the Git integration pass (19 cases), also with git-bridge moved to port 8001 so that nginx must use GIT_BRIDGE_HOST and GIT_BRIDGE_PORT: Git tokens in the account settings, the clone command in the editor, clone, push and pull, binary files and folders, renames and deletions, out-of-date pushes refused, access by role (invited editors and editors through the link may push, viewers and reviewers may only clone, users without access are refused), wrong and deleted tokens refused, git-bridge’s internal routes kept behind nginx, and suspended accounts. The Git authentication tokens themselves (generating, listing, the limit per user, deleting, expiry, the check git-bridge asks web for, and tokens of suspended and deleted accounts) pass on one replica (16 cases).

Q&A

Answer: Check GIT_BRIDGE_HOST: it must be the IP address of the git-bridge Service, not its name, see above. kubectl -n overleaf exec deploy/overleaf -- tail /var/log/nginx/error.log shows the reason.
Last modified on November 2, 2026