Thanks for adding to the wiki. Hmm, the mongo dependency sounds tricky, so I wonder how can overleaf claim to be open source if it relies on a non-open component there? Maybe someone will need to fork overleaf to use a different database?
For the meantime, I figured out how to install overleaf onto freedombox manually, rather than creating it as a plinth app. I’m copying my recipe below in case useful for others.
Installing Docker:
su
apt update && apt full-upgrade && apt auto-remove
apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository “deb [arch=amd64] Index of linux/debian/ $(lsb_release -cs) stable”
apt update
apt install docker-ce
systemctl status docker
curl -L “https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)” -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
Installing Overleaf on Docker:
mkdir git; cd git
git clone GitHub - overleaf/toolkit ./overleaf
cd overleaf
bin/init
bin/init --tls
vi config/overleaf.rc
change this lines to, replacing <X.Y> with the servers LOCAL ip:
SHARELATEX_LISTEN_IP=0.0.0.0
SHARELATEX_PORT=8080
nginx_enabled=true
NGINX_HTTP_PORT=8081
NGINX_HTTP_LISTEN=192.168.<X.Y>
NGINX_HTTP_LISTEN=192.168.<X.Y>
TLS_PRIVATE_KEY_PATH=/etc/dovecot/letsencrypt//privkey.pem
TLS_CERTIFICATE_PATH=/etc/dovecot/letsencrypt//cert.pem
TLS_PORT=8443
Upgrade overleaf to full tex install: (this is done inside the container’s own shell):
bin/shell
wget https://mirror.clientvps.com/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xf install-tl-unx.tar.gz
rm install-tl-unx.tar.gz
cd install-tl-*
perl install-tl
At the prompt, enter command: i
This may take an hour to install – full tex is big!
Ctrl-D to exit the container, back to server
The following configures the system to start overleaf on boot:
$ vi /etc/systemd/system/myoverleaf.service
and paste in
Description= My Overleaf Service
Wants=network.target
After=syslog.target network-online.target
[Service]
Type=simple
ExecStart=/home/username/git/overleaf/bin/up
Restart=on-failure
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target
$ systemctl daemon-reload
$ systemctl enable myoverleaf
$ systemctl start myoverleaf
$ systemctl status myoverleaf
Reboot freedombox (eg from plinth) and test overleaf its running on reboot
can now access overleaf on local network https://freedombox.local:8443 or remotely as https://mydomain.com:8443
To create the admin user:
bin/docker-compose exec sharelatex /bin/bash -c “grunt user:create-admin --email=myname@myemail.com”
This outputs a URL with a secret in it. Go to this URL on the server to set the admin password.
The admin can then add users from the web interface on the home page.