this post was submitted on 16 Dec 2023
34 points (92.5% liked)

Selfhosted

40445 readers
248 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Do any of you self-host Overleaf? I know there is a Docker project, but from what I've heard it's not easy to install. The Yunohost version used to work but didn't support file upload, so that makes it bad too.

Have any of you successfully installed Overleaf with e.g. Docker and it works just fine? If so, could any of you share e.g. the Docker Compose file?

top 23 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 11 months ago* (last edited 11 months ago) (1 children)

Wait, there's an option to host Overleaf locally? Is there any cost associated with this, or any restrictions on the number of users?

[Edit] Found some more info on this, there's a free community version, and then an enterprise version with a fee that lets you self-host but adds features like SSO and support from the company. I'll definitely have to look more into both of these options. Thanks, OP, for making me aware of this!

[–] [email protected] 2 points 11 months ago

yeah, it is available in yunohost catalog https://apps.yunohost.org/app/overleaf and as Docker project.

[–] [email protected] 8 points 11 months ago* (last edited 11 months ago) (1 children)

There's some tinkering with their docker-compose.yml to make it work. Here's mine you can copy if you want to get it up and running. I don't use nginx or any reverse-proxy btw. All data is saved in their own individual volumes which you can back up:

services:
    sharelatex:
        restart: always
        image: sharelatex/sharelatex
        depends_on:
            mongo:
                condition: service_healthy
            redis:
                condition: service_started
        ports:
            - *DESIRED_PORT*:80
        links:
            - mongo
            - redis
        stop_grace_period: 60s
        volumes:
            - data:/var/lib/sharelatex
            - texlive:/usr/local/texlive

        environment:
            SHARELATEX_APP_NAME: Overleaf Community Edition
            SHARELATEX_MONGO_URL: mongodb://mongo/sharelatex
            SHARELATEX_REDIS_HOST: redis
            REDIS_HOST: redis
            ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
            ENABLE_CONVERSIONS: 'true'
            EMAIL_CONFIRMATION_DISABLED: 'true'

    mongo:
        command: "--replSet overleaf"
        restart: always
        image: mongo:4.4
        expose:
            - 27017
        volumes:
            - mongo_data:/data/db
        healthcheck:
            test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
            interval: 10s
            timeout: 10s
            retries: 5

    redis:
        restart: always
        image: redis:6.2
        expose:
            - 6379
        volumes:
            - redis_data:/data

volumes:
  data:
  mongo_data:
  redis_data:
  texlive:

Some of my documents rely on certain packages which didn't come with the Docker image. You will need to run
docker exec sharelatex-sharelatex-1 tlmgr update --self;docker exec sharelatex-sharelatex-1 tlmgr install scheme-full
so that you can render your documents properly if they utilize certain packages.

Optionally—since the full scheme takes about 8 GB and you may not need everything—you can replace scheme-full with a different scheme you can find by running
docker exec sharelatex-sharelatex-1 tlmgr info schemes
The i before any scheme name means that it is already installed.

Update:
Included a texlive volume to save any packages that were installed, so when recreating the containers, they will persist.

[–] Keelhaul 1 points 11 months ago (1 children)

Are the packages installed to a persistent volume? Or do they need to be reinstalled after recreating the container?

[–] [email protected] 2 points 11 months ago* (last edited 11 months ago)

I checked the volumes that I included in the compose file, and looked for either a texlive, tlmgr or a package folder and didn't find anything. I think it's safe to assume that you would need to reinstall the packages if you recreated the containers.

~~This is a problem that I didn't consider. I will try to make an update to my compose file that will keep the packages persistent.~~

Check above for the update!

[–] [email protected] 3 points 11 months ago (1 children)

Texstudio + git > Overleaf

[–] [email protected] 1 points 11 months ago

I tried another TeX editors, but I had some problems with packages that I need in my documents :(. But I would left Overleaf bc it is really heavy software.

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago) (1 children)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
Git Popular version control system, primarily for code
HTTP Hypertext Transfer Protocol, the Web
SSO Single Sign-On
nginx Popular HTTP server

3 acronyms in this thread; the most compressed thread commented on today has 9 acronyms.

[Thread #359 for this sub, first seen 16th Dec 2023, 21:25] [FAQ] [Full list] [Contact] [Source code]

[–] [email protected] -3 points 11 months ago

Will you shut up man, I think everyone here fucking knows what http is

I know I know it's a bot and I will block it but who tf came up with this idea

[–] [email protected] 1 points 11 months ago (3 children)

Check out their quick start guide here, it looks very helpful to me: https://github.com/overleaf/toolkit/blob/master/doc/quick-start-guide.md

I would guess that you need to learn more about Docker usage in general, rather than just looking for a Docker Compose file (which is here, by the way). I'm kind of on a similar journey, and what I've learned so far is that you (usually) can't just copy and paste a Compose script and go. It helps a lot to understand the basics of what you're doing.

I found this video helpful, but others might have better suggestions: https://www.youtube.com/watch?v=pg19Z8LL06w

Also, I'd like to point out that Overleaf's hosting and pricing options are quite reasonable, especially if you're working for a university or institution: https://www.overleaf.com/user/subscription/plans

[–] [email protected] 2 points 11 months ago

Here is an alternative Piped link(s):

https://www.piped.video/watch?v=pg19Z8LL06w

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source; check me out at GitHub.

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago) (2 children)

I would guess that you need to learn more about Docker usage in general, rather than just looking for a Docker Compose file

Yeah, I don't really like using Docker so I always go for easier option, but my friend uses Docker a lot and also had troubles with Overleaf.

Also, I’d like to point out that Overleaf’s hosting and pricing options are quite reasonable, especially if you’re working for a university or institution: https://www.overleaf.com/user/subscription/plans

I don't work for university, but I am a student that needs Latex. Overleaf free plan got really bad, even my thesis cannot be compiled now and Overleaf pricing isn't really great. Student pricing is only for annually subscription, so it is not ideal for me.

[–] [email protected] 2 points 11 months ago* (last edited 11 months ago) (1 children)

Right, Docker can definitely be a daunting system to learn, but it's the standard because it's so reliable and flexible. I've been using CasaOS because it's basically Docker on easy mode, with limited package support, but I've decided recently that I really should just learn how to use Docker properly.

[–] [email protected] 1 points 11 months ago

I know some Docker, even I built my own images, but I just don't really like Docker.

[–] [email protected] 2 points 11 months ago (1 children)

I don't really like using Docker so I always go for easier option

Usually docker is the easiest option as you don't have to install a lot of dependencies, then set up other services and databases and whatnot. Especially if you use docker-compose.

[–] [email protected] 0 points 11 months ago (1 children)

The easier option is hunting for Docker Compose...

[–] [email protected] 2 points 11 months ago* (last edited 11 months ago) (2 children)

A Docker Compose is literally just a bunch of Docker commands in yaml format. Can’t say I understand how one can be any easier or harder than the other, considering they basically directly map one to another.

[–] [email protected] 1 points 11 months ago

I know, That's why I said I always look for Docker Compose bc it is the easier option.

[–] [email protected] 1 points 11 months ago (1 children)

There’s even a website that translates it for you: https://www.composerize.com/

[–] [email protected] 1 points 11 months ago (1 children)

Yeah, Even Dockge can do that

[–] [email protected] 1 points 11 months ago (1 children)
[–] [email protected] 1 points 11 months ago
[–] [email protected] 1 points 11 months ago* (last edited 11 months ago)

Also, I’d like to point out that Overleaf’s hosting and pricing options are quite reasonable, especially if you’re working for a university or institution: https://www.overleaf.com/user/subscription/plans

While I did take advantage of the free Overleaf Pro during my university days, I don't have it anymore after graduating, and so I'm missing some features which their free tier doesn't have.
By self-hosting I'm given better control, and all those features I once had before.

Also, the whole point of this community is to kind of avoid relying on third-party hosting, and especially paying for it too🙂