Overleaf docs
Plans and pricingTemplatesUser docsGo to Overleaf
On-premises
On-premises
  • Welcome
    • Server Pro vs. Community Edition
  • Release notes
    • Release notes 5.x.x
      • Doc version recovery
    • Release notes 4.x.x
    • Release notes 3.x.x
      • Full project history migration
    • Release notes 2.x.x
    • Release notes 1.x.x
    • Release notes 0.x.x
  • Getting started
    • Before you start
    • Requirements
      • Skills needed
      • Hardware requirements
      • Software requirements
    • Microservices
    • Server Pro infrastructure
    • What is the Overleaf Toolkit?
  • Installation
    • Introduction
    • Using the Toolkit
      • 1: Download the Toolkit
      • 2: Familiarize yourself with the Toolkit
      • 3: Initialize the configuration
      • 4. Choose Community Edition or Server Pro
      • 5. Personalizing your instance
      • 6. Post-installation tasks
    • Air-gapped/offline deployments
    • Upgrading TeX Live
  • Configuration
    • Overleaf Toolkit
      • Files and locations
      • Toolkit settings
      • Environment variables
      • Server Pro-only configuration
        • LDAP
        • SAML 2.0
        • Sandboxed Compiles
        • Git integration
        • Templates
        • Adding LaTeX user help
      • Logging
      • TLS proxy
      • Branding
      • Localization
      • Email delivery
      • Redis
      • S3
  • Maintenance
    • docker-compose.yml to Toolkit migration
    • Upgrading your deployment
    • Data and backups
      • Exporting projects
    • Extending TeX Live
    • Horizontal scaling
    • S3 migration
    • Updating MongoDB
  • User and project management
    • User management
      • Username migration
    • Understanding license usage
    • Project management
  • Support
    • Project limits
    • Troubleshooting
    • Getting help
    • Support guides
      • Using templates as an individual
    • Overleaf user docs
Powered by GitBook
LogoLogo

Discover Overleaf

  • Home
  • Features

Solutions

  • Plans and pricing
  • For universities
  • For business
  • For government

Resources

  • Templates
  • User docs and LaTeX learning
  • Blog

© Overleaf

On this page
  • Setting up the templates user
  • Publishing templates
  • Unpublishing templates
  • Linking to your templates
  • Your gallery
  • New project menu
  • Transferring templates from overleaf.com

Was this helpful?

Export as PDF
  1. Configuration
  2. Overleaf Toolkit
  3. Server Pro-only configuration

Templates

PreviousGit integrationNextAdding LaTeX user help

Last updated 3 months ago

Was this helpful?

With Server Pro, you have the ability to create and publish your own templates, within your self-hosted environment, as well as re-distribute downloaded templates from the on .

Setting up the templates user

In Server Pro, a single user is responsible for publishing the curated list of templates that are visible on your local template gallery /templates.

To do this, you'll need to set the environment variable OVERLEAF_TEMPLATES_USER_ID in toolkit/config/variables.env to the ID of the user who will be responsible for template management within your instance, for example:

OVERLEAF_TEMPLATES_USER_ID=56a8865231faeb5f07d69959

To obtain the ID of the user you wish to publish public templates:

  1. Log in using an Administrator account and go to Admin > Manage Users.

  2. Search for the user using their email address and click through to their user admin page. There you will find the ID:

  3. Copy that ID and use it to set the environment variable OVERLEAF_TEMPLATES_USER_ID.

  4. Run bin/up -d to recreate the sharelatex container and apply the change.

Altering the configuration files of Server Pro typically necessitates the recreation of one or more containers. This procedure will cause user disconnections and lead to a period of downtime. As such, we advise implementing these modifications during prearranged maintenance periods.

Publishing templates

If you'd like to make templates available to all of your on-premise Server Pro users you'll need to:

  1. Log in as the templates user.

  2. As the templates user, create or upload a project containing the template's source code and make sure it compiles.

  3. In the editor's left-hand menu, choose Manage Template.

  4. Enter a custom description of the template

  5. Click the Publish button

  6. Go to the project dashboard and tag the template with the name of the cateogry you'd like it to appear in. For example Presentations.

Unpublishing templates

If you'd like to unpublish a template you'll need to:

  1. Log in as the templates user.

  2. Open the previously existing project containing the template's source code.

  3. In the editor's left-hand menu, choose Manage Template.

  4. Once the confirmation popup is displayed, click Unpublish.

Once this has been done, the template should have been removed from the templates list.

Linking to your templates

Your gallery

On the templates gallery page, /templates, templates are grouped together using the tag which the user assigns to the projects, e.g. Journals, Reports etc. To see all templates add /all to the URL /templates/all, which can also be used as the default URL if you do not wish to use tags for groupings.

Like-wise, you can view/link to templates within a specific category by appending the tag name to the templates URL, for example: /templates/journals.

Did you know that if you tag a project multiple times it will appear in multiple groups.

New project menu

When a user creates a new project, they can be shown customized links to template categories. These links are set via the OVERLEAF_NEW_PROJECT_TEMPLATE_LINKS environment variable in toolkit/config/variables.env, for example:

OVERLEAF_NEW_PROJECT_TEMPLATE_LINKS='[
   {"name":"All Templates","url":"/templates/all"},
   {"name":"All Categories","url":"/templates"},
   {"name":"Reports","url":"/templates/reports"},  
   {"name":"External","url":"https://somewhere.com/templates/reports"}
]'

Transferring templates from overleaf.com

  1. Click on the Open as Template button

  2. Click on the project menu and choose Download Source

  3. Next, log into the on-premise Server Pro account

  4. Click the New Project button from the projects dashboard and choose Upload Project

  5. Click the Select a .zip file button and choose the downloaded template zip file

The user can then use this newly uploaded template within their own account, or, as the templates user, you can publish it for other users to use.

Did you know that you can transfer quality, pre-built LaTeX templates that are available on the at to your on-premise instance of Server Pro? For more information see the Transferring templates section below.

As Server Pro has been architected to work offline, there isn't an automated way to integrate gallery templates into your on-premise installation, it is however possible to do this manually on a per template basis.

By default, Server Pro is configured to use a basic scheme version of TeXLive for compiles. This basic version is lightweight and only contains a very limited subset of LaTeX packages which, will most likely result in missing package errors for your users when attempting to use templates from on your local on-premise instance.

Unfortunately, whilst there isn't an automatic way to install missing packages, we do have a configurable setting within Server Pro that will allow your users to compile projects with access to more packages, and in a more secure way. This feature is called (also known as Sibling Containers).

To ensure that downloaded templates are compatible with your on-premise Server Pro instance, we highly recommend that you enable as this feature will provide your users with access to the same TeX Live environment as that on . These images contain the most popular packages and fonts and have already been tested against our gallery templates.

You can find additional information about configuring what TeX Live versions users are able to choose from within their project along with setting the default TeX Live image version for new projects in the section of our documentation.

Navigate to the on and locate the required template, for example

An account is required.

Template Gallery
overleaf.com
Template Gallery
overleaf.com
overleaf.com
overleaf.com
Sandbox Compiles
Sandbox Compiles
overleaf.com
Template Gallery
overleaf.com
IEEE Photonics Journal Paper Template - Example Submission
overleaf.com
Changing the TeX Live Image