Skip to project details

Selected work / Project case study

Self-Hosted Overleaf with Automated TrueNAS Backups

A self-hosted Overleaf deployment for internal ETH use, with Docker Compose, an nginx HTTPS reverse proxy, automated setup scripts, and TrueNAS backups.

ETH ProjectDevOpsInfrastructureSelf-Hosting

Overview

This project deploys a self-hosted Overleaf Community Edition running on ETH servers for internal ETH use. I wrote comprehensive documentation and automated setup scripts (install.sh and update.sh) to enable easy deployment and maintenance. The system runs fully containerised behind nginx with TLS, with all project data and databases backed up to a dedicated TrueNAS SMB share. The entire infrastructure is production-ready and currently serving ETH users.

Key Features

Containerised Overleaf StackDocker Compose setup with Overleaf CE, MongoDB replica sets, and Redis, configured for reliable startup
Reverse Proxy and TLSnginx front-end with HTTPS termination using dedicated certificates, Overleaf bound to 127.0.0.1:4242 internally
Automated Backupsnightly systemd-driven backup job that dumps MongoDB and syncs Overleaf data volumes to TrueNAS SMB share
Update Workflowdedicated update.sh script to pull new Docker images and update TeX Live packages without touching user data
Documentation and Setup ScriptsI wrote comprehensive documentation and automated install.sh/update.sh scripts for easy deployment and maintenance

Technical Details

The system runs on ETH infrastructure (Proxmox-hosted Ubuntu VM) with AVX-capable virtual CPU for MongoDB. I developed the installation script (install.sh) that automates Docker Compose v2 setup, prepares the /overleaf directory, and configures the docker-compose file with Mongo replicaSet and Redis settings. Overleaf listens on 127.0.0.1:4242 behind nginx with TLS termination, serving internal ETH users.

A systemd unit manages the Docker stack lifecycle. The sharelatex container includes a full TeX Live distribution, with packages updated via tlmgr as needed.

Storage and Backup Architecture

A TrueNAS pool and dataset are configured as an SMB share, mounted at /backup on the Ubuntu VM. A nightly systemd timer triggers a backup script that runs mongodump and rsyncs Overleaf data, MongoDB, and Redis volumes into date-stamped folders on the TrueNAS share.

The update.sh script pulls newer Docker images, restarts the stack, and optionally updates TeX Live packages, all without reinstalling or reconfiguring the system.

TrueNAS Configuration

I configured the TrueNAS system from scratch, setting up the storage pool, datasets, and SMB share with proper access controls. This provides reliable, scalable storage for the backup system.

Skills Demonstrated