Docs · Getting started
Run Mosaic
The hosted service, a download you unzip, or Docker — and what each one needs.
There are three ways to run Mosaic. They are the same product; they differ in who operates it and where your data sits.
#Hosted
Go to cloud.getdatamosaic.com and create an account. You get a workspace of your own and there is nothing to install.
Creating the account is one question a screen: your work email, a password of at least 12 characters, then your name and company. The account is made at that point, and its workspace takes your company's name. Two questions follow, both of which you can skip: how many stores you look after, and what should agree. The last screen asks where to start — a demo retailer with nine checks already run, connecting your POS or ERP, or fifteen minutes with the founder to set it up together.
Enter goes on to the next screen, and a letter picks an answer.
Everything works before you confirm your email address. Publishing a check, sending mail from a trigger and your plan wait for the link that was mailed to you.
Choose this if you want to try Mosaic today, or if your data is reachable from the internet. Your licence, plan and the self-hosting download all live under Tenancy → Plan in the account menu once you are in.
#On your own machine
Choose this when the systems you need to read are inside your network — which, for most retail estates, they are. Mosaic only needs outbound access; nothing has to be opened to it from outside.
The download is one package for Windows, macOS and Linux. There is no installer: it is a folder you unzip and two commands.
npm install --omit=dev --ignore-scripts
npm startMosaic then listens on 127.0.0.1:4317. Open that in a browser and you are at first sign-in.
The package deliberately ships without node_modules, because the Oracle and SQLite drivers are compiled per platform and have to be fetched on the machine that will run them. That first npm install is what does it, and it is why the folder grows to roughly 400 MB.
#What you need
| Operating system | Windows 10, macOS 12, or any current Linux |
| Node.js | 22 or newer |
| Disk | About 400 MB once the drivers are fetched |
| Network | Outbound only |
#Keeping it running
To run Mosaic as a background service rather than a terminal window:
node scripts/service.mjs install
node scripts/service.mjs status#Updating
Mosaic looks once a day for newer versions and lists them under Tenancy → Updates, with what each one changed. A version marked Security update fixes a security problem and is the one to install soon; one marked Needs action changes something you have to act on, so read its notes first.
An owner presses Update, and Mosaic does the rest. The page shows four steps and follows them to the end:
- Download the package. Mosaic is still running. The package is checked against our signature before anything else happens, and you can cancel until it has finished.
- Stop the server. A run in progress is let finish first.
- Apply the package. Mosaic's files are replaced, and new dependencies installed if the version needs them. The version being replaced is put aside first.
- Start the server. The page opens Mosaic again as soon as it answers, and everybody signs in again.
Nobody has to touch the machine. While Mosaic is stopped, anybody who opens it sees a page saying it is being updated.
If the new version does not answer within two minutes of starting, the old one is put back and started, and the page says why. Afterwards, an owner can also go back one version from the same page: the version replaced is kept in a .update folder until the next update.
Your data is in the data folder, not the program's, so no update touches it. Going back does not undo changes a newer version made to your data.
On the same page an owner chooses the release channel (Stable, or Beta for versions still being tried), whether Mosaic looks every day, and whether it updates on its own. Automatic updates happen between 01:00 and 05:00 when no run is in progress, and never for a version marked Needs action.
Looking for versions is a plain request for a public list and sends nothing about your installation. MOSAIC_UPDATE_CHECK=off stops it.
A copy that runs from the source (a checkout of the repository) is updated the same way, from the same button: it fetches the new commits from its remote, stops, moves the checkout forward, installs and builds what changed, and starts again. It only ever moves forward by fast-forward, so uncommitted work is never overwritten; if such work is in the way, the update is refused before anything stops. A server started with npm run dev cannot update itself, because that mode restarts on every file change.
By hand, should you ever need to: take a backup under Storage → Backups, download the new package, close Mosaic, unzip the package over the folder Mosaic runs from, and start it with start.cmd or ./start.sh.
The hosted service is updated by us.
#Docker
From a clone of the repository:
cd infrastructure/docker
cp .env.example .env
docker compose up -dMosaic answers on http://localhost:4317. Data persists in a named volume, mosaic-data, mounted at /var/lib/mosaic.
The compose file ships no Redis and no Postgres on purpose — the job queue is a table, so a single-container install has nothing else to operate.
#Settings worth knowing
Nothing has to be set to start a local install. Every one of these has a working default.
| Variable | Default | What it does |
|---|---|---|
MOSAIC_DATA_DIR | %APPDATA%\Mosaic on Windows, ~/.local/share/Mosaic otherwise | Where the database and encryption key live |
MOSAIC_PORT | 4317 | The port Mosaic listens on |
MOSAIC_HOST | 127.0.0.1 | Set to 0.0.0.0 to accept connections from other machines |
MOSAIC_PUBLIC_URL | http://<hostname>:<port> | The address published pages and webhooks use |
MOSAIC_LICENCE | unset | A licence key, if you are not installing one through the interface |
MOSAIC_DB_DRIVER | sqlite | postgres for a multi-instance deployment; needs DATABASE_URL |
MOSAIC_DEMO_WORKSPACE | on | Set to off to stop the Demo workspace being created |
MOSAIC_UPDATE_CHECK | on | Set to off to stop Mosaic asking which newer versions exist. See Updating |
MOSAIC_REQUIRE_MFA | off | 1 makes two-factor authentication compulsory for everybody. See Two-factor and SSO |
MOSAIC_OIDC_ISSUER, MOSAIC_OIDC_CLIENT_ID, MOSAIC_OIDC_CLIENT_SECRET, MOSAIC_OIDC_NAME | unset | Single sign-on through your identity provider |
MOSAIC_SAML_ENTRY_POINT, MOSAIC_SAML_IDP_ISSUER, MOSAIC_SAML_CERT, MOSAIC_SAML_NAME | unset | Single sign-on over SAML 2.0, for providers without OpenID Connect |
MOSAIC_SSO_ONLY | off | 1 refuses password sign-in once single sign-on is set up |
MOSAIC_LOG_DRAIN_URL, MOSAIC_LOG_DRAIN_TOKEN, MOSAIC_LOG_DRAIN_AUTH_HEADER | unset | Send the server log to your own log collector or SIEM as well as standard output: batches of JSON over HTTPS, with the token as a bearer token or in the header you name. Add _2 to each name for a second collector beside the first |
MOSAIC_ALERT_WEBHOOK_URL | unset | Post a message to a Slack, Teams or Discord incoming webhook when the server logs an error |
MOSAIC_SMTP_HOST, MOSAIC_SMTP_PORT, MOSAIC_SMTP_SECURE, MOSAIC_SMTP_USER, MOSAIC_SMTP_PASSWORD, MOSAIC_SMTP_FROM | unset | Not needed: add an SMTP server under Integrations instead. Set, they are the mail server for every workspace that has none of its own. With neither, Mosaic sends no email at all. Port defaults to 587; MOSAIC_SMTP_SECURE=true for TLS from the start; MOSAIC_SMTP_FROM falls back to the user |
MOSAIC_MAIL_LOG_RETENTION_DAYS | 90 | How many days Observability → Emails keeps each message a schedule or a workflow sent |
MOSAIC_COLLECTION_CONCURRENCY, MOSAIC_JOB_CONCURRENCY | unset | How many hosts of a collection are queried at once, and how many runs are carried out at once. Leave them unset to choose under Tenancy → Performance with no restart; set, they win over that screen. See Performance |
#Where your data lives
A local install keeps everything in one directory — the one MOSAIC_DATA_DIR names. Inside it are mosaic.db, the SQLite database, and secret.key, which encrypts stored credentials. There is no shared state anywhere else on the machine, which is what makes the install a folder you can move or delete.
Back up that directory and you have backed up Mosaic.
#Backing up
Mosaic takes a copy of its database every day on its own, and owners can take one, download it or restore it under Storage → Backups (see Storage and audit). Those copies sit on the same disk, so also copy them somewhere else. If you back up the folder yourself:
- Both files, together.
mosaic.dbwithoutsecret.keyrestores every check, but every stored database password and API key in it is unreadable, and there is no way to recover them. - Not a plain copy while Mosaic is running. The database is written continuously, and a file copied mid-write can be unusable. Either stop the service for the copy, or use SQLite's own online backup, which is safe while Mosaic runs:
sqlite3 mosaic.db ".backup 'mosaic-backup.db'"- On Postgres, back up the database with your usual tooling (
pg_dump, or your provider's backups), and keepMOSAIC_MASTER_KEYwith it, in a separate place. - Try a restore now and then: point a spare install's
MOSAIC_DATA_DIRat a copy and sign in. A backup nobody has restored is a hope, not a backup.
For a deployment that runs more than one instance, point MOSAIC_DB_DRIVER at postgres and give it a DATABASE_URL. SQLite is a file, so it is single-host by construction.
#Next
First sign-in — claiming the installation and finding your way around.