---
title: "Instalación"
project: IoT Platform
version: 1.0
section: guides
language: es
translation: missing
license: Total.js Enterprise
url: https://totaljs.es/docs/es/iot/1-0/guides/installation/
updated: 2026-11-20T06:56:23.519Z
---

# Instalación

> Install the Admin and Stream apps, connect them to PostgreSQL and start them.

> **Note:** Total.js IoT Platform is available only with a [Total.js Enterprise](https://www.totaljs.com/enterprise/) subscription. See the [IoT Platform page](https://www.totaljs.com/iot/) on totaljs.com.


Total.js IoT Platform runs on your own server. You receive the source code from Total.js with your Enterprise license. The package has three folders:

- `admin`: the app you work in.
- `stream`: the app that receives the data of your devices.
- `drivers`: example drivers that you can install or use as a starting point.

## Requirements

- Node.js 18 or newer.
- PostgreSQL 15 or newer.

## Create the database

Create an empty PostgreSQL database for the platform, for example `iot`. Both apps use this one database. Admin creates its tables the first time it starts.

## Install Admin

1. Open a terminal in the `admin` folder and install the dependencies:

```bash
npm install
```

2. Open the `config` file and set the connection to your database and the address where people will open the app:

```text
database             : postgresql://user:password@127.0.0.1:5432/iot
url                  : https://iot.example.com
```

3. Start the app:

```bash
npm start
```

Admin listens on port `8000`. Open `http://127.0.0.1:8000/` in your browser and continue with [First steps](../first-steps/).

## Install Stream

1. Open a terminal in the `stream` folder and install the dependencies:

```bash
npm install
```

2. Open the `config` file and set the same database and the public address of the stream. Your devices send their data to this address.

```text
database           : postgresql://user:password@127.0.0.1:5432/iot
url                : https://stream.example.com
```

3. Open `index.js` and choose a port for the stream, different from the port of Admin. Remove the `//` in front of the `options.port` line and write the number:

```js
options.port = 8001;
```

4. Start the stream:

```bash
node index.js
```

Open `http://127.0.0.1:8001/` to see the [status page of the stream](../stream/).

## Run in production

Start each app in release mode, which is faster and does not watch the files for changes:

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

Keep both apps running with the process manager of your server and put them behind a web server with HTTPS. Devices must be able to reach the address of the stream. Admin only needs to be reachable by the people who use it, and by anyone who reads its [open data](../../reference/open-data-api/).

All settings of both apps are described in [Configuration files](../../reference/configuration/).
