---
title: Run in production
project: LessCode
version: 1.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/lesscode/1-0/guides/production/
updated: 2026-11-19T04:41:11.468Z
---

# Run in production

> Choose the port and address, protect the designer and keep LessCode running.

LessCode has no sign-in. Anyone who can open the designer can change your flow and run code on your server. Plan access before you put LessCode on a network.

## Listen only on the server itself

By default LessCode listens on every network interface. To accept connections only from the same machine, open `index.js` and remove the two slashes at the start of this line:

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

so that it reads:

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

Restart LessCode. The terminal now shows the address `127.0.0.1`.

## Choose the port

Pass the port when you start LessCode:

```bash
node index.js 8000
```

With Docker, change the first number of `-p 8000:8000`.

## Protect the designer and your endpoints

- Put a reverse proxy, such as Nginx, in front of LessCode. Use HTTPS and allow only trusted people to reach the designer address.
- Your endpoints use the same port as the designer. If the public must reach your endpoints, let the proxy forward only their paths (for example `/api/`) and protect the root address.
- Keep the LessCode port closed in the firewall.

## Keep it running

- Run LessCode under a service manager or as a Docker container that restarts, so it starts again after a reboot.
- Wait a few seconds after your last change before you stop or restart it. See [Apply and save](../apply-and-save/).
- [Back up your flow](../backups/) regularly.
