Giter Club home page Giter Club logo

toolkit's Introduction

Overleaf Toolkit

This repository contains the Overleaf Toolkit, the standard tools for running a local instance of Overleaf. This toolkit will help you to set up and administer both Overleaf Community Edition (free to use, and community supported), and Overleaf Server Pro (commercial, with professional support).

The Developer wiki contains further documentation on releases, features and other configuration elements.

Getting Started

Clone this repository locally:

git clone https://github.com/overleaf/toolkit.git ./overleaf-toolkit

Then follow the Quick Start Guide.

Documentation

See Documentation Index

Contributing

See the CONTRIBUTING file.

Getting Help

Users of the free Community Edition should open an issue on github.

Users of Server Pro should contact [email protected] for assistance.

In both cases, it is a good idea to include the output of the bin/doctor script in your message.

toolkit's People

Contributors

aeaton-overleaf avatar alex-devg avatar avaneesh92 avatar cubercsl avatar das7pad avatar dvmc avatar emcsween avatar gh2k avatar icarusradio avatar jdleesmiller avatar junekelly avatar mans0954 avatar mfakhrusy avatar mlevans0 avatar mserranom avatar nekoyue avatar siaimes avatar thomas- avatar yinaoxiong avatar zuphilip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

toolkit's Issues

When running bin/up : overleaf_key.pem: No such file or directory

Hi,

When following the Quick-Start Guide

I get an error at the Starting Up step

Steps to Reproduce

  1. Follow the Quick-Start Guide.
  2. Until trying to run bin/up

Expected Behaviour

should see some log output from the docker containers, indicating that the containers are running

Observed Behaviour

I get realpath: config/nginx/certs/overleaf_key.pem: No such file or directory

Context

I'm following the Quick-Start Guide to try and get Overleaf running on a local VM.

Technical Info

Here's the output of bin/doctor

====== Overleaf Doctor ======
- Host Information
    - Linux
    - Output of 'lsb_release -a':
            No LSB modules are available.
            Distributor ID:     Ubuntu
            Description:        Ubuntu 20.04.2 LTS
            Release:    20.04
            Codename:   focal
- Dependencies
    - bash
        - status: present
        - version info: 5.0.17(1)-release
    - docker
        - status: present
        - version info: Docker version 20.10.2, build 20.10.2-0ubuntu1~20.04.2
    - docker-compose
        - status: present
        - version info: docker-compose version 1.25.0, build unknown
    - realpath
        - status: present
        - version info: realpath (GNU coreutils) 8.30
    - perl
        - status: present
        - version info: 5.030000
    - awk
        - status: present
        - version info: GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)
    - openssl
        - status: present
        - version info: OpenSSL 1.1.1f  31 Mar 2020
- Docker Daemon
    - status: DOWN !
====== Configuration ======
- config/version
    - status: present
    - version: 2.6.1
- config/overleaf.rc
    - status: present
    - values
        - SHARELATEX_DATA_PATH: data/sharelatex
        - SERVER_PRO: false
        - SHARELATEX_PORT: 80
        - MONGO_ENABLED: true
        - MONGO_DATA_PATH: data/mongo
        - REDIS_ENABLED: true
        - REDIS_DATA_PATH: data/redis
        - NGINX_ENABLED: false
        - NGINX_CONFIG_PATH: config/nginx/nginx.conf
        - TLS_PRIVATE_KEY_PATH: config/nginx/certs/overleaf_key.pem
        - TLS_CERTIFICATE_PATH: config/nginx/certs/overleaf_certificate.pem
- config/variables.env
    - status: present
====== Warnings ======
! Docker daemon is not running
====== End ======

As you can see it is Ubuntu 20.04.2 LTS, it's a clean VM where I just installed Ubuntu server,
I haven't touched the config files so NGINX_ENABLED is still set to false

Question regarding horizontal scaling

Hi there - what about distributed deployments?

Docker compose on which the toolkit is based allows afaik using Docker Swarm for that, but its future is not clear? That is, is Overleaf not suitable for horizontal scaling, or will be there support for k8s?

If there should be no problems with deploying Overleaf on Docker Swarm, how does the toolkit being docker compose wrapper address container scaling in terms of multiple replicas?

Unhealty sharelatex container

I could install overleaf on my machine without any issues. But sometimes when I run bin/stop and bin/start again I get this "unhealty container" error. Rebooting the host machine and bin/start is a work around that I figured out. I am not familiar with docker and I don't know how to debug this.

$ bin/start
Starting mongo      ... done
Starting redis      ... done
Starting sharelatex ... error

ERROR: for sharelatex  Container "40c413ebf5b4" is unhealthy.

Thank you for this project!

Unhealty sharelatex container

Hi, I'm using Win10 with WSL2 with Ubuntu 20.04.
So I followed the Quick-Start Guide step by step, but I can't get sharelatex to work.
When I call "bin/up" or "bin/start" I get:

Starting mongo      ... done
Starting redis      ... done
Starting sharelatex ... error

ERROR: for sharelatex  Container "99d57bdc98e5" is unhealthy.

with bin/doctor:

====== Overleaf Doctor ======
- Host Information
    - Linux
    - Output of 'lsb_release -a':
            No LSB modules are available.
            Distributor ID:     Ubuntu
            Description:        Ubuntu 20.04.2 LTS
            Release:    20.04
            Codename:   focal
- Dependencies
    - bash
        - status: present
        - version info: 5.0.17(1)-release
    - docker
        - status: present
        - version info: Docker version 20.10.7, build f0df350
    - docker-compose
        - status: present
        - version info: docker-compose version 1.29.2, build 5becea4c
    - realpath
        - status: present
        - version info: realpath (GNU coreutils) 8.30
    - perl
        - status: present
        - version info: 5.030000
    - awk
        - status: present
        - version info: GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)
    - openssl
        - status: present
        - version info: OpenSSL 1.1.1f  31 Mar 2020
- Docker Daemon
    - status: up
====== Configuration ======
- config/version
    - status: present
    - version: 2.7.0
- config/overleaf.rc
    - status: present
    - values
        - SHARELATEX_DATA_PATH: data/sharelatex
        - SERVER_PRO: false
        - SHARELATEX_PORT: 8080
        - MONGO_ENABLED: true
        - MONGO_DATA_PATH: data/mongo
        - REDIS_ENABLED: true
        - REDIS_DATA_PATH: data/redis
        - NGINX_ENABLED: false
        - NGINX_CONFIG_PATH: config/nginx/nginx.conf
        - TLS_PRIVATE_KEY_PATH: config/nginx/certs/overleaf_key.pem
        - TLS_CERTIFICATE_PATH: config/nginx/certs/overleaf_certificate.pem
- config/variables.env
    - status: present
====== Warnings ======
- None, all good
====== End ======

and bin/docker-compose ps:

Name               Command                 State       Ports
--------------------------------------------------------------
mongo   docker-entrypoint.sh mongod      Restarting
redis   docker-entrypoint.sh redis ...   Up           6379/tcp

It seems that the mongo container can't start since it is stuck in restarting
I tried to delete the docker containers and images and start again from scratch but the same error happens again.

The container log for mongo prints:

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=99d57bdc98e5

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] db version v4.0.26

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] git version: f12d07945bd82ff9b6726aa74b84ea4e94b06171

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] allocator: tcmalloc

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] modules: none

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] build environment:

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] distmod: ubuntu1604

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] distarch: x86_64

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] target_arch: x86_64

2021-08-05T20:10:00.778+0000 I CONTROL [initandlisten] options: { net: { bindIpAll: true } }

2021-08-05T20:10:00.782+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=5837M,cache_overflow=(file_max=0M),session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),

2021-08-05T20:10:01.400+0000 E STORAGE [initandlisten] WiredTiger error (17) [1628194201:400278][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1628194201:400278][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: File exists

2021-08-05T20:10:01.453+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.84

2021-08-05T20:10:01.454+0000 E STORAGE [initandlisten] WiredTiger error (1) [1628194201:454800][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1628194201:454800][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted

2021-08-05T20:10:01.466+0000 E STORAGE [initandlisten] WiredTiger error (17) [1628194201:466717][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1628194201:466717][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: File exists

2021-08-05T20:10:01.519+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.85

2021-08-05T20:10:01.520+0000 E STORAGE [initandlisten] WiredTiger error (1) [1628194201:520477][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1628194201:520477][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted

2021-08-05T20:10:01.531+0000 E STORAGE [initandlisten] WiredTiger error (17) [1628194201:531281][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1628194201:531281][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: File exists

2021-08-05T20:10:01.585+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.86

2021-08-05T20:10:01.586+0000 E STORAGE [initandlisten] WiredTiger error (1) [1628194201:586481][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1628194201:586481][1:0x7fa1d82a4a80], connection: __posix_open_file, 672: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted

2021-08-05T20:10:01.588+0000 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.

2021-08-05T20:10:01.588+0000 F STORAGE [initandlisten] Reason: 1: Operation not permitted

2021-08-05T20:10:01.588+0000 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 711

2021-08-05T20:10:01.588+0000 F - [initandlisten] \n\n***aborting after fassert() failure\n\n


Install overleaf behind an existing nginx-proxy

Hello!
I want to install overleaf behind an existing nginx-proxy actually serving some other applications on different subdomains and paths (VIRTUAL_PATH, from nginx-proxy:dev).
See below, the proxy's container configuration:

services:
  nginx-proxy:
    image: nginxproxy/nginx-proxy:dev
    container_name: nginx-proxy
    networks:
      - frontend
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - conf:/etc/nginx/conf.d
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - dhparam:/etc/nginx/dhparam
      - certs:/etc/nginx/certs:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro

  acme-companion:
    image: nginxproxy/acme-companion
    container_name: nginx-proxy-acme
    networks:
      - frontend
    volumes_from:
      - nginx-proxy
    volumes:
      - certs:/etc/nginx/certs:rw
      - acme:/etc/acme.sh
      - /var/run/docker.sock:/var/run/docker.sock:ro

volumes:
  conf:
  vhost:
  html:
  dhparam:
  certs:
  acme:

networks:
  frontend:
    driver: bridge

As you can see, proxy also provide SSL certificates.
When I want run an application behind my existing proxy I use the following directive in docker-compose.yml:

services:
  server:
    ...
    environment:
      ...
      - VIRTUAL_HOST=subdomain.domain.com
      - VIRTUAL_PORT=9999
      - VIRTUAL_PATH=/path/to/service/from/web
      - VIRTUAL_DEST=/path/to/service/in/container
      ...
    networks:
      - proxy_frontend
...

How can I implement the same with the overleaf toolkit installation?
Thanks for help!

Ivan

Issues upgrading TexLive

Steps to Reproduce

Hi everyone!

Yesterday I installed Overleaf Community Edition and upgraded TexLive to a full installation. During the process described here, I had a couple of minor issues which I will explain here.

The main reason was, that TexLive 2021 was released a couple of days ago. Hence, you have to make sure to use the "historic" 2020 TexLive version. This is what I did:

$ bin/docker-compose exec sharelatex  /bin/bash
# tlmgr option repository ftp://tug.org/historic/systems/texlive/2020/tlnet-final
# tlmgr update --self
# tlmgr install scheme-full
# tlmgr update --all
# exit

Within the docker-compose.override.yml file I had to add a version: '2.2' line to make it work.

Since I am neither an Overleaf, Docker nor a TexLive expert, I just wanted to let you know, that just following the docs was not enough to install successfully. Maybe it would be enough to specify the documentation or to find a more sophisticated way of installing full TexLive?! I am willing to help but - as I said - I am not an expert at all...

Thx a lot for Overleaf and the toolkit which makes things a lot easier! 😃

Regards

Thorsten

Docker version 18.09.8, build bfed4f5
docker-compose version 1.24.0, build 0aa59064

Max Upload File Size

I'm using Overleaf Toolkit and need to adjust the max upload file size. For more complicated documents where figures and include files are stored in directories for better organization, uploading a zip file is the most efficient way to get the project into overleaf, but the zip file for some projects is > 50 MB. I have seen steps where you can modify client_max_body_size in /etc/nginx/nginx.conf within the container, but when I bring the container back up, the changes aren't having any effect.

Here are the steps I am taking

  1. Use bin/up -d to bring up overleaf
  2. Get a shell into the container: bin/docker-compose exec sharelatex /bin/sh
  3. Edit client_max_body_size in nginx.conf: vim /etc/nginx/nginx.conf
  4. Exit the shell
  5. docker commit sharelatex sharelatex/sharelatex:with-texlive-full (also using the commit to keep all tex packages)
  6. bin/stop
  7. Add docker-compose.override.yml to overleaf-toolkit/config with
version: '2.2'
services:

    sharelatex:
        image: sharelatex/sharelatex:with-texlive-full
  1. bin/up -d
  2. Get a shell into the container: bin/docker-compose exec sharelatex /bin/sh
  3. View /etc/nginx/nginx.conf and I see that client_max_body_size is back to the original setting of 50m

I expected the change to be saved in the image. It did start back up with all of the tex packages so I know it's using the right image. Is there somewhere else that I should be making this change? Or is this not something I can customize?

It seems that if I am hosting overleaf on my own server, I should be able to have more control over settings like max file size and max number of files uploaded based on what I think my server can handle.

DockerException

Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose\cli\main.py", line 80, in main
  File "compose\cli\main.py", line 189, in perform_command
  File "compose\cli\command.py", line 60, in project_from_options
  File "compose\cli\command.py", line 152, in get_project
  File "compose\cli\docker_client.py", line 41, in get_client
  File "compose\cli\docker_client.py", line 170, in docker_client
  File "docker\api\client.py", line 197, in __init__
  File "docker\api\client.py", line 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.')
[16500] Failed to execute script docker-compose

SHARELATEX_PORT in overleaf.rc is not respected.

Steps to Reproduce

  1. Follow the instructions in the toolkit document to get overleaf server started (in blocking mode, without -d option)
  2. Stop the service (Ctrl-C)
  3. Change config in overleaf.rc for SHARELATEX_PORT from 80 to 8001
  4. Restart using "bin/up" script

Expected Behaviour

http://localhost:8001 should show the overleaf page now.

Observed Behaviour

  1. http://localhost/ now shows "nginx / bad gateway"
  2. http://localhost:8081 does not load any page.

Context

I am trying to deploy overleaf on a server which already uses port 80 for another application. With the configuration options not respected, this seems difficult to do.

Technical Info

  • URL:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Signed in as:
  • Project and/or file:

Analysis

Glossary is not printed

I have local installation of the Overleaf Community Version. The defined acronyms are recognized - get printed by \acrshort{} and \acrfull{}, but the glossary won't get printed even if I use the very example for glossaries from the Overleaf documentation.

Steps to Reproduce

\documentclass{article}
\usepackage[acronym]{glossaries}

\makeglossaries

\newacronym{gcd}{GCD}{Greatest Common Divisor}

\newacronym{lcm}{LCM}{Least Common Multiple}

\begin{document}
Given a set of numbers, there are elementary methods to compute 
its \acrlong{gcd}, which is abbreviated \acrshort{gcd}. This process 
is similar to that used for the \acrfull{lcm}.

\clearpage

\printglossary[type=\acronymtype]

\end{document}

Compile using any of the compilers

Expected Behaviour

"Acronyms" glossary should be printed on page 2

Observed Behaviour

Glossary not printed.

Context

Technical Info

Community Edition, sharelatex:with-texlive-full, Win11, Docker v4.12.0

Analysis

No .acn file generated among the project files in overleaf-toolkit\data\sharelatex\data\compiles\xxx. Manual makedictionaries output.acn and re-generation of the pdf fixes this but --- needs to be done manually...?

Define custom file paths

how can I use my own custom locations instead of /var/lib..I was following quick start guide..If I execute bin/up it will take your path /var/lib, but I want to specify in /data01 which is separate Disk.

I have checked docker-compose file in overleaf/bin

Canonicalize data paths

SHARELATEX_DATA_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$SHARELATEX_DATA_PATH")
MONGO_DATA_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$MONGO_DATA_PATH")
REDIS_DATA_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$REDIS_DATA_PATH")

/data01/overleaf/config/overleaf.rc

Overleaf RC

PROJECT_NAME=overleaf

Sharelatex container

SHARELATEX_DATA_PATH=data/sharelatex
SERVER_PRO=false

Sibling Containers

SIBLING_CONTAINERS_ENABLED=false
DOCKER_SOCKET_PATH=/var/run/docker.sock

Mongo configuration

MONGO_ENABLED=true
MONGO_DATA_PATH=data/mongo

Redis configuration

REDIS_ENABLED=true
REDIS_DATA_PATH=data/redis

Can anyone advice on this..How can I pass my custom path for these..in my case / is not system volume and /data01 on seperate 1TB disk which i want to use.Thanks in advance:)

Overleaf Toolkit causes Strato Server to lose entire connection

Steps to Reproduce

  1. Strato V-Server with Ubuntu 20.04.
  2. Follow the instructions of overleaf/toolkit

Expected Behaviour

Eveerything should work, at least my server shouldnt be unreachable.

Observed Behaviour

  1. After running sudo /bin/up, pulling everything etc., mongo and redis starts. After the start of sharelatex (without errors), some time later appears something like "... unable to fork. Ressource temporarly unavailable" in the console. All the files are also created in the data folder.
    After that the entire server is not reachable anymore. I have to restart the strato server (i disabled docker on startup or i wouldnt be able to start the server at that point anymore).
    For some time i can even reach the overleaf page (xxx.xxx.xxx.xxx/launchpad) but im unable to create an admin account.

  2. The doctor says everything is fine.

  3. Strato says here that for web-connections i should use a NAT solution. But i dont really know wheter the sharelatex container uses MAC Adresses or not.

thanks in advance.

How to Manage Users for Localhost Overleaf ?

Hello, I'm deploying a overleaf instance on my own device, and I can login on another device in the same local networks. I can register new users for my team as admin. But I dont know how to manage them. What I want to do is to query all users (whether it's able to see detailed information) and delete some users. Any Help ?

Failed to complete first installation of overleaf

Hello,
I'm completely new to docker in general, so this might just be me being stupid about things (sorry in advance in that case). However: I'm trying to install overleaf community edition on my server, where there's already a webserver running (i.e. ports 80 and 443 are busy). I'm following this guide https://github.com/overleaf/toolkit/blob/master/doc/quick-start-guide.md to start overleaf for the first time; so far I have not touched the config files. When I run bin/up the script starts downloading the required docker images (mongo/redis and sharelatex), however at a certain point I get this error:

Recreating sharelatex ... error

ERROR: for sharelatex  Cannot start service sharelatex: driver failed programming external connectivity on endpoint sharelatex (b163548cf935c8a51c02a9d92887eeec373f7102dd659388be79145f688b88ad): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use

ERROR: for sharelatex  Cannot start service sharelatex: driver failed programming external connectivity on endpoint sharelatex (b163548cf935c8a51c02a9d92887eeec373f7102dd659388be79145f688b88ad): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
ERROR: Encountered errors while bringing up the project.

Which I guess it's due to the fact that port 80 is already taken by the nginx webserver running on the machine. How do I tell the docker image to use a different port? Or am I doing something else wrong? The main system is based on Debian Stable (Buster).

Grunt install is not working to download other repos from toolkit

Steps to Reproduce

  1. clone the overleaf toolkit repo
  2. grunt install

Expected Behaviour

I expected to be able to use grunt install to install the other repositories to allow editing on them

Observed Behaviour

grunt install is not working for me

Context

I would like to be able to work with the document-updater repo and edit it on my local instance of overleaf for research for my masters thesis

Technical Info

I may be missing something on my end for grunt install to work. I mainly need to know if it is possible to install and work on the other overleaf repositories from overleaf/toolkit like it is stated from overleaf/overleaf

thanks!

  • URL:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Signed in as:
  • Project and/or file:

Analysis

Unable to compile XeLaTeX example

Steps to Reproduce

  1. Install overleaf toolkit and docker. Install full texlive and commit changes by following https://github.com/overleaf/overleaf/wiki/Quick-Start-Guide#latex-environment
  2. Try to run this example https://www.overleaf.com/learn/latex/Chinese
  3. Compile the tex and get this result
    image

Expected Behaviour

The same source file can be compiled on overleaf.com
image

Observed Behaviour

As above. No PDF is produced.

Context

Technical Info

====== Overleaf Doctor ======

  • Host Information
    • Not Linux !
    • lsb_release not found !
  • Dependencies
    • bash
      • status: present
      • version info: 3.2.57(1)-release
    • docker
      • status: present
      • version info: Docker version 20.10.17, build 100c701
    • docker-compose
      • status: present
      • version info: docker-compose version 1.29.2, build 5becea4c
    • realpath
      • status: present
      • version info: /Users/chaoranli/Workspace/Github/Others/overleaf-toolkit/--version
      • WARNING: Could not find 'realpath' binary, falling back to custom function
    • perl
      • status: present
      • version info: 5.030003
    • awk
      • status: present
      • version info: awk version 20200816
    • openssl
      • status: present
      • version info: LibreSSL 2.8.3
  • Docker Daemon
    • status: up
      ====== Configuration ======
  • config/version
    • status: present
    • version: 3.2.0
  • config/overleaf.rc
    • status: present
    • values
      • SHARELATEX_DATA_PATH: data/sharelatex
      • SERVER_PRO: false
      • SHARELATEX_LISTEN_IP: 127.0.0.1
      • SHARELATEX_PORT: 80
      • MONGO_ENABLED: true
      • MONGO_IMAGE: mongo:4.4
      • MONGO_DATA_PATH: data/mongo
      • REDIS_ENABLED: true
      • REDIS_DATA_PATH: data/redis
      • NGINX_ENABLED: false
      • NGINX_CONFIG_PATH: config/nginx/nginx.conf
      • TLS_PRIVATE_KEY_PATH: config/nginx/certs/overleaf_key.pem
      • TLS_CERTIFICATE_PATH: config/nginx/certs/overleaf_certificate.pem
      • NGINX_HTTP_LISTEN_IP: 127.0.1.1
      • NGINX_HTTP_PORT: 80
      • NGINX_TLS_LISTEN_IP: 127.0.1.1
      • TLS_PORT: 443
  • config/variables.env
    • status: present
      ====== Warnings ======
      ! This system seems to not be Linux
      ! Could not find 'realpath' binary, falling back to custom function
      ====== End ======
  • URL:
  • Browser Name and version:
  • Operating System and version (desktop or mobile): macOS Monterey 12.5.1
  • Signed in as:
  • Project and/or file:

Analysis

Mongo connection loop

Steps to Reproduce

This had been been running ok for the last two months or so. I noticed the server was down, so logged into the box to see what was going on. The process had stopped, so I tried running bin/up.

Expected Behaviour

Expected the server to start

Observed Behaviour

It seems that mongo is getting stuck in a loop of connecting and disconnecting - see below:

image

get Error with XeLatex

Steps to Reproduce

  1. start the overleaf instance
    2.create a example project
  2. compile with XeLatex

Expected Behaviour

compile success

Observed Behaviour

get Error:Compile Error. Sorry, your LaTeX code couldn't compile for some reason. Please check the errors below for details, or view the raw log.

Context

Technical Info

  • Browser Name and version: chrome 92.0.4515.159
  • Operating System and version (desktop or mobile): ubuntu 16.04, docker:20.10.8,
redis                     5.0       15e36694d7df   3 days ago      98.4MB
mongo                     4.0       9650de099aeb   2 weeks ago     430MB
sharelatex/sharelatex     2.7.0     9ca6a3256fb6   7 weeks ago     4.21GB

SSL out of date

Steps to Reproduce

  1. Setup mailgun.com SMTP
  2. Send a test mail

Expected Behavior

mail sends successfully

Observed Behavior

Error below:

[2022-03-15 00:04:17] INFO: Sending mail using SMTP/2.0.1[client:2.0.1]
[2022-03-15 00:04:17] ERROR: [dTrCV8rSo8s] 140296029108096:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:

[2022-03-15 00:04:17] DEBUG: [dTrCV8rSo8s] Closing connection to the server using "destroy"
[2022-03-15 00:04:17] ERROR: Send Error: 140296029108096:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:

Context

Makes it difficult to setup the mail service

Analysis

It looks like the SSL is out of date and I'm assuming mailgun enforces a higher version of SSL than what overleaf supports.

Work Around

I setup a local postfix server that correctly connects and relays the SMTP and used SMTP unauthed in the container without SSL.

I then add to the docker compose:

extra_hosts:
            - "host.docker.internal:host-gateway"

And variables look like:

[email protected]
SHARELATEX_EMAIL_SMTP_HOST=host.docker.internal
SHARELATEX_EMAIL_SMTP_PORT=25
SHARELATEX_EMAIL_SMTP_SECURE=false
SHARELATEX_EMAIL_SMTP_NAME=ubuntu
SHARELATEX_EMAIL_SMTP_LOGGER=true
SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH=false
SHARELATEX_EMAIL_SMTP_IGNORE_TLS=true

Upgrade to a complete TeXLive installation

On the main quick start guide the instructions say:

LaTeX environment
To save bandwidth, the Overleaf image only comes with a minimal install of TeXLive. To upgrade to a complete TeXLive installation, run the installation script in the Overleaf container with the following command:

$ docker exec sharelatex tlmgr install scheme-full
Alternatively you can install packages manually as you need by replacing scheme-full with the package name.

Note that these changes made inside the sharelatex container with docker exec are ephemeral --- they will be lost if Compose recreates the container. To make them persistent, you can use docker commit:

docker commit sharelatex sharelatex/sharelatex:with-texlive-full
Then edit your docker-compose.yml to use that image:

# ...
services:
    sharelatex:
        image: sharelatex/sharelatex:with-texlive-full
# ...

When using the toolkit, how do you make the changes persistent - I can't find where the docker-compose.yml is stored?

ERROR: failed to register layer: Error processing tar file(exit status 1): write /var/lib/aspell/hu.rws: no space left on device

When installing in an LXD VM, I get this error:

Pulling sharelatex (sharelatex/sharelatex:3.0.1)...
3.0.1: Pulling from sharelatex/sharelatex
c64513b74145: Pull complete
01b8b12bad90: Pull complete
c5d85cf7a05f: Pull complete
b6b268720157: Pull complete
e12192999ff1: Pull complete
d39ece66b667: Pull complete
65599be66378: Pull complete
830af813049c: Extracting [==================================================>]  332.2MB/332.2MB
890baec4b99f: Download complete
f92556d7df37: Download complete
35ae8f448da7: Download complete
c871fa0d355f: Download complete
cffff70e53ac: Download complete
cb20ce21cdc3: Download complete
408a82f96a49: Download complete
030fbeea5e06: Download complete
390237067d7e: Download complete
9e6b406b62da: Download complete
0b007d101b49: Download complete
f6c2540d5ed0: Download complete
d882b182f0d1: Download complete
a27e323f71ff: Download complete
970a88d7f8b2: Download complete
e8f4bc9537a6: Download complete
c431f6593cb1: Download complete
412f124fb46b: Download complete
b6d35ce0796e: Download complete
7607697ed8fb: Download complete
2cc435161520: Download complete
ed91ae586563: Download complete
ERROR: failed to register layer: Error processing tar file(exit status 1): write /var/lib/aspell/hu.rws: no space left on device

Does anyone have this error? Running df -h gives this

Filesystem      Size  Used Avail Use% Mounted on
udev            475M     0  475M   0% /dev
tmpfs            98M  744K   97M   1% /run
/dev/sda2       3.8G  2.0G  1.8G  53% /
tmpfs           487M     0  487M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           487M     0  487M   0% /sys/fs/cgroup
tmpfs            50M   10M   41M  20% /run/lxd_agent
/dev/sda1        99M  3.2M   96M   4% /boot/efi

so I should be okay on storage space.

Wish: Documentation how to setup CE for development.

With the toolkit getting Overleaf CE running is certainly fairly easy. Congrats.

What I didn't figure out or find any documentation about is how to install a system on which one can more easily hack around.
I ended up installing CE as normal, in a container shell renaming /var/www/sharelatex to /var/www/sharelatex-org. Shutting it down, changing lib/docker-compose.base.yml to mount /var/ww/sharelatex to a directory in my home drive, starting it again an in a container shell moving it all back to /var/www/sharelatex so I can easily access and change the files from outside (unfortunately as sudo/root only tough). (the joke here is at the end I didn't modify the container at all and had all my hacking externally working on arms length but anyway)

I guess you have something more sensible in place. Would be nice if there would be guide somewhere, might get you in the long run more pull requests ;)

PS: I'm certainly you're aware that a lot of README.md's still point to the old repositories.. also got me confused at first.

PPS: I fully understand this hasn't got any priority.

Provide support for running in detached mode

Typically, for longer operation you would run in detached mode:

docker-compose ... -d

Passing this to bin/up did not work; I added this as default in the end of the wrapper (bin/docker-compose).

Changes to the environment variable configuration are not applied

Steps to Reproduce

  1. Create a new Overleaf instance. (bin/init)
  2. Make changes to the configuration files.
  3. Run the instance. (bin/start)
  4. Review environment variables in the docker container (bin/shell) with env.
  5. Stop the instance. (bin/stop)
  6. Make changes to the configuration files.
  7. Start the instance again. (bin/start)
  8. Review environment variables as above.

Expected Behaviour

The new environment variables should appear. These are my configuration files:

overleaf.rc

#### Overleaf RC ####

PROJECT_NAME=overleaf

# Sharelatex container
SHARELATEX_DATA_PATH=data/sharelatex
SERVER_PRO=false
SHARELATEX_PORT=127.0.0.1:6543

# Sibling Containers
SIBLING_CONTAINERS_ENABLED=false
DOCKER_SOCKET_PATH=/var/run/docker.sock

# Mongo configuration
MONGO_ENABLED=true
MONGO_DATA_PATH=data/mongo

# Redis configuration
REDIS_ENABLED=true
REDIS_DATA_PATH=data/redis

variables.env

SHARELATEX_APP_NAME=Overleaf Example

ENABLED_LINKED_FILE_TYPES=url,project_file

# Enables Thumbnail generation using ImageMagick
ENABLE_CONVERSIONS=true

# Disables email confirmation requirement
EMAIL_CONFIRMATION_DISABLED=true

# temporary fix for LuaLaTex compiles
# see https://github.com/overleaf/overleaf/issues/695
TEXMFVAR=/var/lib/sharelatex/tmp/texmf-var

SHARELATEX_SITE_URL=https://server5.example.com:2025
SHARELATEX_NAV_TITLE=Overleaf Example
[email protected]

# pasted from https://github.com/overleaf/overleaf/wiki/HTTPS-reverse-proxy-using-Nginx
SHARELATEX_SECURE_COOKIE=true
SHARELATEX_BEHIND_PROXY=true

Other

There is no configuration file in ~/.docker and I have tried to run the container with env -u http_proxy -u https_proxy bin/start. Therefore, I expect there to be no proxy configured.

Observed Behaviour

The old environment variables are still there. Here's an excerpt from env within bin/shell:

HTTP_PROXY=http://squid.example.com:8080
LANG=en_US.UTF-8
WEB_API_USER=sharelatex
HOSTNAME=6a65d416a305
SHARELATEX_SECURE_COOKIE=true
SHARELATEX_SITE_URL=https://server5:2025
ENABLE_CONVERSIONS=true
SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
REDIS_HOST=redis
SHARELATEX_BEHIND_PROXY=true
PWD=/
HOME=/root
[email protected]
https_proxy=https://squid.example.com:8080
DEBIAN_FRONTEND=teletype
http_proxy=http://squid.example.com:8080
SHARELATEX_NAV_TITLE=Overleaf Example
no_proxy=*.example.com
NO_PROXY=*.example.com
HTTPS_PROXY=https://squid.example.com:8080
ENABLED_LINKED_FILE_TYPES=url,project_file
TERM=xterm
SHARELATEX_APP_NAME=Overleaf Example
EMAIL_CONFIRMATION_DISABLED=true
baseDir=.
SHLVL=1
LANGUAGE=en_US:en
SHARELATEX_MONGO_URL=mongodb://mongo/sharelatex
TEXMFVAR=/var/lib/sharelatex/tmp/texmf-var
SHARELATEX_REDIS_HOST=redis
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2020/bin/x86_64-linux
LESSOPEN=| /usr/bin/lesspipe %s
OPTIMISE_PDF=true
_=/usr/bin/env

The SHARELATEX_SITE_URL is still the old one (without .example.com) and the proxies should not be configured at all.

Context

I believe this to be the root cause of the problems described in overleaf/overleaf#802, because Redis and Mongo are trying to connect to localhost over the external proxy, which is destined to fail. However, I have not been able to update the environment variables yet.

Technical Info

  • URL: https://server5.example.com:2025/
  • Browser Name and version: Firefox 81.0.2 (64-Bit)
  • Operating System and version (desktop or mobile): Ubuntu 16.04.6 LTS
  • Signed in as:
  • Project and/or file:

Analysis

Receiving "Unable to connect, please view the connection problems guide to fix the issue."

Steps to Reproduce

Greetings,

I have recently installed Overleaf Toolkit on my Debian 11 server with TLS support. Everything works fine, except for when visiting a document URL. Then I get the following message:

image

However, after 10 seconds, the document is loaded perfectly.

The steps I followed are the ones from Quick start guide:

  1. Executed git clone https://github.com/overleaf/toolkit.git ./overleaf
  2. Executed cd overleaf
  3. Executed bin/init
  4. Executed bin/init --tls
  5. Edited config/overleaf.rc as follows:
#### Overleaf RC ####

PROJECT_NAME=overleaf

# Sharelatex container
SHARELATEX_DATA_PATH=data/sharelatex
SERVER_PRO=false
SHARELATEX_LISTEN_IP=127.0.0.1
SHARELATEX_PORT=7745

# Sibling Containers
SIBLING_CONTAINERS_ENABLED=false
DOCKER_SOCKET_PATH=/var/run/docker.sock

# Mongo configuration
MONGO_ENABLED=true
MONGO_DATA_PATH=data/mongo

# Redis configuration
REDIS_ENABLED=true
REDIS_DATA_PATH=data/redis

# TLS proxy configuration (optional)
# See documentation in doc/tls-proxy.md
NGINX_ENABLED=true
NGINX_CONFIG_PATH=config/nginx/nginx.conf
NGINX_HTTP_PORT=7746
# Replace these IP addresses with the external IP address of your host
NGINX_HTTP_LISTEN_IP=192.168.1.1
NGINX_TLS_LISTEN_IP=0.0.0.0
TLS_PRIVATE_KEY_PATH=config/nginx/certs/overleaf_key.pem
TLS_CERTIFICATE_PATH=config/nginx/certs/overleaf_certificate.pem
TLS_PORT=7744
  1. Uncommented the following lines in overleaf/variables.env:
SHARELATEX_BEHIND_PROXY=true
SHARELATEX_SECURE_COOKIE=true
  1. Edited overleaf/nginx/nginx.conf as follows:
events {}

http {

    server {
        listen 80 default_server;
        server_name _;
        return 301 https://$host$request_uri;
    }


    server {
        listen 443 ssl;

        ssl_certificate      /certs/nginx_certificate.pem;
        ssl_certificate_key  /certs/nginx_key.pem;

        ssl_protocols               TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers   on;

        # used cloudflares ciphers https://github.com/cloudflare/sslconfig/blob/master/conf
        ssl_ciphers                 EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;

        # config to enable HSTS(HTTP Strict Transport Security) https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security
        # to avoid ssl stripping https://en.wikipedia.org/wiki/SSL_stripping#SSL_stripping
        add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";

        server_tokens off;

        client_max_body_size 50M;

        location / {
            proxy_pass http://sharelatex:80; # The port must match the value of SHARELATEX_PORT.
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_read_timeout 3m;
            proxy_send_timeout 3m;
        }
    }
}

(yes, I use http://sharelatex:80 in proxy_pass because using the SHARELATEX_PORT didn't work. I also tried many other combinations...)

  1. Executed bin/up

It is really strange that I get this error only on my desktop (Windows) with Chrome and only when accessing the server remotely. When accessing through Firefox or through my mobile phone (Chrome), the error disappears. Please also note that the server is behind a software firewall (iptables) that blocks all remote connections (except for the ports used by ShareLaTeX) and forwards the WAN ports to 192.168.1.1.

Thank you in advance.

Ilias

Refused to display 'http://localhost/project' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Steps to Reproduce

image

Expected Behaviour

overleaf should work similarly in an iframe (react js app) as it normally runs in the chrome browser directly.

Observed Behaviour

Context

I am creating a personal website to organize my doctoral thesis website. I am using <iframe/> to display Jupyter notebook, diagrams etc. As I work with overleaf, I want to show my *.tex files on my personal website using overleaf.

Technical Info

Possible solution: Please tell me how to set 'X-Frame-Options' to default allow-all.
FYI I am not a web developer so tell me if something else is required to show the overleaf website in an iframe.

  • URL:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Signed in as:
  • Project and/or file:

Analysis

Review and Comment function is missing?

Thanks for your nice work!

Steps to Reproduce

  1. I installed the overleaf community edition (toolkit) as the guide suggests. The system is running well.
  2. I created a project and shared it with one of the team members.
  3. The review and comment function is still not visible in the project interface.

Expected Behaviour

As shown in the project teaser, the comment and review function should exist.

Observed Behaviour

The comment and review functions are not visible.

Context

It is hard to collaborate with team members.
Or maybe it is not available for the community edition?

Can access webportal not using default port

Steps to Reproduce

Change the port to 8585, as port 80 is already in use.

Expected Behaviour

Overleaf web portal.

Observed Behaviour

ERR_CONNECTION_REFUSED

Analysis

Doctor, says no warnings. NGINX is disabled. And no errors in logs.

write18 is disabled

Hy,
I just discovered the possibility of overleaf and I installed an instanced today. Everything work fine but I'm using in all my project build on miktex the tks-fct library to draw functions. It works well on miktex and I try on overleaf online and it worked well too.

But when I try to compile on my own sharelatex instance following your docker install guide, I can't compil the project. In the log, I can see that "restricted \write18 enable". I don't have the problem on the online version.
I tried to use a "texmkrc" file but it has no effect on the compilation process.

In installed all library using full-scheme and gnuplot in the sharelatex docker.

Where can I say that I want to compile with write18 enabled ?

Thank's a lot

Toolkit Quick-Start Guide dosn't work for me on Synology916+ with DSM 7

Steps to Reproduce

I am new to docker and Linux.
I followed the Quick-Start Guide to the point 'Starting up'. I run $ bin/up and then...

Expected Behaviour

Docker compose I think

Observed Behaviour

After the download processes ended:
`Starting mongo ... error
Starting redis ...

Starting redis ... error

ERROR: for redis Cannot start service redis: Bind mount failed: '/root/overleaf/data/redis' does not exists

ERROR: for mongo Cannot start service mongo: Bind mount failed: '/root/overleaf/data/mongo' does not exists

ERROR: for redis Cannot start service redis: Bind mount failed: '/root/overleaf/data/redis' does not exists
ERROR: Encountered errors while bringing up the project.`

Context

I've run $bin/doctor
`====== Overleaf Doctor ======

  • Host Information
    • Linux
    • lsb_release not found !
  • Dependencies
    • bash
      • status: present
      • version info: 4.4.23(1)-release
    • docker
      • status: present
      • version info: Docker version 20.10.3, build b455053
    • docker-compose
      • status: present
      • version info: docker-compose version 1.28.5, build 324b023a
    • realpath
      • status: present
      • version info: realpath (GNU coreutils) 8.30
    • perl
      • status: present
      • version info: 5.028003
    • awk
      • status: present
      • version info: GNU Awk 5.0.0, API: 2.0 (GNU MPFR 4.0.1, GNU MP 6.1.2)
    • openssl
      • status: present
      • version info: OpenSSL 1.1.1k 25 Mar 2021
  • Docker Daemon
    • status: up
      ====== Configuration ======
  • config/version
    • status: present
    • version: 3.0.1
  • config/overleaf.rc
    • status: present
    • values
      • SHARELATEX_DATA_PATH: data/sharelatex
      • SERVER_PRO: false
      • SHARELATEX_LISTEN_IP: 127.0.0.1
      • SHARELATEX_PORT: 80
      • MONGO_ENABLED: true
      • MONGO_DATA_PATH: data/mongo
      • REDIS_ENABLED: true
      • REDIS_DATA_PATH: data/redis
      • NGINX_ENABLED: false
      • NGINX_CONFIG_PATH: config/nginx/nginx.conf
      • TLS_PRIVATE_KEY_PATH: config/nginx/certs/overleaf_key.pem
      • TLS_CERTIFICATE_PATH: config/nginx/certs/overleaf_certificate.pem
      • NGINX_HTTP_LISTEN_IP: 127.0.1.1
      • NGINX_HTTP_PORT: 80
      • NGINX_TLS_LISTEN_IP: 127.0.1.1
      • TLS_PORT: 443
  • config/variables.env
    • status: present
      ====== Warnings ======
  • None, all good
    ====== End ======`

Technical Info

I enabled ssh and I'm using PowerShell on Windows 10 to access my Synology. I've done everything as root@MyServer.

Analysis

I'm sure its either me doing something incorrectly or my Synology isn't supported by quick start guide and I should've use some other guide.

Cannot access http://localhost/launchpad after bin/start

Steps to Reproduce

I followed the Quick-Start Guide to build overleaf in my linux server. However, after all steps, I still cannot access http://localhost/launchpad and I did not get any error messages.

  1. Clone repo using git clone https://github.com/overleaf/toolkit.git ./overleaf .
  2. Run sudo bin/init to create configuration files.
  3. Replace NGINX_HTTP_LISTEN_IP/NGINX_TLS_LISTEN_IP with the external IP address of my host in config/overleaf.rc .
  4. Run sudo bin/up to start the docker services.

Expected Behaviour

What I expected is I can access http://localhost/launchpad, however I just got a ERR_CONNECTION_REFUSED error in browser.

Observed Behaviour

  • sudo bin/error-logs displayed nothing.
  • I ran sudo bin/doctor and seems everything went well:
====== Overleaf Doctor ======
- Host Information
    - Linux
    - Output of 'lsb_release -a':
            No LSB modules are available.
            Distributor ID:     Ubuntu
            Description:        Ubuntu 18.04.4 LTS
            Release:    18.04
            Codename:   bionic
- Dependencies
    - bash
        - status: present
        - version info: 4.4.20(1)-release
    - docker
        - status: present
        - version info: Docker version 20.10.7, build 20.10.7-0ubuntu5~18.04.3
    - docker-compose
        - status: present
        - version info: docker-compose version 1.17.1, build unknown
    - realpath
        - status: present
        - version info: realpath (GNU coreutils) 8.28
    - perl
        - status: present
        - version info: 5.026001
    - awk
        - status: present
        - version info: GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1, GNU MP 6.1.2)
    - openssl
        - status: present
        - version info: OpenSSL 1.1.1  11 Sep 2018
- Docker Daemon
    - status: up
====== Configuration ======
- config/version
    - status: present
    - version: 3.0.1
- config/overleaf.rc
    - status: present
    - values
        - SHARELATEX_DATA_PATH: data/sharelatex
        - SERVER_PRO: false
        - SHARELATEX_LISTEN_IP: 127.0.0.1
        - SHARELATEX_PORT: 80
        - MONGO_ENABLED: true
        - MONGO_DATA_PATH: data/mongo
        - REDIS_ENABLED: true
        - REDIS_DATA_PATH: data/redis
        - NGINX_ENABLED: false
        - NGINX_CONFIG_PATH: config/nginx/nginx.conf
        - TLS_PRIVATE_KEY_PATH: config/nginx/certs/overleaf_key.pem
        - TLS_CERTIFICATE_PATH: config/nginx/certs/overleaf_certificate.pem
        - NGINX_HTTP_LISTEN_IP: localhost
        - NGINX_HTTP_PORT: 80
        - NGINX_TLS_LISTEN_IP: localhost
        - TLS_PORT: 443
- config/variables.env
    - status: present
====== Warnings ======
- None, all good
====== End ======

And containers seems working well:

CONTAINER ID   IMAGE                         COMMAND                  CREATED          STATUS                    PORTS                  NAMES
6a9fd1c2107d   sharelatex/sharelatex:3.0.1   "/sbin/my_init"          46 minutes ago   Up 41 minutes             127.0.0.1:80->80/tcp   sharelatex
4dc7aa600bd1   mongo:4.0                     "docker-entrypoint.s…"   2 hours ago      Up 42 minutes (healthy)   27017/tcp              mongo
8a1b5a4fd880   redis:5.0                     "docker-entrypoint.s…"   2 hours ago      Up 42 minutes             6379/tcp               redis

Context

When I ran sudo bin/up, there are some logs like:

mongo         | 2021-11-20T15:13:07.712+0000 I NETWORK  [conn44] end connection 127.0.0.1:34340 (10 connections now open)
mongo         | 2021-11-20T15:13:17.816+0000 I NETWORK  [listener] connection accepted from 127.0.0.1:34342 #45 (11 connections now open)
mongo         | 2021-11-20T15:13:17.817+0000 I NETWORK  [conn45] received client metadata from 127.0.0.1:34342 conn45: { application: { name: "MongoDB Shell" }, driver: { name: "MongoDB Internal Client", version: "4.0.27" }, os: { type: "Linux", name: "Ubuntu", architecture: "x86_64", version: "16.04" } }
mongo         | 2021-11-20T15:13:17.820+0000 I NETWORK  [conn45] end connection 127.0.0.1:34342 (10 connections now open)

Technical Info

Analysis

Keep TexLive install after upgrade

This is some sort of feature request.
The setup guide for a full TexLive installs says we have to re download it on every upgrade.

What about using tlmgr backup to keep the installed packages somwhere on the system und re install them after an upgrade?
On restore we could also install updates so the user wouldnt have to do this manually.

compiling has stopped working (again)

Yesterday, I re-installed Overleaf Community Edition on our server because compilation was failing for all the users. So, I removed the old instance and re-installed from the scratch using the Toolkit. Things were working yesterday when I left work, and although we didn't know what caused the problem, we decided not to investigate it because we had a working system.

This morning, however, we're back into the same state. Opening a project, any project, even a new one, results in nothing appearing on the right-hand side, except the eventual "Server Error Sorry, something went wrong and your project could not be compiled. Please try again in a few moments." Creating new projects, deleting projects, renaming files, etc., all works, except the compiling of the LaTeX files. The problem is NOT in the LaTeX themselves; I can enter a shell in containers and run pdflatex on them manually and things work just fine.

I can't find any log that shows any error occurring related to compiling. How do I figure out what is causing this problem?

cp: cannot create regular file '/overleaf-toolkit/config/nginx/': Not a directory

Steps to Reproduce

$ git clone https://github.com/overleaf/toolkit.git overleaf-toolkit
$ cd overleaf-toolkit/bin
$ ./init --help

Usage: bin/init [OPTION]

Initialises local configuration files in the 'config/' directory

--help display this help and exit
--tls Initialises local configuration with NGINX config, or
adds NGINX config to an existing local configuration
$
$ ./init --tls
Generate example self-signed TLS cert
cp: cannot create regular file '/home/user/GIT-REPROs/overleaf-toolkit/config/nginx/': Not a directory
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)

Generate example self-signed TLS cert
cp: cannot create regular file '/home/user/GIT-REPROs/overleaf-toolkit/config/nginx/': Not a directory

Analysis

the bin/init script don't handle the current directory correct.

IP binding Issue

Server Config

  • Ubuntu 18.04
  • /bin/bash

Installation

1.sudo apt-get install docker docker-composer
2.git clone https://github.com/overleaf/toolkit.git ./overleaf
3.cd overleaf
4.bin/init

Running

I changed config/overleaf.rc: SHARELATEX_PORT=6000 because 80 is already in use by apache for the main webpage. Then I ran,

  1. sudo ufw allow 6000
  2. sudo ufw allow 6000\tcp
  3. sudo bin/up

Everything is working fine, no error found. Here are the last lines of bin/doctor:

====== Configuration ======
- config/version
    - status: present
    - version: 2.4.2
- config/overleaf.rc
    - status: present
    - values
        - SHARELATEX_DATA_PATH: data/sharelatex
        - SERVER_PRO: false
        - SHARELATEX_PORT: 6000
        - MONGO_ENABLED: true
        - REDIS_ENABLED: true
- config/variables.env
    - status: present
====== Warnings ======
- None, all good
====== End ======

Checking

docker port sharelatex will return:

80/tcp -> 0.0.0.0:6000

Accessing from browser

Now, if I am giving my server IP address(for example 172.12.34.8) in a browser, it will take me to my webpage. but if I am trying to access overleaf by 172.12.34.8:6000 or 172.12.34.8:6000\launchpad it won't work.

Thank you,
A.

Loading of projects is disrupted when running behind a reverse proxy

Steps to Reproduce

  1. Running the overleaf docker listening on 127.0.0.1:8080 and exposing it via an Apache 2.4 reverse proxy at https://overleaf.my-own-server.com.
  2. Opening a project on the main landing page via the reverse proxy, (like https://overleaf.my-own-server.com/project/6165d8edd4574600848adecc

Expected Behaviour

Project should load without interruptions or significant delay, when using the reverse proxy.

Observed Behaviour

Loading any project hangs for about 20s showing
image
Then, all of a sudden, that the project continues loading normally and everything seems to work fine.
Via 127.0.0.1:8080 directly, the project loads immediately not having any delays.

Technical Info

The virtual host config file looks like this:

<VirtualHost *:443>
  ServerName overleaf.my-own-server.com
   ProxyRequests off
   ProxyPass / http://localhost:8080/
   ProxyPassReverse / http://localhost:8080/
   SSLCertificateFile /path/to/fullchain.pem
   SSLCertificateKeyFile /path/to/privkey.pem
</VirtualHost>

Analysis

The delay happens between loading

wss://overleaf.my-own-server.com/socket.io/1/websocket/a8xcva-aOsA4d_AE1r_v

and

https://overleaf.my-own-server.com/socket.io/1/xhr-polling/a8xcva-aOsA4d_AE1r_v?t=1634110147712

Apart from that, the DOM loading cascade shows no abnormalities (no other return codes than 200 and 206)

Docker image can not run arm64 pi(ubuntu 20.04LTS)

This image is based on x86-64 device.
But did not work on arm64 device because of architecture.

Error showed in running process: standard_init_linux.go:211: exec user process caused "exec format error"

Local Installation Issues running bin/init

Steps to Reproduce

  1. Follow the local installation guide
  2. Run bin/init
  3. bin/init requests to choose an app to open the file with so config files are never created

Expected Behaviour

When trying to run bin/init for installation it does not execute the script and create the config files as I would expect it to

Observed Behaviour

bin/init pops up a menu asking which program I'd like to open the file with rather than running the init script

Context

I cannot do local installation of overleaf

Technical Info

  • URL:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Signed in as:
  • Project and/or file:

Analysis

Got 502 error when hosting on Macbook Pro (M1)

Hi,

I'm going to host this docker instance on my Macbook Pro (M1) but got stuck in an error.
Don't you support M1 MBP to host this image? Actually, I don't see any document mention about that.

Steps to Reproduce

  1. git clone toolkit repo as described in README.md
  2. bin/init and change port binding (80 to 8080)
  3. bin/up and access to http://localhost:8080

Expected Behaviour

See an Overleaf page

Observed Behaviour

502 Bad Gateway

Context

Host Overleaf image on Macbook Pro (M1)

Technical Info

bin/doctor

====== Overleaf Doctor ======
- Host Information
    - Not Linux !
    - lsb_release not found !
- Dependencies
    - bash
        - status: present
        - version info: 3.2.57(1)-release
    - docker
        - status: present
        - version info: Docker version 20.10.6, build 370c289
    - docker-compose
        - status: present
        - version info: docker-compose version 1.29.1, build c34c88b2
    - realpath
        - status: present
        - version info: /Users/*****/Tools/overleaf/--version
        - WARNING: Could not find 'realpath' binary, falling back to custom function
    - perl
        - status: present
        - version info: 5.030002
    - awk
        - status: present
        - version info: awk version 20200816
    - openssl
        - status: present
        - version info: LibreSSL 2.8.3
- Docker Daemon
    - status: up
====== Configuration ======
- config/version
    - status: present
    - version: 2.6.1
- config/overleaf.rc
    - status: present
    - values
        - SHARELATEX_DATA_PATH: data/sharelatex
        - SERVER_PRO: false
        - SHARELATEX_PORT: 8080
        - MONGO_ENABLED: true
        - MONGO_DATA_PATH: data/mongo
        - REDIS_ENABLED: true
        - REDIS_DATA_PATH: data/redis
        - NGINX_ENABLED: false
        - NGINX_CONFIG_PATH: config/nginx/nginx.conf
        - TLS_PRIVATE_KEY_PATH: config/nginx/certs/overleaf_key.pem
        - TLS_CERTIFICATE_PATH: config/nginx/certs/overleaf_certificate.pem
- config/variables.env
    - status: present
====== Warnings ======
! This system seems to not be Linux
! Could not find 'realpath' binary, falling back to custom function
====== End ======

tail /var/log/nginx/error.log after accessed to http://localhost:8080/

2021/06/06 16:45:54 [error] 426#426: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: _, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "localhost:8080"
2021/06/06 16:45:54 [error] 426#426: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico", host: "localhost:8080", referrer: "http://localhost:8080/"

Analysis

Can't update TexLive

Steps to Reproduce

  1. run bin/docker-compose exec sharelatex tlmgr install scheme-full
  2. and then run bin/docker-compose exec sharelatex tlmgr update --self

Expected Behaviour

That the full install of TexLive gets installed, and that the tlmgr gets updated

Observed Behaviour

When I ran bin/docker-compose exec sharelatex tlmgr install scheme-full I got this:

root@debian-vps-zaregg:~/GitHub/overleaf# bin/docker-compose exec sharelatex tlmgr install scheme-full
tlmgr: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (verified)
===============================================================================
tlmgr itself needs to be updated.
Please do this via either
  tlmgr update --self
or by getting the latest updater for Unix-ish systems:
  http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh
and/or Windows systems:
  http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.exe
Then continue with other updates as usual.
===============================================================================
tlmgr: Terminating; please see warning above!

Then I ran bin/docker-compose exec sharelatex tlmgr update --self which outputted:

root@debian-vps-zaregg:~/GitHub/overleaf# bin/docker-compose exec sharelatex tlmgr update --self
tlmgr: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (verified)
[1/1, ??:??/??:??] update: texlive.infra [225k] (58811 -> 59154) ... Use of uninitialized value $pwd in concatenation (.) or string at /usr/local/texlive/2021/tlpkg/TeXLive/TLUtils.pm line 633.
/usr/local/texlive/2021/bin/x86_64-linux/tlmgr: system(tar -cf /tmp/zXvwaE8Bdd/eVxvDpfTRF/__BACKUP_texlive.infra.r58811.tar LICENSE.CTAN LICENSE.TL release-texlive.txt texmf-dist/scripts/texlive/mktexlsr texmf-dist/scripts/texlive/tl-errmess.vbs texmf-dist/scripts/texlive/tlmgr.pl texmf-dist/scripts/texlive/tlmgrgui.pl texmf-dist/scripts/texlive/uninstall-win32.pl texmf-dist/scripts/texlive/uninstq.vbs texmf-dist/web2c/fmtutil-hdr.cnf texmf-dist/web2c/updmap-hdr.cfg tlpkg/TeXLive/TLConfFile.pm tlpkg/TeXLive/TLConfig.pm tlpkg/TeXLive/TLCrypto.pm tlpkg/TeXLive/TLDownload.pm tlpkg/TeXLive/TLPDB.pm tlpkg/TeXLive/TLPOBJ.pm tlpkg/TeXLive/TLPSRC.pm tlpkg/TeXLive/TLPaper.pm tlpkg/TeXLive/TLTREE.pm tlpkg/TeXLive/TLUtils.pm tlpkg/TeXLive/TLWinGoo.pm tlpkg/TeXLive/TeXCatalogue.pm tlpkg/TeXLive/trans.pl tlpkg/gpg/pubring.gpg tlpkg/gpg/random_seed tlpkg/gpg/secring.gpg tlpkg/gpg/tl-key-extension.txt tlpkg/gpg/trustdb.gpg tlpkg/installer/config.guess tlpkg/tlpobj/texlive.infra.tlpobj) failed in , status -1 at /usr/local/texlive/2021/tlpkg/TeXLive/TLUtils.pm line 633.

Context

Hi, I have been trying to update TexLive, but i really cant figure it out. I've tried to change the repository and the fixes that i could find online. I wanted to update TexLive so that i can use more libraries in my projects.

Technical Info

  • URL: N/A
  • Browser Name and version: N/A
  • Operating System and version: Debian 4.9.0-15-amd64 #1 SMP Debian 4.9.258-1 (2021-03-08) x86_64 GNU/Linux
  • Signed in as: root
  • Project and/or file: /root/overleaf/

Analysis

Unclear message in bin/upgrade

Just upgrading 3.0.1 to 3.1.0
I got following message:

At this point, we recommend backing up your data before proceeding
!! WARNING: Only do this while the docker services are stopped!!
Proceed? [y/n]

Please note it's unclear what it means. Proceed with what, proceed with the script doing the backup, or is the script expecting me to have done the backup and then proceed with the upgrade.

I experienced now, it means the former, but please improve the wording to make it clear what it asks to proceed with.

How to set up TLS when port 443 is already used

I have installed overleaf using the toolkit, and everything works fine when I access it via http. However, I would like to set this up to use https so that I could access my overleaf instance remotely. The problem is that I am already using ports 80 and 443 for a nextcloud instance.

I thought that it would be trivial to change the ports in the config files to use another port, but I have not been able to get this to work. When accessing my server on my local network with the new port, I simply get redirected to 127.0.0.1 on my local machine (not the machine where overleaf is installed). I don't fully understand how nginx works, and that might be part of my problem.

What I did was the following:

In config/overleaf.rc, I changed SHARELATEX_LISTEN to 127.0.0.1 with the port 2500. I enabled NGINX, changed the HTTP/HTTPS ports to 8888/8443, and set NGINX_TLS_LISTEN_IP to 0.0.0.0, with NGINX_HTTP_LISTEN to 127.0.1.1.

In addition to this, I uncommented the two TLS lines in config/variables.rc Finally, in config/nginx/nginx.conf, I changed the port number http://sharelatex:2500 to match what I used for SHARELATEX_PORT.

I have tried a million permutations, and haven't been able to get this to work. Even if I am doing something really dumb, it probably would be a good idea to improve the documentation for people like me.

Steps to Reproduce

config/overlear.rc

#### Overleaf RC ####

PROJECT_NAME=overleaf

# Sharelatex container
SHARELATEX_DATA_PATH=data/sharelatex
SERVER_PRO=false
SHARELATEX_LISTEN_IP=127.0.0.1
SHARELATEX_PORT=2500

# Sibling Containers
SIBLING_CONTAINERS_ENABLED=false
DOCKER_SOCKET_PATH=/var/run/docker.sock

# Mongo configuration
MONGO_ENABLED=true
MONGO_DATA_PATH=data/mongo

# Redis configuration
REDIS_ENABLED=true
REDIS_DATA_PATH=data/redis

# TLS proxy configuration (optional)
# See documentation in doc/tls-proxy.md
NGINX_ENABLED=true
NGINX_CONFIG_PATH=config/nginx/nginx.conf
NGINX_HTTP_PORT=8888
# Replace these IP addresses with the external IP address of your host
NGINX_HTTP_LISTEN_IP=127.0.1.1
NGINX_TLS_LISTEN_IP=0.0.0.0
TLS_PRIVATE_KEY_PATH=config/nginx/certs/overleaf_key.pem
TLS_CERTIFICATE_PATH=config/nginx/certs/overleaf_certificate.pem
TLS_PORT=8443

config/nginx/nginx.conf

events {}

http {

    server {
        listen 80 default_server;
        server_name _;
        return 301 https://$host$request_uri;
    }


    server {
        listen 443 ssl;

        ssl_certificate      /certs/nginx_certificate.pem;
        ssl_certificate_key  /certs/nginx_key.pem;

        ssl_protocols               TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers   on;

        # used cloudflares ciphers https://github.com/cloudflare/sslconfig/blob/master/conf
        ssl_ciphers                 EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;

        # config to enable HSTS(HTTP Strict Transport Security) https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security
        # to avoid ssl stripping https://en.wikipedia.org/wiki/SSL_stripping#SSL_stripping
        add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";

        server_tokens off;

        client_max_body_size 50M;

        location / {
            proxy_pass http://sharelatex:2500; # The port must match the value of SHARELATEX_PORT.
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_read_timeout 3m;
            proxy_send_timeout 3m;
        }
    }
}

How to restart/stop the Docker context?

Currently, I don't see how to tell the docker-compose wrapper script to restart either stop the service.

Especially restarting is essential in the try out phase while tuning config files. I like the toolkit indeed very much! Quite complex service environment as turnkey script: nice. :-)

My current workaround for restarting: restart the Docker daemon service of the test machine.

Problem in bin/doctor script awk version detection

Steps to Reproduce

Calling bin/doctor on Debian Buster default installs fails due to awk error:

[...]
- Dependencies
[...]
    - awk
        - status: present
awk: not an option: --version

Expected Behaviour

I would expect the doctor script to output the awk version correctly.

Technical Info

/bin/doctor assumes that gawk variant is installed and selected as standard awk-variant. The assumption that this variant is available fails with standard Debian installations (and Ubuntu, too, if I remember right), as the standard awk-variant there is mawk, which has no '--version' parameter.

Analysis

I worked around the problem by installing gawk and selecting it as the system standard via update-alternatives.

This bug can be fixed by not assuming that gawk responds when calling 'awk'. The --version parameter is gawk specific; a better variant for version analysis is looking at the output of 'awk -W version', which works on both (and maybe some more) variants.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.