Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions community-containers/overleaf/overleaf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"aio_services_v1": [
{
"container_name": "nextcloud-aio-overleaf-redis",
"display_name": "Overleaf Redis",
"documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/overleaf",
"image": "redis",
"image_tag": "7",
"internal_port": "6379",
"restart": "unless-stopped",
"expose": [
"6379"
],
"environment": [
"TZ=%TIMEZONE%"
],
"volumes": [
{
"source": "nextcloud_aio_overleaf_redis",
"destination": "/data",
"writeable": true
}
]
},
{
"container_name": "nextcloud-aio-overleaf-mongo",
"display_name": "Overleaf MongoDB",
"documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/overleaf",
"image": "mongo",
"image_tag": "5",
"internal_port": "27017",
"restart": "unless-stopped",
"expose": [
"27017"
],
"environment": [
"TZ=%TIMEZONE%"
],
"volumes": [
{
"source": "nextcloud_aio_overleaf_mongo",
"destination": "/data/db",
"writeable": true
}
],
"backup_volumes": [
"nextcloud_aio_overleaf_mongo"
]
},
{
"container_name": "nextcloud-aio-overleaf",
"display_name": "Overleaf",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this main container should be the first because IIRC we use the first displayname for the checkbox for the community container in the AIO interface...

Copy link
Collaborator Author

@docjyJ docjyJ Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is AI generated, I need to read the documentation. Thank you, I'll take note of that.

This week-end, the noise was too much. thats why it in draft.

"documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/overleaf",
"image": "sharelatex/sharelatex",
"image_tag": "latest",
"internal_port": "80",
"restart": "unless-stopped",
"depends_on": [
"nextcloud-aio-overleaf-mongo",
"nextcloud-aio-overleaf-redis"
],
"ports": [
{
"ip_binding": "%APACHE_IP_BINDING%",
"port_number": "8050",
"protocol": "tcp"
}
],
"environment": [
"TZ=%TIMEZONE%",
"SHARELATEX_MONGO_URL=mongodb://nextcloud-aio-overleaf-mongo:27017/sharelatex",
"SHARELATEX_REDIS_HOST=nextcloud-aio-overleaf-redis",
"SHARELATEX_REDIS_PORT=6379",
"SHARELATEX_APP_NAME=Overleaf"
],
"volumes": [
{
"source": "nextcloud_aio_overleaf",
"destination": "/var/lib/sharelatex",
"writeable": true
}
],
"backup_volumes": [
"nextcloud_aio_overleaf",
"nextcloud_aio_overleaf_mongo"
],
"nextcloud_exec_commands": [
"echo 'Installing integration_overleaf app...'",
"php /var/www/html/occ app:install integration_overleaf",
"php /var/www/html/occ app:enable integration_overleaf",
"echo 'Configuring integration_overleaf base_url...'",
"php /var/www/html/occ config:app:set integration_overleaf base_url --value 'http://%NC_DOMAIN%:8050'"
]
}
]
}
35 changes: 35 additions & 0 deletions community-containers/overleaf/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Overleaf (Community Edition)
This community container deploys Overleaf CE with its required MongoDB and Redis services.

### Notes
- After adding and starting the container, you can directly visit http://ip.address.of.server:8050/ to access your new Overleaf instance.
- To access Overleaf outside your local network with HTTPS, set up a reverse proxy in front of AIO. You can either follow the generic reverse proxy guide: https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md or use the community Caddy container which can be adjusted to forward a subdomain like `overleaf.$NC_DOMAIN` to port 8050 on this server.
- Initial user/admin creation is handled inside Overleaf. This container does not integrate Overleaf authentication with Nextcloud users.
- If you run a firewall (e.g., ufw), ensure port 8050 is allowed or that your reverse proxy can reach it locally.
- The data directories for Overleaf and MongoDB are persisted and included in AIO backups automatically.
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers for how to add it to the AIO stack.

### Nextcloud integration (auto-config)
When this container is added, AIO automatically:
- Installs and enables the Nextcloud app `integration_overleaf`.
- Sets its `base_url` to `http://%NC_DOMAIN%:8050` by default (reachable when accessing the server directly).

If you publish Overleaf behind a reverse proxy on a subdomain (recommended), change the URL in Nextcloud accordingly, for example:
```bash
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php /var/www/html/occ config:app:set integration_overleaf base_url --value "https://overleaf.%NC_DOMAIN%"
```

### Data and backups
- Overleaf data: stored in the volume `nextcloud_aio_overleaf` (mounted at `/var/lib/sharelatex`).
- MongoDB data: stored in the volume `nextcloud_aio_overleaf_mongo` (mounted at `/data/db`).
- Both are included in AIO backup/restore. Redis data is ephemeral by design and not included.

### Advanced configuration
- The container uses the official `sharelatex/sharelatex` image and configures minimal required environment variables (MongoDB/Redis/Time zone). You can adjust Overleaf settings from the web UI afterwards.
- If you plan to expose Overleaf publicly, consider setting up rate-limiting and fail2ban in front of it. See the community Fail2ban container: https://github.com/nextcloud/all-in-one/tree/main/community-containers/fail2ban

### Repository
https://github.com/overleaf/overleaf

### Maintainer
https://github.com/docjyj