Repository navigation
Closed
Labels
Description
Steps to Reproduce
git clone https://github.com/overleaf/overleaf
cd overleaf
docker compose upExpected Behaviour
I expected the docker-compose.yml to work out of the box.
Observed Behaviour
Sharelatex complains that it needs mongoDB version 8.0, but the image sets it at 6.0:
sharelatex | The MongoDB server has version 6.0.27, but Overleaf requires at least version 8.0. Aborting.
mongo | {"t":{"$date":"2026-01-07T06:55:43.164+00:00"},"s":"I", "c":"NETWORK", "id":22944, "ctx":"conn73","msg":"Connection ended","attr":{"re
mote":"172.18.0.4:42588","uuid":"ad1b7c45-21ea-489f-ae8e-6707ab4c2976","connectionId":73,"connectionCount":6}}
mongo | {"t":{"$date":"2026-01-07T06:55:43.164+00:00"},"s":"I", "c":"NETWORK", "id":22944, "ctx":"conn72","msg":"Connection ended","attr":{"re
mote":"172.18.0.4:42584","uuid":"7baa7d24-b5a1-453c-822e-d96e0c24c1d2","connectionId":72,"connectionCount":5}}
sharelatex | *** /etc/my_init.d/500_check_db_access.sh failed with status 1
mongo | {"t":{"$date":"2026-01-07T06:55:43.164+00:00"},"s":"I", "c":"NETWORK", "id":22944, "ctx":"conn71","msg":"Connection ended","attr":{"re
mote":"172.18.0.4:42568","uuid":"eea21325-7b6c-4ba4-ac7a-1093b5c08e96","connectionId":71,"connectionCount":4}}
sharelatex |
sharelatex | *** Killing all processes...
Context
I just wanted to use ShareLatex in my machine.
Technical Info
- URL:
- Browser Name and version:
- Operating System and version (desktop or mobile):
- Signed in as:
- Project and/or file: sharelatex,
maincommit 9be3c3f
Analysis
You could think that you simply need to upgrade the version of mongodb in the docker-compose.yml, like:
mongo:
restart: always
image: mongo:8.0But then another problem appears and mongoDB does not start:
mongo | {"t":{"$date":"2026-01-07T07:06:53.648+00:00"},"s":"F", "c":"CONTROL", "id":20573, "ctx":"initandlisten","msg":"Wrong mongod version",
"attr":{"error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: Location4926900: Invalid featureCompatibilityVersion doc
ument in admin.system.version: { _id: \"featureCompatibilityVersion\", version: \"6.0\" }. See https://docs.mongodb.com/master/release-notes/7.0-compati
bility/#feature-compatibility. :: caused by :: Invalid feature compatibility version value '6.0'; expected '7.0' or '7.3' or '8.0'. See https://docs.mon
godb.com/master/release-notes/7.0-compatibility/#feature-compatibility.). If the current featureCompatibilityVersion is below 7.0, see the documentation
on upgrading at https://docs.mongodb.com/master/release-notes/7.0/#upgrade-procedures."}}
I am not sure how to proceed to just make it work and run the compose file.
Activity
Chuwee commentedon Jan 7, 2026
This can be solved by removing the directory "mongo_data" and then rerunning docker compose after switching mongo db version to 8.0
AleixMT commentedon Jan 9, 2026
I might have tried that but it did not work. Anyway, I see the PR fixing this issue is incoming. I will wait until it is merged. Thank you so much.
mitchirhd commentedon Jan 14, 2026
I had to additionally run the mongodb setup command from mongodb-init-replica-set.js manually using mongoshell inside the docker container.
First
docker exec -it mongo mongoshThen
rs.initiate({ _id: 'overleaf', members: [{ _id: 0, host: 'mongo:27017' }] })dc6jn commentedon May 14, 2026
Hi there,
I think this problem is relatet to this Bugreport.
I found some hints in the very good explanation here
To make things short: modify lib/docker-compose.mongo.yml and add environment setting:
expose:
- 27017
environment:
GLIBC_TUNABLES: 'glibc.cpu.hwcaps=-SHSTK'
healthcheck:
AleixMT commentedon May 18, 2026
I have just tried to replicate my steps that i specified at the top of this issue and it works. The docker compose works out of box