Skip to main content

Hub — several environments behind one address

The hub puts several NomaUBL environments behind a single address. Started with nomaubl.sh hub start, it serves an environment picker at its root and each environment under its own path — https://server/prod/, https://server/test/. Each environment stays its own Java process, with its own users, licence, master key and log, whatever the source system it processes (JD Edwards, SAP, NetSuite or a custom ERP).

The hub's Administration screen creates, starts, stops, restarts and upgrades the environments, sets how each one starts, reads their logs, and — when the customer runs NomaUBL on several servers — administers the hubs of the other servers and copies the settings of an environment to the same environment on each of them.

The hub is optional: an environment started with nomaubl.sh start <env> keeps working as described in Service supervision. The hub is driven by nomaubl.sh (nomaubl.cmd on Windows, same subcommands).


At a glance​

NomaUBLEnvironments administrationSign outBack to the environmentsNew environmentServersTHIS SERVERsrv-a · 2026.12.01.1prod/prod/ · http://srv-a:8096/ · 4gRunningPrimarySyncRuns the jobsOpenRestartStopUpgradeSettingstest/test/ · port 18102 · 2gRunningOpenRestartStopUpgradeSettingsdemo/demo/ · started by handStoppedStartUpgradeSettingsSRV-B2026.12.01.1prod/prod/RunningSettings from srv-a · 2026-12-01 09:12OpenRestartStopUpgradeLog of prod/opt/nomaubl/nomaubl-prod.log · 12.4 MBAllWarnings and errorsErrorsSearch…500 lines2 000Auto-refreshDownload1INFOSERVERlistening on port 80962INFOSCHEDULERfetch-status: 14 invoice(s)3WARNPAretry 1/3 after HTTP 5034INFOPROCESSinvoices · ACME · 000015ERRORSMTPconnection refused6INFOCLUSTERlease renewed6 of 500 linesServers · New environmentother hubs, create oneEnvironment cardpath · own address · memoryPrimary · Syncsame settings on every serverActionsopen, restart, stop, upgradeStopped environmentstart, upgrade, start settingsAnother serverits environments, through its hubLog readerlevel, search, lines, refreshDownloadthe lines loadedLevel badge · moduleerrors shown in red

How it works​

TopicBehaviour
EnvironmentsEvery folder of the environments folder (ENV_HOME of nomaubl.conf, the script's folder by default) that holds config/config.json. An environment installed with nomaubl.sh install appears as well as one created from Administration; it is started by hand until Start it with the hub is ticked in its start settings.
AddressThe hub listens on its own port; each environment opens under /<environment>/. A request to /<environment> is redirected to /<environment>/.
Internal portWithout its own port, an environment started by the hub gets a free port at each start, from 18101 upward, reachable from the server only — it is reached through the hub. The port is kept in its PID file nomaubl-<environment>.pid.
LogEach environment writes nomaubl-<environment>.log in the environments folder, as with nomaubl.sh start; the hub writes nomaubl-hub.log.
Links sent by an environmentPassword reset links and Claude's sign-in carry the environment's path without any setting.
PromotionA promotion target served by a hub is given by the environment's address: https://server/<environment>.
NamesLower-case letters, digits, - and _, 40 characters at most, starting with a letter or a digit; hub, api, static and assets are reserved.

The hub itself answers in plain HTTP. For HTTPS, put a reverse proxy in front of the hub's port, as for one environment — see Service supervision → Reverse proxy.


Commands​

CommandEffect
nomaubl.sh hub start [port]Starts the hub in the background. Port: the one given, else the one of the last start, else DEFAULT_PORT (8090). The environments set to start with the hub start with it.
nomaubl.sh hub stopStops the hub and the environments it started.
nomaubl.sh hub restart [port]Stops, then starts — after installing a new release.
nomaubl.sh hub statusRunning or not, PID and port.
nomaubl.sh hub tokenPrints a new administrator token for Administration.
nomaubl.sh hub logFollows the hub's log (tail -f nomaubl-hub.log).
Linux / macOS
./nomaubl.sh hub start 9000
./nomaubl.sh hub token # prints nmh_… — keep it, it is shown once
./nomaubl.sh hub status

An environment started with nomaubl.sh start is never taken over by the hub: Administration lists it as Outside the hub until it is stopped with nomaubl.sh stop <env>.


Environment picker​

The hub's address opens Choose an environment: one card per environment, with its display name and colour (the Environment and Theme colour fields of Settings › Global) and its path. A stopped environment is greyed out and marked Stopped. A click opens the environment's own sign-in page.

Inside an environment served by the hub, Switch environment goes back to the picker: the grid icon of the top bar, and the link under the sign-in form.

Sign-ins and preferences are kept per environment in the browser: signing in to prod does not sign in to test, and the two can stay open side by side in two tabs, each with its own session, assistant history and preferences.


Administration​

The Administration link under the picker asks for an Administrator token — one printed by nomaubl.sh hub token. Only the hash of a token is kept on the server; each call of the command adds a new token. As long as no token exists, Administration refuses every call. The token is kept for the browser tab; Sign out forgets it.

The page shows the environments on the left, grouped by server, and the log of the selected one on the right. The top bar holds Servers, New environment, Back to the environments and Sign out.

Each environment card shows:

ElementContent
Name and pathDisplay name, /<environment>/, then its own address when it has an own port (a link while it runs), or its internal port, then its memory and started by hand when it does not start with the hub.
StateRunning, Stopped, or Outside the hub for an environment started with nomaubl.sh start (Started with nomaubl.sh start: stop it there to manage it here.).
JobsWith scheduled jobs on one server: Runs the jobs, or Jobs on the server that runs them with Run the jobs here.
PrimaryPrimary and Sync on the primary environment; Settings from the primary server and the date on the others.
ButtonsOpen (running), Restart and Stop (running) or Start (stopped), Upgrade, Settings.

A click anywhere else on the card selects the environment and shows its log. Open opens the running environment in a new tab, through this hub or through the hub of its server.

Create an environment​

New environment opens the creation window:

FieldDescription
ServerShown when other servers are administered: where the environment is created.
Name (its path: /name/)Name of the environment and of its folder, e.g. prod.
DatabasePostgreSQL or Oracle.
JDBC addressAddress of the NomaUBL database. Blank: set it later in Settings › NomaUBL database.
User, Password, SchemaDatabase account and schema (public by default for PostgreSQL).
Licence key (optional)The environment's licence.
MemoryJava heap, e.g. 2g, 512m; blank: the JVM's default.
Its own portBlank: through the hub only. See Start settings.
Start it once created / Start it with the hubBoth ticked by default.

Create installs the environment (as nomaubl.sh install), writes its database connection and licence — the password encrypted with the environment's own master key —, prepares its database (tables, default roles, a first admin account) and starts it. The steps are shown in the window; the preparation can take a few minutes. Sign in with admin / admin: a new password is asked at the first sign-in. Without a JDBC address, the database is not prepared: set the connection in Settings, then run Initialize.

Start, stop, restart, upgrade​

Start, Stop and Restart act at once; a line above the list gives the outcome.

Upgrade asks for a confirmation: the environment is stopped, upgraded to the release installed on its server (backup, database, settings, files), then started again if it was running. Its users are disconnected meanwhile. The upgrade is the one of nomaubl.sh upgrade <env>; its report replaces the log on the right (Show the log goes back). A failure says so and names the backup folder, <environment>/backup/. An environment started with nomaubl.sh start is upgraded with nomaubl.sh upgrade.

Start settings​

Settings opens the start settings of the environment, applied at its next start or restart:

FieldDescription
Start it with the hubStarted by nomaubl.sh hub start; otherwise it is started by hand from Administration (started by hand on its card).
Primary of its clusterIts settings are copied to the environment of the same name on the other servers — see Same settings on every server.
MemoryJava heap, e.g. 2g, 512m; blank: the JVM's default.
Its own portBlank: through the hub only. With a port, the environment also listens there, open to the network as with nomaubl.sh start — an address used before the hub keeps working, and the environment stays reachable and managed through the hub. Between 1024 and 65535, neither the hub's port nor another environment's; a port taken by another program fails the start. Both addresses show on its card.
Extra Java optionsAdded after the JAVA_OPTS of nomaubl.conf, e.g. -Duser.timezone=Europe/Paris.

Log reader​

The right-hand pane reads the end of the selected environment's log, with the file's path and size:

ControlEffect
All / Warnings and errors / ErrorsLevel filter. Plain lines that read as a failure count as errors.
Search…Keeps the lines that contain the text.
200 / 500 / 2 000 / 10 000 linesNumber of lines read from the end of the file (500 by default).
Auto-refresh, RefreshReloads the lines; the view stays at the end while new lines come.
DownloadSaves the lines loaded as <environment>.log.

Lines with a level show it as a badge, with their module apart; the headings of an upgrade report show as sections. The counter gives the lines shown out of the lines loaded.


Several servers​

When the customer runs NomaUBL on several servers, each with its hub, one hub can administer the others. Servers opens:

SectionContent
This serverThe name shown to the other servers (blank: the host name).
Other serversEach server added, with its address, release, certificate not checked when so, and its state: Connected, Token refused, Unreachable (with the reason). Edit changes it; Remove stops administering it — nothing changes on that server.
Add a serverName, Address of its hub (e.g. https://srv-b:9000), Its administrator token — printed by nomaubl.sh hub token on that server —, Check its certificate (untick for a self-signed or internal certificate). On a change, a blank token keeps the stored one.

The server must answer as a hub with that token to be added; its token is kept encrypted. In Administration, the environments then appear under each server's name with its release — other release when it differs from this server's — and are started, stopped, upgraded, opened and read through that server's hub; New environment offers the choice of the server. A server that does not answer is shown with the reason. Each server stays administrable from its own hub, and a server's own servers are administered from that server.


Same settings on every server​

The same environment — same name, same database — can run on several servers. One of them is marked Primary of its cluster in its start settings: its card shows Primary and, while it runs, Sync.

Sync of prod to the other serverssrv-bsrv-c3 changed, 2 new, 42 identical, 2 only there · files: 2 changed, 0 newSecrets, paths, the licence and which jobs run on each server never travel; items found only on a server stay there.KINDITEMSTATECHANGESDETAILAPPLIEDDocument templateinvoiceschanged2Connectorpa-defaultchanged1Daily digestops-digestnewFiletemplate/invoices/invoices.xslchangedLifecycle checklocal-checkextrainvoiceschangedKEYCHANGEON SRV-BPRIMARYsendToPAchangedNYpdfTemplatechangedstandardstandard-logoApply on 2 server(s)CloseOne server at a timewhat it would receiveItem statechanged · new · identical · extraField by fieldclick a row to compareOnly on that serverlisted, never removedPrimary valuereplaces the other server'sApplya version of each file kept first

Sync asks each other server what the environment of the same name would receive, then shows a preview server by server:

ElementContent
SummaryItems changed, new, identical and only there, files changed and new.
Item listKind, item, state — changed, new, identical, extra (found only on that server), skipped —, number of changes.
DifferencesA click on an item compares it field by field: key, change, value on that server, value of the primary.
Apply on n server(s)After a confirmation, the primary's settings replace those of the other servers; a version of each file is kept first, and the jobs there re-read their settings at once.

A sync carries the documents and their files, the connectors, the settings templates — Global and single sign-on included —, the PDF templates, entry forms, lists, digests, auto-retries, lifecycle checks, notification rules, the UBL defaults and the Explorer analyses and dashboards.

Each server keeps:

  • its passwords, tokens and keys, its licence key, its environment name and colours;
  • its paths (the directories of Global, Ghostscript, XDO, logo) and its public address, the single sign-on return address;
  • the progress marks of its jobs;
  • which jobs run on it and how often — unless the jobs run on one server only, in which case these travel too.

An item new on a server arrives switched off there; nothing is removed — an item found only on a server stays there. A server whose environment of that name uses another database refuses the sync: it is not the same environment, and nothing changes. A server without an environment of that name is listed as such, and there is one primary per cluster: an environment marked primary on the receiving server refuses the sync too. The sync works between environments started by their hub; on each receiving environment the card then shows Settings from the primary server and the date.


Scheduled jobs on one server​

When several servers share the same database, Settings › Global › Job defaults › Several servers › Run the jobs on one server only runs the scheduled jobs and the polling command lines on one server only; another server takes over within two minutes if it stops, from where the jobs had got to — see Global → Several servers.

In Administration, the running environments show Runs the jobs, or Jobs on the server holding them with Run the jobs here: after a confirmation, the jobs move to this environment's server, the other one stops running them at its next check, and a run in progress there finishes. The Scheduled jobs page of the environment says which server runs them.


Access​

Administration only takes the hub's administrator token; no NomaUBL account is involved. Inside each environment, the users and roles are those of that environment.


Tips & best practices​

  • Keep the administrator token in the team's password vault. It is shown once; a new one is printed by nomaubl.sh hub token at any time.
  • Give an own port to an environment already in use when moving it behind the hub: the bookmarks and links to its former address keep working.
  • Upgrade in order. Install the new JAR and nomaubl.sh next to the hub, run nomaubl.sh hub restart, then Upgrade test before prod, reading each report.
  • Preview before applying a sync, server by server, and open the changed items to check their fields.
  • Keep the servers' clocks in sync (NTP) when the jobs run on one server only: the servers compare times to know who runs the jobs.