---
title: Run in production
project: OpenTemplates
version: 1.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/opentemplates/1-0/guides/production/
updated: 2026-11-19T07:56:19.121Z
---

# Run in production

> Settings and habits that keep an OpenTemplates server safe.

OpenTemplates holds your templates and answers your apps, so the server needs some care before others can reach it.

## Set the primary access token first

Until a primary access token is set, anyone who reaches the server can open the interface. Set it right after the first start. See [First start](../first-start/).

## Use HTTPS

Tokens travel with every request. Put OpenTemplates behind a reverse proxy (for example Nginx or Caddy) that serves HTTPS, and let your apps use the `https://` address only.

## Listen only on the local address

By default OpenTemplates listens on all network interfaces. When a reverse proxy runs on the same server, make OpenTemplates listen only on `127.0.0.1`. In `index.js`, change the line

```js
// options.ip = '127.0.0.1';
```

to

```js
options.ip = '127.0.0.1';
```

and restart OpenTemplates.

## Start in release mode

`npm start` runs in debug mode, which shows error details to the caller. On a server, start OpenTemplates in release mode:

```bash
node index.js 8000 --release
```

## Restrict the interface

The interface and the render endpoint share one address. If you can, allow `/setup/` and `/api/` only from your own network in the reverse proxy, and keep `/` and `/profiles/` open for your apps. Leave `/download/` open if your documents use [uploaded files](../files/).

## Back up

Copy the data folder on a schedule. See [Back up your data](../backups/).
