Overleaf: where to put personal files (sty, bst, bib, fonts)?

What app is this about, and its version: Overleaf 2026.05.08~ynh1
What YunoHost version are you running: 12.1.39
What type of hardware are you using: Virtual machine

Describe your issue

I put some personal files for latex compilation (bib, bst, sty and font files) in /var/www/overleaf, where I created a texmf folder with the correct structure. This folder is returned as the value of the TEXMFHOME variable in the overleaf shell. This worked nicely when compiling with overleaf. However, yesterday I installed an Overleaf update and my texmf folder is gone. There are also local texmf folders inside /home/yunohost.app/overleaf/texlive/2026, so I am now wondering where I should put my files so that they do not get overwritten by Overleaf updates (if this is at all possible).

Share relevant logs or error messages

NA

You should put them inside /home/yunohost.app/overleaf/
Each upgrade overwrites the whole content of /var/www/overleaf and also, I guess, /home/yunohost.app/overleaf/textlive

But if I create a texmf directory inside /home/yunohost.app/overleaf/, will latex be able to find it? Or does that need further tweaking?

Do you know which file defines the TEXMFHOME value ?

No, I did some poking around, but came up with nothing. I have now put the files inside /home/yunohost.app/overleaf/texlive/2026/texmf-local. This requires registering them with mktexlsr /home/yunohost.app/overleaf/texlive/2026/texmf-local, and for the fonts updating the font cache with luaotfload-tool --update --force, and that works. A bit cumbersome, given that these changes will not persist after the 2027 upgrade of TexLive.

Perhaps creating a symlink to another folder ? (It will also need to be recreated after an upgrade).

Yes, good suggestion–but I’ll leave it for another time, since it is working now in the way that I want. I have another year until TL 2027 hits :wink:

Thanks for your help!

I bit the bullet and reconfigured the setup with a symlink to a personal folder, then set up a script with rsync that will upload any changes I make to my .bib file (which changes frequently) to the server. This makes the.bib file is accessible for typesetting in Overleaf, and does not need to be uploaded in each Overleaf project again.

Update on the value of the TEXHOME variable. The file

/home/yunohost.app/overleaf/texlive/2026/texmf-dist/web2c/texmf.cnf

contains this line: TEXMFHOME = ~/texmf

The HOME environment variable in the Overleaf shell:

echo $HOME
/var/www/overleaf

So that explains why the TEXMFHOME variable points to that location.

Not sure if this needs a fix, and if so, how.