diff --git a/doc/docker-compose.md b/doc/docker-compose.md index 7f15814..8a1377b 100644 --- a/doc/docker-compose.md +++ b/doc/docker-compose.md @@ -48,7 +48,7 @@ Inside the overleaf container, the Overleaf software runs as a set of micro-serv - `/etc/sharelatex/settings.coffee`: unified settings file for the microservices - `/var/log/sharelatex/`: logs for each microservice - `/var/www/sharelatex/`: code for the various microservices -- `/var/lib/sharelatex/`: the mount-point for persistent data (corresponds to the directory indicated by `SHARELATEX_DATA_PATH` on the host) +- `/var/lib/sharelatex/`: the mount-point for persistent data (corresponds to the directory indicated by `OVERLEAF_DATA_PATH` on the host) ## The MongoDB and Redis Containers diff --git a/doc/ldap.md b/doc/ldap.md index 4a6226c..58bf968 100644 --- a/doc/ldap.md +++ b/doc/ldap.md @@ -11,7 +11,7 @@ EXTERNAL_AUTH=ldap ``` (To preserve backward compatibility with older configuration files, if -`EXTERNAL_AUTH` is not set, but `SHARELATEX_LDAP_URL` is set, then the LDAP +`EXTERNAL_AUTH` is not set, but `OVERLEAF_LDAP_URL` is set (`SHARELATEX_LDAP_URL` for versions `4.x` and older), then the LDAP module will be activated. We still recommend setting `EXTERNAL_AUTH` explicitely) After bootstrapping Server Pro for the first time with LDAP authentication, an existing LDAP user must be given admin permissions visiting `/launchpad` page (or [via CLI](https://github.com/overleaf/overleaf/wiki/Creating-and-managing-users#creating-the-first-admin-user), but in this case ignoring password confirmation). @@ -26,17 +26,18 @@ At Overleaf, we test the LDAP integration against a [test openldap server](https ``` # added to variables.env +# For versions of Overleaf CE/Server Pro `4.x` and older use the 'SHARELATEX_' prefix instead of 'OVERLEAF_' EXTERNAL_AUTH=ldap -SHARELATEX_LDAP_URL=ldap://ldap:389 -SHARELATEX_LDAP_SEARCH_BASE=ou=people,dc=planetexpress,dc=com -SHARELATEX_LDAP_SEARCH_FILTER=(uid={{username}}) -SHARELATEX_LDAP_BIND_DN=cn=admin,dc=planetexpress,dc=com -SHARELATEX_LDAP_BIND_CREDENTIALS=GoodNewsEveryone -SHARELATEX_LDAP_EMAIL_ATT=mail -SHARELATEX_LDAP_NAME_ATT=cn -SHARELATEX_LDAP_LAST_NAME_ATT=sn -SHARELATEX_LDAP_UPDATE_USER_DETAILS_ON_LOGIN=true +OVERLEAF_LDAP_URL=ldap://ldap:389 +OVERLEAF_LDAP_SEARCH_BASE=ou=people,dc=planetexpress,dc=com +OVERLEAF_LDAP_SEARCH_FILTER=(uid={{username}}) +OVERLEAF_LDAP_BIND_DN=cn=admin,dc=planetexpress,dc=com +OVERLEAF_LDAP_BIND_CREDENTIALS=GoodNewsEveryone +OVERLEAF_LDAP_EMAIL_ATT=mail +OVERLEAF_LDAP_NAME_ATT=cn +OVERLEAF_LDAP_LAST_NAME_ATT=sn +OVERLEAF_LDAP_UPDATE_USER_DETAILS_ON_LOGIN=true ``` The `openldap` needs to run in the same network as the `sharelatex` container (which by default would be `overleaf_default`), so we'll proceed with the following steps: diff --git a/doc/overleaf-rc.md b/doc/overleaf-rc.md index eb3aafe..cc9ccf8 100644 --- a/doc/overleaf-rc.md +++ b/doc/overleaf-rc.md @@ -16,25 +16,25 @@ This is useful when running multiple instances of Overleaf on one host, as each - Default: overleaf -### `SHARELATEX_DATA_PATH` +### `OVERLEAF_DATA_PATH` Sets the path to the directory that will be mounted into the main `sharelatex` container, and used to store compile data. This can be either a full path (beginning with a `/`), or relative to the base directory of the toolkit. - Default: data/sharelatex -### `SHARELATEX_LISTEN_IP` +### `OVERLEAF_LISTEN_IP` Sets the host IP address(es) that the container will bind to. For example, if this is set to `0.0.0.0`, then the web interface will be available on any host IP address. -Since https://github.com/overleaf/toolkit/pull/77 the listen mode of the application container was changed to `localhost` only, so the value of `SHARELATEX_LISTEN_IP` must be set to the public IP address for direct container access. +Since https://github.com/overleaf/toolkit/pull/77 the listen mode of the application container was changed to `localhost` only, so the value of `OVERLEAF_LISTEN_IP` must be set to the public IP address for direct container access. -Setting `SHARELATEX_LISTEN_IP` to either `0.0.0.0` or the external IP of your host will typically cause errors when used in conjunction with the [TLS Proxy](tls-proxy.md). +Setting `OVERLEAF_LISTEN_IP` to either `0.0.0.0` or the external IP of your host will typically cause errors when used in conjunction with the [TLS Proxy](tls-proxy.md). - Default: `127.0.0.1` -### `SHARELATEX_PORT` +### `OVERLEAF_PORT` -Sets the host port that the container will bind to. For example, if this is set to `8099` and `SHARELATEX_LISTEN_IP` is set to `127.0.0.1`, then the web interface will be available on `http://localhost:8099`. +Sets the host port that the container will bind to. For example, if this is set to `8099` and `OVERLEAF_LISTEN_IP` is set to `127.0.0.1`, then the web interface will be available on `http://localhost:8099`. - Default: 80 @@ -158,7 +158,7 @@ Sets the host port that the [TLS Proxy](tls-proxy.md) container will bind to for Sets the host IP address(es) that the [TLS Proxy](tls-proxy.md) container will bind to for http redirect. For example, if this is set to `127.0.1.1` then http connections to `127.0.1.1` will be redirected to the https web interface. -Typically this should be set to the external IP of your host. Do not set it to `0.0.0.0` as this will typically cause a conflict with `SHARELATEX_LISTEN_IP`. +Typically this should be set to the external IP of your host. Do not set it to `0.0.0.0` as this will typically cause a conflict with `OVERLEAF_LISTEN_IP`. - Default: `127.0.1.1` diff --git a/doc/persistent-data.md b/doc/persistent-data.md index 4390fe1..d5e867a 100644 --- a/doc/persistent-data.md +++ b/doc/persistent-data.md @@ -5,7 +5,7 @@ The Overleaf Toolkit needs to store persistent data, such as the files required ## Data Directories -The Overleaf container requires a directory in which to store data relating to LaTeX compiles. This directory is set with the `SHARELATEX_DATA_PATH` variable in `config/overleaf.rc`. +The Overleaf container requires a directory in which to store data relating to LaTeX compiles. This directory is set with the `OVERLEAF_DATA_PATH` variable in `config/overleaf.rc`. The MongoDB container, if it is enabled, requires a directory in which to store it's database files, and the same is true of the Redis container. These directories can also be configured in `config/overleaf.rc`. diff --git a/doc/saml.md b/doc/saml.md index 4d85b01..5450188 100644 --- a/doc/saml.md +++ b/doc/saml.md @@ -11,7 +11,7 @@ EXTERNAL_AUTH=saml ``` (To preserve backward compatibility with older configuration files, if -`EXTERNAL_AUTH` is not set, but `SHARELATEX_SAML_ENTRYPOINT` is set, then the SAML +`EXTERNAL_AUTH` is not set, but `SHARELATEX_SAML_ENTRYPOINT` is set (`SHARELATEX_LDAP_URL` for versions `4.x` and older), then the SAML module will be activated. We still recommend setting `EXTERNAL_AUTH` explicitely) The [Developer wiki](https://github.com/overleaf/overleaf/wiki/Server-Pro:-SAML-Config) contains further documentation on the available Environment Variables and other configuration elements. @@ -22,16 +22,17 @@ At Overleaf, we test the SAML integration against a SAML test server. The follow ``` # added to variables.env +# For versions of Overleaf CE/Server Pro `4.x` and older use the 'SHARELATEX_' prefix instead of 'OVERLEAF_' EXTERNAL_AUTH=saml -SHARELATEX_SAML_ENTRYPOINT=http://localhost:8081/simplesaml/saml2/idp/SSOService.php -SHARELATEX_SAML_CALLBACK_URL=http://saml/saml/callback -SHARELATEX_SAML_ISSUER=sharelatex-test-saml -SHARELATEX_SAML_IDENTITY_SERVICE_NAME=SAML Test Server -SHARELATEX_SAML_EMAIL_FIELD=email -SHARELATEX_SAML_FIRST_NAME_FIELD=givenName -SHARELATEX_SAML_LAST_NAME_FIELD=sn -SHARELATEX_SAML_UPDATE_USER_DETAILS_ON_LOGIN=true +OVERLEAF_SAML_ENTRYPOINT=http://localhost:8081/simplesaml/saml2/idp/SSOService.php +OVERLEAF_SAML_CALLBACK_URL=http://saml/saml/callback +OVERLEAF_SAML_ISSUER=sharelatex-test-saml +OVERLEAF_SAML_IDENTITY_SERVICE_NAME=SAML Test Server +OVERLEAF_SAML_EMAIL_FIELD=email +OVERLEAF_SAML_FIRST_NAME_FIELD=givenName +OVERLEAF_SAML_LAST_NAME_FIELD=sn +OVERLEAF_SAML_UPDATE_USER_DETAILS_ON_LOGIN=true ``` The `sharelatex/saml-test` image needs to run in the same network as the `sharelatex` container (which by default would be `overleaf_default`), so we'll proceed with the following steps: diff --git a/doc/sandboxed-compiles.md b/doc/sandboxed-compiles.md index ccf205e..0b94503 100644 --- a/doc/sandboxed-compiles.md +++ b/doc/sandboxed-compiles.md @@ -7,9 +7,9 @@ In Server Pro, it is possible to have each LaTeX project be compiled in a separa When sandboxed compiles are enabled, the toolkit will mount the docker socket from the host into the overleaf container, so that the compiler service in the container can create new docker containers on the host. Then for each run of the compiler in each project, the LaTeX compiler service (CLSI) will do the following: -- Write out the project files to a location inside the `SHARELATEX_DATA_PATH`, +- Write out the project files to a location inside the `OVERLEAF_DATA_PATH`, - Use the mounted docker socket to create a new `texlive` container for the compile run -- Have the `texlive` container read the project data from the location under `SHARELATEX_DATA_PATH` +- Have the `texlive` container read the project data from the location under `OVERLEAF_DATA_PATH` - Compile the project inside the `texlive` container diff --git a/doc/the-doctor.md b/doc/the-doctor.md index 925e8f2..1b6abec 100644 --- a/doc/the-doctor.md +++ b/doc/the-doctor.md @@ -60,7 +60,7 @@ You will see some output like this: - config/overleaf.rc - status: present - values - - SHARELATEX_DATA_PATH: data/sharelatex + - OVERLEAF_DATA_PATH: data/sharelatex - SERVER_PRO: false - MONGO_ENABLED: true - REDIS_ENABLED: true @@ -110,7 +110,7 @@ The `Configuration` section contains information about the files in the `config/ - config/overleaf.rc - status: present - values - - SHARELATEX_DATA_PATH: /tmp/sharelatex + - OVERLEAF_DATA_PATH: /tmp/sharelatex - SERVER_PRO: false - MONGO_ENABLED: false - REDIS_ENABLED: true @@ -120,7 +120,7 @@ The `Configuration` section contains information about the files in the `config/ The above example shows a few problems: -- The `SHARELATEX_DATA_PATH` variable is set to `/tmp/sharelatex`, which is probably not a safe place to put important data +- The `OVERLEAF_DATA_PATH` variable is set to `/tmp/sharelatex`, which is probably not a safe place to put important data - The `MONGO_ENABLED` variable is set to `false`, so the toolkit will not provision it's own MongoDB database. In this case, we had better be sure to set `MONGO_URL` to point to a MongoDB database managed outside of the toolkit - the `config/variables.env` file is missing @@ -133,7 +133,7 @@ The `Warnings` section shows a summary of problems discovered by the doctor scri ``` ====== Warnings ====== - configuration file variables.env not found -- rc file, SHARELATEX_DATA_PATH not set +- rc file, OVERLEAF_DATA_PATH not set ====== End ======= ``` diff --git a/doc/tls-proxy.md b/doc/tls-proxy.md index 2ac17f0..14cb87b 100644 --- a/doc/tls-proxy.md +++ b/doc/tls-proxy.md @@ -7,10 +7,21 @@ Run `bin/init --tls` to initialise local configuration with NGINX proxy configur A default config for NGINX is provided in `config/nginx/nginx.conf` which may be customised to your requirements. The path to the config file can be changed with the `NGINX_CONFIG_PATH` variable. In order for Overleaf to run correctly behind the proxy, the following variables should be uncommented in `config/variables.env` + +Since Overleaf CE/Server Pro `5.x`: + +``` +OVERLEAF_BEHIND_PROXY=true +OVERLEAF_SECURE_COOKIE=true +``` + +For Overleaf CE/Server Pro `4.x` and older versions: + ``` SHARELATEX_BEHIND_PROXY=true SHARELATEX_SECURE_COOKIE=true ``` + Add the following section to your `config/overleaf.rc` file if it is not there already: ``` # TLS proxy configuration (optional) @@ -29,7 +40,7 @@ TLS_PORT=443 By default the https web interface will be available on `https://127.0.1.1:443`. Connections to `http://127.0.1.1:80` will be redirected to `https://127.0.1.1:443`. To change the IP address that NGINX listens on, set the `NGINX_HTTP_LISTEN_IP` and `NGINX_TLS_LISTEN_IP` variables. The ports can be changed via the `NGINX_HTTP_PORT` and `TLS_PORT` variables. -If NGINX fails to start with the error message `Error starting userland proxy: listen tcp4 ... bind: address already in use` ensure that `SHARELATEX_LISTEN_IP:SHARELATEX_PORT` does not overlap with `NGINX_HTTP_LISTEN_IP:NGINX_HTTP_PORT`. +If NGINX fails to start with the error message `Error starting userland proxy: listen tcp4 ... bind: address already in use` ensure that `OVERLEAF_LISTEN_IP:OVERLEAF_PORT` does not overlap with `NGINX_HTTP_LISTEN_IP:NGINX_HTTP_PORT`. ```mermaid sequenceDiagram @@ -53,7 +64,7 @@ sequenceDiagram note over sharelatex: sharlatex:80 %% User connects to localhost HTTP user->>+ internal: HTTP - note over internal: SHARELATEX_LISTEN_IP:SHARELATEX_PORT + note over internal: OVERLEAF_LISTEN_IP:OVERLEAF_PORT internal->>+sharelatex: HTTP note over sharelatex: sharlatex:80 ``` \ No newline at end of file