A firm runs Open ADMS on its own server: one Linux machine (a cloud VM or one in its office) with Docker. The install builds everything on that server from the release, asks the firm’s answers, starts with no data, and ends by printing the addresses the firm’s people use.
For trying Open ADMS on your own computer, with the sample projects, use the
Quick start (pnpm start) instead.
Before you start
Section titled “Before you start”- A Linux server with Docker Engine and its Compose plugin. Nothing else: no Node, no database, no web server. 4 CPUs, 8 GB of memory and 50 GB of disk suit a county-sized region (the map data for a large state needs more).
- A domain for it, such as
adms.yourfirm.com, with three DNS records pointing at the server:office.,field.andapi.under it. - Ports 80 and 443 open to the internet, so Let’s Encrypt can issue the certificates. A server on a private network can use the installation’s own certificates instead (the install asks).
- A mail server the installation may send through (optional): password resets and the daily report.
Install
Section titled “Install”git clone https://github.com/MrRyanAlexander/openadms.gitcd openadms./adms installIt builds the installer’s image, then asks seven questions:
- The firm that runs this installation.
- What the firm calls its ADMS, shown across the back office and on the phones.
- The domain: the back office answers at
office.<domain>, the field app atfield.<domain>, the API atapi.<domain>. - Certificates: Let’s Encrypt’s, where the internet reaches the server (it asks for an address
to write to about them); otherwise the installation’s own root, which each browser and phone
trusts once (
./adms rootprints it). - Email: the mail server’s address with its login (
smtps://user:password@host:465), and the address mail comes from; or none, and an admin resets people’s passwords. - Map data for the firm’s region: an OpenStreetMap extract (
.osm.pbf) from download.geofabrik.de, for road miles and address lookup. It is downloaded once and pinned by its SHA-256. - The master passcode: one per firm. It enrols the monitors’ phones and opens the supervisor’s actions on a phone.
Then it sets the database up (a login for each service, the migrations, the database’s own guards, the firm’s lists), writes each service’s settings, builds the web apps for the firm’s addresses, and asks for the firm’s first admin: their email address, name and password. They sign in to the back office and set everything else up, the firm’s own clients, contracts and projects first. Last, it starts every service, checks each one, and prints the addresses:
✓ the database answers, and the API's login opens it✓ the migrations are at head✓ the API answers over TLS (200)…Gates Disaster Recovery on this server: the back office and the viewer portal https://office.adms.yourfirm.com the field app https://field.adms.yourfirm.com the API https://api.adms.yourfirm.comThe first start builds the map data from the extract: from a few minutes for a small state to an hour for a large one.
Run it
Section titled “Run it”| Command | What it does |
|---|---|
./adms start | Starts it again, its certificates renewed where they end, then checks every part |
./adms stop | Stops it; every record and file is kept |
./adms status | Each service’s state, every part checked, the addresses |
./adms logs | Its logs (warnings and errors); ./adms logs -f api follows the API’s |
./adms admin | Makes the firm’s first admin, or lets an admin back in when no other admin can |
./adms root | The installation’s own root certificate, where its addresses use it |
./adms licences | The licences of everything it is built on (also at office.<domain>/licences/) |
What it is, on the server
Section titled “What it is, on the server”- Lean: the images hold the built code and its production dependencies alone; the web apps are minified; the API and the worker log warnings and errors only.
- Empty at the start: no sample, no test database, no account but the admin the firm made.
- Only Caddy is reachable from outside, on ports 80 and 443. The database, the file store and the map servers answer on the installation’s own network alone, and every hop inside it is over TLS from the installation’s own root.
- Secrets stay on the server, each in a Docker volume of its own, readable by the one service that needs it. Nothing prints one.
Backups
Section titled “Backups”Evidence is kept indefinitely, so back up the two volumes that hold it, open-adms_pg_data (the
database) and open-adms_objectstore_data (photos and files), and the setup’s own volume,
open-adms_setup_state (the secrets that open them). Rehearse a restore.