Ohmnia FR

Ohmnia and your NAS

Three different things hide behind "putting Ohmnia on the NAS". Pick yours: each takes a few minutes to set up, except the last one, which does not exist yet and is worth understanding before you improvise.

Keeping your data safe on the NAS

This is the real need behind most NAS questions, and it is the simplest: your data stays on your computer, and an encrypted copy is placed on the NAS regularly. If the computer dies, everything is still there.

  1. On your NAS, create a shared folder — Ohmnia-backups, for instance — and connect it as a network drive on your computer.
  2. In Ohmnia, open App settingsEncrypted external backup, then Choose folder… and point it at that folder.
  3. Choose a password and write it down somewhere else — on paper, or in a password manager. It is stored nowhere: if it is lost, the archive becomes permanently unreadable.
  4. Click Back up now (encrypted). Repeat regularly, or after any large batch of entries.

The archive is encrypted before being written: even someone with access to the NAS cannot read anything without the password. And because this is a one-off deposit rather than permanent access, there is no risk to the database.

Check once that it actually restores. A backup that has never been tested is a backup of unknown value: do a trial restore on a computer that does not matter, or at the very least open the folder and watch the file arrive.

Working from two computers

A desktop at the office, a laptop on the road, one person in charge: the NAS acts as the handover point. The rule fits in one sentence — only one computer holds the data at a time.

  1. Close Ohmnia on the computer you are leaving, so that no write is in progress.
  2. Back up now (encrypted) to the NAS folder.
  3. On the other computer, in the same screen, restore that backup. It replaces the local data.
  4. Work as usual, and repeat in the other direction when you leave.

Get into the habit of backing up when you leave, not when you arrive. Forget once and you will restore an older version over your recent work, and there is no way to merge two databases.

Updating every computer from the NAS

Useful as soon as there is more than one computer: each one updates itself from the local network, without anything leaving your premises.

  1. Put the contents of the release folder on the NAS — the installer, latest.yml and the .blockmap file — in a folder served over HTTP.
  2. On each computer, open App settingsUpdates, enter the address of that folder (for example http://192.168.1.20/ohmnia) and click Save address.
  3. Tick automatic checking if you want each computer to offer the update on its own.

Downloading and installing remain explicit actions by the user, and a backup of the database is made automatically before each installation.

Working together at the same time

This is not possible today, and the natural temptation — moving the database file onto the NAS so everyone can open it — is precisely what must not be done.

Why that destroys data

Ohmnia keeps everything in a SQLite file. To stop two writes from colliding, SQLite relies on the operating system's file locking. That locking is not reliable across a network share: over SMB or NFS, locks are approximate and sometimes simply ignored.

Two computers writing to the same networked database will eventually produce a damaged file. And it gives no warning: the application keeps working, and the problem surfaces weeks later — in backups that faithfully copied an already-corrupted database.

This is not a limitation of Ohmnia but of SQLite, and it applies to every program that uses it. A synchronised folder (Dropbox, OneDrive, Synology Drive) is worse still: it copies the file mid-write and creates conflicted versions.

A genuine multi-computer version requires a server that owns the database, installed on the NAS, with the application becoming a client that talks to it over the network. That means accounts and permissions, handling two people editing the same invoice, and securing the service. It is a project in its own right, and a different product from the one described on this site: the data would no longer be on your machine, but on the company's NAS.

The subject is being worked on. Until it is done properly, nothing of the sort is offered for download — rather than shipping a workaround that loses somebody's accounts.