OpenCore MES Try the demo

Docs Installation 1

Before you start

On this page

This procedure installs OpenCore MES for a plant: the server, its database, its keys, its first administrator, backups, and the checks before go-live; then laptops, upgrades and suites. Each procedure is a table of steps with what you should see; tick Done as you go, and keep the signed copy with the installation's handover.

The sign-in page of a plant's server: a username and a password, and I have a setup code
The sign-in page, as a plant's server shows it: a username and a password; a setup code for someone with no password yet.
The sign-in page of a plant's server: a username and a password, and I have a setup codeThe sign-in page, as a plant's server shows it: a username and a password; a setup code for someone with no password yet.
How to read a step.
  • The words say what to do. The dark box under them holds only commands: one whole command a line, nothing else. Copy the box (its Copy button) or type it line by line, in the order shown.
  • Replace what is <in yellow, between angle brackets> before you run a line (the brackets go too): <server name> becomes mes.plant.example.
  • A light box titled File is the content of a file: open the file in an editor (the step's dark box does), paste it there, save. Never paste a file's content into the terminal.
  • Where there are two ways (from npm or from the source, a Mac or Windows), each way is a step of its own: do the one that fits, skip the other.

1.1 What you install

PostgreSQL: everything the plant keeps (designs, records, the audit trail, sessions), on the same server, reached over the local socket.
OpenCore MES: one Node process (app/mes/server.mjs), run by systemd as the user opencore, listening on 127.0.0.1 only. It upgrades its own database at each start.
Caddy: HTTPS in front, with a certificate it fetches and renews by itself, and HSTS. The application writes its own Content-Security-Policy.
Backups: nightly, encrypted, kept on the server and copied off it; a restore tested every month (ops/backup/).

1.2 Requirements

WhatNotes
ServerUbuntu 24.04 LTS, x86-64, root accessSized for your plant (the load figures measured so far are in app/mes/README.md); disk for the database, its backups (14 daily and 12 monthly kept by default) and the event log.
Node.js>=24 (the package's engines)ops/demo/provision.sh installs the latest release, checked against its published checksum; pin it with NODE_VERSION.
PostgreSQL16 or laterThe test pipeline runs on 16. Ubuntu 24.04's own package is used.
NetworkA DNS name for the server; ports 80 and 443 open to the plant's usersOutbound: your identity provider or directory, the systems your services call (ERP…), Let's Encrypt, the suites registry if you use suites, the AI provider if you use the copilot.
BrowsersSafari 15.4, Chrome 93, Firefox 92 or laterFirefox 114 or later for the rule advice beside a form (older: the server decides at save).
Your workstationSSH with a key to the serverChrome only if you print these documents as PDF.
A laptop (trying it)A Mac on a macOS Homebrew supports, or Windows 10 (2004 or later) or 11 with WSL 2Node and PostgreSQL as above, installed per IN-31 or IN-32.
About OpenCore MES: version, build, Juris and Node.js, and the suites installed
About OpenCore MES: the version, build and runtime this installation runs, and its suites.
About OpenCore MES: version, build, Juris and Node.js, and the suites installedAbout OpenCore MES: the version, build and runtime this installation runs, and its suites.

1.3 Which way

Linux server (part 2)npm plant folder (part 3)MacBook or Windows laptop (part 3)
ForProduction: a plant's live systemA pilot, a small plantTrying it, training, a demo, designing offline; never a plant's live system
FromA source archive of the version you install (github.com/opencore-mes/opencore-mes)The npm package @opencore-mes/server (a plant folder holds its settings)The npm package, or a source archive
Runs assystemd, its own user, HTTPS by Caddy, hardened hostopencore-mes start; production practice is part 2'sFrom a terminal, on the laptop only (http://localhost:9090)
Backups, audit protection, host hardeningScripts in ops/, used as they areNot in the package: take ops/ from the source archive of the same versionNone: a laptop's data is not backed up by OpenCore MES
Caution. Versions. The empty installation (--empty), the first administrator (admin) and the suite commands come with the release this procedure accompanies. The npm package published as 0.1.0 was built before them: with it, a plant folder or a laptop can try the sample plant (IN-33, way A) only; install from a source archive for the rest, or wait for the next package.

1.4 Decide first

Write these down before you start; the procedures ask for them.

DecisionWhere it goes
1The server's name (e.g. mes.plant.example)Caddy, the password links (--url)
2How people sign in: your identity provider (OpenID Connect), your directory (LDAP or Active Directory), or passwords of OpenCore MES's own with a second factorOIDC_*, LDAP_*, MFA (7.1)
3The first administrator: their sign-in id, as your directory or identity provider knows them (lower case letters, digits, _ and -: an employee number such as 104523 works; a dot does not), and their full nameIN-15
4The first department, which governs the organization (Engineering unless you say otherwise)--department
5The plant's time zonePLANT_TZ
6Where backups are copied off the server: a bucket (rclone: S3, B2, GCS, Azure…) or another host (rsync over SSH), in another provider account than the server's, with credentials that can add files but not delete themOFFSITE_RCLONE or OFFSITE_RSYNC (IN-18)
7Where alerts go (a chat channel's or on-call service's incoming webhook)ALERT_WEBHOOK_URL
8Which hosts services may reach (ERP, the identity provider…)MES_CONNECTION_HOSTS
9Who keeps the keys, and where the offline copies areIN-13
10The copilot: none, or an AI provider and its keyAI_PROVIDER
Caution. Never copy the public demo's settings (ops/demo/demo.env: DEMO=1, guests, SEED_*) nor its reset timer (opencore-mes-reset.timer, which wipes its database every night) to a plant. Take the steps here, not the demo's deploy script as it is.