---
title: Run in production
project: OpenFiles
version: 1.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/openfiles/1-0/guides/production/
updated: 2026-11-19T07:45:42.832Z
---

# Run in production

> Settings and habits that keep an OpenFiles server safe.

OpenFiles serves files to the public and accepts uploads from your apps, so the server needs some care before others can reach it.

## Change the first-start account

Sign in and change the user name and password at once. See [Your account](../account/).

## Use HTTPS

Tokens travel in every upload. Put OpenFiles 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 OpenFiles listens on all network interfaces. When a reverse proxy runs on the same server, make OpenFiles 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 OpenFiles. With Docker, publish the port only on the local address instead:

```bash
docker run -d --name openfiles -p 127.0.0.1:8000:8000 -v openfiles:/www openfiles
```

## Start in release mode

`npm start` runs in debug mode. On a server, start OpenFiles in release mode:

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

## Limit what tokens can do

Give each app its own token with only the storages it needs. See [Token permissions](../token-permissions/).

## Restrict the admin interface

The admin interface and the upload API share the same address. If you can, allow the admin pages (`/`, `/api/`, `/settings/`) only from your own network in the reverse proxy, and keep `/upload/`, `/base64/` and `/files/` open for your apps and visitors.

## Back up

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