docker-compose.yml file, migrating to the Toolkit can make running an on-premises version of Overleaf easier to deploy, upgrade and maintain.
To migrate, you’ll need to convert your existing Docker Compose setup into the format used by the Toolkit. This process involves copying existing configuration into the Toolkit.
This guide will walk you through each step of this process, ensuring a smooth migration from Docker Compose to the Toolkit.
These instructions are for v4.x and earlier. Therefore all variables use the
SHARELATEX_ prefix instead of OVERLEAF_.1
Clone the Toolkit repository
First, clone the Toolkit repository to the host machine:Next run the
bin/init command to initialise the Toolkit with its default configuration.2
Setting the image and version
In a typical When using the Toolkit, the image name is automatically resolved; the only requirement is to set
docker-compose.yml the image and version are defined in the component description, for example:SERVER_PRO=true in config/overleaf.rc to pick the Server Pro image or SERVER_PRO=false to use Community Edition.The desired Server Pro/Community Edition version number is set in the config/version file. The Toolkit requires a specific version number like 4.2.3. If you are using latest, you can use bin/images to find the image id of your local latest version, then use the release notes for 2.x.x, 3.x.x, 4.x.x or 5.x.x to map the image id to the version.If you are sourcing the image from your own internal registry you can override the image the Toolkit uses by setting OVERLEAF_IMAGE_NAME. You do not need to specify the tag as the Toolkit will automatically add it based on your config/version file.3
Configuring external access
By default, Overleaf will listen on
127.0.0.1:80, only allowing traffic from the Docker host machine.To allow external access, set the OVERLEAF_LISTEN_IP and OVERLEAF_PORT in the config/overleaf.rc file.4
Environment variable migration
You’ll likely have a set of environment variables defined in the Copy these variables into the Toolkit’s config/variables.env file, ensuring the following form (use Exceptions / differences when using the Toolkit:
sharelatex service in your docker-compose.yml, for example:= instead of :):- Variables starting with
SANDBOXED_COMPILES_andDOCKER_RUNNERare no longer needed. To enable Sandboxed Compiles, setSIBLING_CONTAINERS_ENABLED=truein your config/overleaf.rc file. - Variables starting with
OVERLEAF_MONGO_,OVERLEAF_REDIS_and theREDIS_HOSTvariable are no longer needed. MongoDB and Redis are now configured in the config/overleaf.rc file usingMONGO_URL,REDIS_HOSTandREDIS_PORT.
5
NGINX Proxy
For instructions on how to migrate
nginx, see the TLS Proxy documentation:6
Volumes
Set the locations of data volumes in config/overleaf.rc:
ShareLaTeX
Set theOVERLEAF_DATA_PATH to the location of the data volume used by the sharelatex container.MongoDB
Set theMONGO_DATA_PATH to the location of the data volume used by the mongo container.Redis
Set theREDIS_DATA_PATH to the location of the data volume used by the redis container.
