Debug Overleaf Error: can't create new project/upload files
Debugging Overleaf: Fixing “Create Project” & File Upload Failures
A few days after fixed the MongoDB Error, I suddenly found that creating new projects or uploading files would consistently fail with an HTTP 500 error from the web service.
Frontend logs gave little detail, but the history-v1 service logs revealed the root cause:
1 | |
Overleaf couldn’t create directories needed to store project history.
The Cause
The directory /var/lib/overleaf/ inside docker had mixed ownership—some files belonged to www-data:www-data, others to my local user (dyliu:dyliu). This broke the write permissions required during project initialization.
The Fix
Enter the container and correct permissions:
1 | |
Project creation and uploads worked immediately after.
We can further test it by restarting the services:
1 | |
Everything works great!
Takeaway
HTTP 500 errors in Docker often point to volume permission issues, not code bugs.
For Overleaf specifically, writable history storage is essential for project creation. Checking volume ownership early can save significant debugging time.
Reference
ChatGPT
Deepseek