# Add Overleaf as an app?

**URL:** https://discuss.freedombox.org/t/add-overleaf-as-an-app/2540
**Category:** Development
**Created:** [April 10, 2023, 11:50am UTC](https://discuss.freedombox.org/t/add-overleaf-as-an-app/2540 "2023-04-10T11:50:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![charlesfox](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/c/ea5d25/32.png) [@charlesfox](https://discuss.freedombox.org/u/charlesfox)
#### Post date: [April 10, 2023, 11:50am UTC](https://discuss.freedombox.org/t/add-overleaf-as-an-app/2540/1 "2023-04-10T11:50:34Z")

</div>

**Summary**

Overleaf is an open source collaborative latex editor. It can be installed on your own server then provides a web interface for multiple users to edit, compile, and view the document. It is now heavily used in academia especially. It would be useful to include it as a freedombox app to reduce the difficultly of installation.

**Solution**  
There are a few sites with regular install instructions available, such as

> **[Overleaf CE - Self Host your own LaTeX-Server \[Tutorial\] - Felix Tech-Blog](https://blog.felixviola.de/overleaf-ce-self-host-your-own-latex-server-tutorial/)**
>
> This tutorial takes you through the steps on how to self host Overleaf on your own Hardware. Also: Update TeX-Live to the newest Version

However AFAIK they are mostly using a method based on docker and containers, which might not be suitable for smaller freedomboxes. It is hard to find install instructions which don’t rely on containers.

**Tasks**  
Look around for any more suitable install instructions  
If available, use them. Otherwise would need to study the source code directly.  
Package overleaf first as a regular debian package  
Then figure out how to wrap it as a freedombox app.

---

<div class="post-metadata">

### Author: ![charlesfox](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/c/ea5d25/32.png) [@charlesfox](https://discuss.freedombox.org/u/charlesfox)
#### Post date: [April 13, 2023, 8:11am UTC](https://discuss.freedombox.org/t/add-overleaf-as-an-app/2540/2 "2023-04-13T08:11:10Z")

</div>

A bit more information on this: looks like there is a .deb package and tool for generating it available for an 2015 version of overleaf here, [Debian/Ubuntu package generation removed · Issue #292 · overleaf/overleaf · GitHub](https://github.com/overleaf/overleaf/issues/292) . Hasn’t been updated since then as the main overleaf team have been focussed on the docker version. But either the 2015 deb could be used as is, or it could be updated to later versions.

---

<div class="post-metadata">

### Author: ![jvalleroy](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/jvalleroy/32/331_2.png) [@jvalleroy](https://discuss.freedombox.org/u/jvalleroy)
#### Post date: [April 14, 2023, 2:11pm UTC](https://discuss.freedombox.org/t/add-overleaf-as-an-app/2540/3 "2023-04-14T14:11:23Z")

</div>

I added it to [FreedomBox wiki - Leaving The Cloud](https://wiki.debian.org/FreedomBox/LeavingTheCloud), but I’m concerned about the dependency on MongoDB. As I understand, it is currently under a license that cannot be used in Debian (main).

---

<div class="post-metadata">

### Author: ![charlesfox](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/c/ea5d25/32.png) [@charlesfox](https://discuss.freedombox.org/u/charlesfox)
#### Post date: [December 3, 2023, 12:17pm UTC](https://discuss.freedombox.org/t/add-overleaf-as-an-app/2540/4 "2023-12-03T12:17:55Z")

</div>

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](https://download.docker.com/linux/debian/gpg) | apt-key add -  
add-apt-repository “deb [arch=amd64] [Index of linux/debian/](https://download.docker.com/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-$](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](https://github.com/overleaf/toolkit.git) ./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](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](https://freedombox.local:8443) or remotely as [https://mydomain.com:8443](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](mailto:--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.

---

<div class="post-metadata">

### Author: ![charlesfox](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/c/ea5d25/32.png) [@charlesfox](https://discuss.freedombox.org/u/charlesfox)
#### Post date: [February 10, 2025, 9:01am UTC](https://discuss.freedombox.org/t/add-overleaf-as-an-app/2540/5 "2025-02-10T09:01:38Z")

</div>

Just came across this for anyone interested in a freedombox overleaf: a port of overleaf to golang which appears to also replace mongodb with postgres. So it should be licence compatible unlike the original: [GitHub - das7pad/overleaf-go: Golang port of Overleaf](https://github.com/das7pad/overleaf-go)

---

<div class="post-metadata">

### Author: ![sward](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@sward](https://discuss.freedombox.org/u/sward)
#### Post date: [June 26, 2026, 1:09pm UTC](https://discuss.freedombox.org/t/add-overleaf-as-an-app/2540/6 "2026-06-26T13:09:30Z")

</div>

[FerretDB](https://github.com/FerretDB/FerretDB) claims to be a drop-in replacement for MongoDB. It proxies the MongoDB wire protocol to a PostgreSQL backend.
