Skip to content

Instantly share code, notes, and snippets.

@corusm
Last active December 3, 2020 07:22
Show Gist options
  • Save corusm/95a13bc2db84cad758f2ce27c5609711 to your computer and use it in GitHub Desktop.
Save corusm/95a13bc2db84cad758f2ce27c5609711 to your computer and use it in GitHub Desktop.

Self-Host Sharelatex Server

Create user

User erstellen mit Homeverzeichnis useradd -m test

Install Docker

Arch Linux (yay)

yay -S docker

Debian / Ubuntu (apt)

sudo apt install docker

Enable Docker Service

sudo systemctl enable docker

sudo systemctl start docker

Install Sharelatex

1. Download docker-compose.yml

costum docker-compose.yml

2. docker-compose.yml

Edit the Hostname in the nginx-Block.

3. Start ShareLatex Server

Execute the docker-compose File.

sudo docker-compose up

4. Install Texlife

sudo docker exec sharelatex tlmgr install scheme-full

5. Create User

Change E-Mail to yours.

sudo docker exec sharelatex /bin/bash -c "cd /var/www/sharelatex; grunt user:create-admin [email protected]"

6. Install Latex Packages

sudo docker exec sharelatex wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
sudo docker exec sharelatex tar xvfz install-tl-unx.tar.gz
sudo docker exec sharelatex wget http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh -O /usr/local/texlive/2020/update-tlmgr-latest.sh
sudo docker exec sharelatex chmod u+x /usr/local/texlive/2020/update-tlmgr-latest.sh
sudo docker exec sharelatex /usr/local/texlive/2020/update-tlmgr-latest.sh -- --upgrade
sudo docker exec sharelatex tlmgr update --self
sudo docker exec sharelatex tlmgr install scheme-full

7. Update Tex Packages

sudo docker exec sharelatex tlmgr update scheme-full

Backup

docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql

Restore

cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE

Sources

medium.com/host-your-own-latex-server

anginf.de

docker-nginx-auto-ssl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment