# Workshare server on Linux: first-time setup guide

For: someone who has never set up a server. Time: about 1 hour of your work, plus waiting on your manager.
Result: the Workshare server runs all the time on the Linux server, starts by itself after a reboot, uses HTTPS,
and makes a backup every night. Customers' apps connect to `https://workshare.globalinfocloud.in`.

You type everything in a terminal. Every command is given exactly; copy, paste, press Enter.

---

## 0. The picture

```
 Unity (your PC and colleagues' PCs)
        │  https://workshare.globalinfocloud.in     (encrypted)
        ▼
 ┌──────────────── Linux server ─────────────────┐
 │  Caddy       ports 80 + 443, handles HTTPS     │
 │     │  forwards to 127.0.0.1:8080 (inside)     │
 │     ▼                                          │
 │  workshare   the Node.js server (a "service")  │
 │     │                  │                       │
 │     ▼                  ▼                       │
 │  MySQL             /var/lib/workshare/models   │
 │  (customer data)   (the house files)           │
 │        └──────► nightly backup ◄──────┘        │
 └────────────────────────────────────────────────┘
```

- **Node.js** runs the Workshare code. Your manager installed it. ✔ (Step 3 checks that the service can use it.)
- **Caddy** is a free program that does HTTPS and gets a free certificate (Let's Encrypt) automatically.
  The installer installs it.
- **A service** (systemd) is a program that starts with the server and restarts by itself if it crashes. The
  installer creates it, named `workshare`.
- **MySQL** is the database (the company's MySQL 8, which already runs on the server). Workshare gets its own
  database `workshare` in it for the customer data: which houses exist, who is a member, who owns which part, the
  history, the requests, and a log of who did what. Think of it as a very careful notebook: a change is either
  written completely or not at all. The house drawings themselves stay as files in `/var/lib/workshare/models`.
  (On a server without MySQL the installer sets up PostgreSQL instead; the server works the same with either.)

---

## 1. Do you need admin rights?

**Yes, once.** On Linux "admin" means **sudo**: your user may run commands as `root` by putting `sudo` in front.
It's needed to install Caddy, create the `workshare` service, open the firewall, and add the backup.

**After the installation you only need sudo for:** updating to a new version, restarting the service, and
reading the logs. Daily use from Unity needs nothing.

Ask your manager for one of these:
- **A.** Your own login on the server with sudo rights (he can take sudo away afterwards), or
- **B.** He logs in and runs the installer while you watch (about 10 minutes, step 5).

---

## 2. What you need from your manager

| # | What | Why | How he finds it |
|---|---|---|---|
| 1 | **Server address and SSH login** (user name + password or SSH key) | To reach the server | |
| 2 | **sudo rights** for that user (or option 1B) | The installation | `sudo -v` must not say "not in the sudoers file" |
| 3 | **Linux distribution and version** | Ubuntu/Debian and RHEL/Rocky/Alma are supported | `cat /etc/os-release` |
| 4 | **How Node.js was installed** | If it was installed with **nvm** inside his own folder, the service can't use it (section 9) | `which node` and `node --version`. Good: `/usr/bin/node` or `/usr/local/bin/node`, v20+. Problem: `/home/<name>/.nvm/...` |
| 5 | A **domain name** pointing to the server's **public IP** (DNS "A record") | HTTPS certificates need a name | `workshare.globalinfocloud.in` → `203.0.113.25` |
| 6 | **Ports 80 and 443 open** to the server in the **cloud / company firewall** (AWS security group, Azure NSG, router port forwarding...) | Unity and the certificate check come in here | Port 8080 stays **closed** |
| 7 | Is the server's **public IP fixed** (static)? | DNS points to it | |
| 8 | Can we use **Cloudflare** for the domain? | Hides the server, absorbs attacks | |
| 9 | **Nothing else using ports 80/443** on the server (nginx, Apache, another site) | Caddy needs them | `sudo ss -ltnp | grep -E ':80 |:443 '` → should print nothing |
| 10 | **4 CPU cores, 8 GB RAM, 40 GB+ free disk** (minimum 2 cores / 4 GB for testing) | Several customers syncing at once; every version is kept | `nproc`, `free -h`, `df -h /var` |
| 11 | **Where to copy backups off the server** (another machine, NAS, cloud bucket) | A backup on the same disk doesn't survive a disk failure | |
| 12 | An **e-mail address** for certificate notices (internet setup) | Let's Encrypt warnings | |

---

## 3. Connect to the server (from your Windows PC)

Windows 10/11 already includes SSH. Open **PowerShell** (Start → type `PowerShell`):
```powershell
ssh youruser@server-address
```
- The first time it asks `Are you sure you want to continue connecting?` → type `yes`.
- Type the password (nothing appears while typing; that's normal) → Enter.
- You're in when the prompt changes to something like `youruser@server:~$`.
- To leave: type `exit`.

Five commands are enough for this guide:

| Command | Meaning |
|---|---|
| `pwd` | which folder am I in |
| `ls` | list files here |
| `cd foldername` | go into a folder (`cd ..` = up one, `cd ~` = home) |
| `sudo <command>` | run as admin (asks your password the first time) |
| `nano file` | edit a text file (save: Ctrl+O, Enter; quit: Ctrl+X) |

---

## 4. Internet setup (required: the users are customers)

Customers connect from their homes over the internet, so use the **internet setup**:
- a domain name, e.g. `workshare.globalinfocloud.in`, pointing to the server's public IP
- ports **80 and 443** open to the server (8080 stays closed)
- strongly recommended: put **Cloudflare** in front (free plan). It hides the server's real IP and absorbs
  attacks. Start with Cloudflare's DNS in **"DNS only" (grey cloud)** until the certificate works, then switch to
  **"Proxied" (orange cloud)** and set SSL mode **Full (strict)**. With the orange cloud, add
  `WORKSHARE_PROXY_HOPS=2` to `/etc/workshare/workshare.env` and restart.

The `--lan` (office only) option in the installer is only for internal testing, never for customers.

**Before customers use it:** the server still identifies people by join code + key on their PC. A customer who
reinstalls Windows loses access to their own house. Customer login must be connected first (see
`WORKSHARE_PRODUCTION_GAP_ANALYSIS.md`, section 0). Until then, use the server for internal tests and pilots only.

---

## 5. Install

### 5.1 Give the server read access to the GitHub repo (deploy key)

The repo is private (https://github.com/Dikshant294/kavion-workshare-server), so the server needs a key. A **deploy key**
can only read this one repo, which makes it safer than a password.

On the **server**:
```bash
ssh-keygen -t ed25519 -C "workshare-server" -f ~/.ssh/workshare_deploy -N ""
cat ~/.ssh/workshare_deploy.pub
```
Copy the whole line it prints (starts with `ssh-ed25519`).

On **GitHub** (browser): repo → **Settings** → **Deploy keys** → **Add deploy key** → Title `company server` →
paste the line → leave **Allow write access unticked** → **Add key**.

Back on the **server**, tell SSH to use that key for GitHub:
```bash
cat >> ~/.ssh/config <<'CFG'
Host github-workshare
    HostName github.com
    User git
    IdentityFile ~/.ssh/workshare_deploy
    IdentitiesOnly yes
CFG
chmod 600 ~/.ssh/config
ssh -T github-workshare
```
Type `yes` the first time. It should say `Hi Dikshant294/kavion-workshare-server! You've successfully authenticated`.

### 5.2 Download the code (on the server)
```bash
sudo apt-get install -y git        # RHEL / Rocky / Alma: sudo dnf install -y git
cd ~
git clone git@github-workshare:Dikshant294/kavion-workshare-server.git
cd kavion-workshare-server
```
(No GitHub access from the server? Use the release zip instead: from your PC
`scp kavion-workshare-server-0.10.0.zip youruser@server-address:~`, then on the server
`mkdir -p ~/kavion-workshare-server && cd ~/kavion-workshare-server && unzip -o ~/kavion-workshare-server-0.10.0.zip`.)

### 5.2b Our database: MySQL (ask your manager)

The company server already runs **MySQL 8**, so Workshare keeps its customer data there (instead of installing
PostgreSQL). Your manager does this once in MySQL (he knows how to open it, usually `sudo mysql`):
```sql
CREATE DATABASE workshare CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'workshare'@'localhost' IDENTIFIED BY 'make-up-a-long-random-password';
GRANT ALL PRIVILEGES ON workshare.* TO 'workshare'@'localhost';
```
The same commands, plus all the Workshare tables, are in the file `deploy/workshare-mysql.sql` (change the password
in it first, then `sudo mysql < deploy/workshare-mysql.sql`). Creating the tables is optional: the installer does it.

Then, on the server, put the address in a file (replace the password):
```bash
sudo sh -c 'echo "mysql://workshare:make-up-a-long-random-password@127.0.0.1:3306/workshare" > /root/workshare-db-url'
sudo chmod 600 /root/workshare-db-url
```
In 5.3 and 5.4 add `--mysql-url-file /root/workshare-db-url` to the command. The installer then installs the MySQL
driver (the server needs internet for this once), checks the login and the MySQL version, and creates the tables.
If something is wrong it says what (wrong password, missing rights, MySQL too old) and changes nothing.

### 5.3 Check first (changes nothing)
```bash
sudo sh deploy/linux/install-linux.sh --check
```
Every line should say **OK** (WARN is acceptable). Each **FAIL** says what's wrong; section 9 has the fixes.

### 5.4 Install
```bash
sudo sh deploy/linux/install-linux.sh --domain workshare.globalinfocloud.in --email <your work e-mail> --mysql-url-file /root/workshare-db-url
```
(`--mysql-url-file` = our MySQL, section 5.2b. Without it the installer sets up PostgreSQL instead.)

It takes 1–3 minutes, then prints **Done.** and the Unity address. It's safe to run again: models, the database and
the create token are kept. If this server already ran an older version that kept everything in files, the installer
makes a backup and moves those models into the database by itself (the old files stay untouched).

What it did:
- created the `workshare` system user and the folders
- installed the `workshare` service (it starts at boot)
- installed the MySQL driver, checked the login to your MySQL, created the Workshare tables, and told the server to
  use it (without `--mysql-url-file`: installed PostgreSQL and its `workshare` database instead)
- installed and configured Caddy
- opened ports 80/443 in the server's firewall (ufw or firewalld)
- added the 02:30 nightly backup (database + house files in one `.tar.gz`)

### 5.5 Where everything is

| What | Where |
|---|---|
| Server program | `/opt/workshare` |
| **Customer data (the important data)** | MySQL database `workshare` (address in `/etc/workshare/database-url`) → look inside: `mysql -u workshare -p workshare` (type `exit` to leave). With PostgreSQL instead: `sudo -u workshare psql workshare` |
| **House files (also important)** | `/var/lib/workshare/models` |
| Backups | `/var/backups/workshare` (one `.tar.gz` per night, 14 days kept) |
| Settings, create token, database address | `/etc/workshare/workshare.env` → `sudo cat /etc/workshare/workshare.env` |
| Service definition | `/etc/systemd/system/workshare.service` |
| Caddy config | `/etc/caddy/Caddyfile` |
| Logs | `journalctl -u workshare -f` (live, Ctrl+C to stop) and `journalctl -u caddy -f` |

---

## 6. Check that it works

On the **server**:
```bash
systemctl status workshare --no-pager     # "active (running)" in green
curl http://127.0.0.1:8080/ready          # {"ok":true}   (also means the database answers)
systemctl status mysql --no-pager         # "active"  (RHEL / Rocky: mysqld)
```
On **your PC**, in a browser: `https://workshare.globalinfocloud.in/health` (or `https://192.168.1.50/health`)
→ `{"ok":true}` with a padlock.

| You see | Meaning / fix |
|---|---|
| Page never loads (timeout) | Port 443 is blocked between your PC and the server: cloud/company firewall (manager, item 7) |
| Certificate error, internet setup | DNS doesn't point here yet, or port 80 is blocked. Wait 10 min after a DNS change; watch `journalctl -u caddy -f` |
| `browser origins are not allowed` on other URLs | Correct: only Unity may use the API |

---

## 7. (Internal testing only) Office-only setup: trust the certificate on each Unity PC

Once per PC (only for the `--lan` setup).
1. Copy the root certificate to your PC. On the **server** (use the path the installer printed at the end, if it differs):
   ```bash
   sudo cp /var/lib/caddy/.local/share/caddy/pki/authorities/local/root.crt ~/workshare-root.crt
   sudo chown $USER ~/workshare-root.crt
   ```
   On **your PC** (PowerShell):
   ```powershell
   scp youruser@server-address:~/workshare-root.crt .
   ```
2. Double-click `workshare-root.crt` → **Install Certificate** → **Local Machine** → **Place all certificates in
   the following store** → Browse → **Trusted Root Certification Authorities** → Finish.
3. Browser: `https://192.168.1.50/health` shows a padlock, no warning. Put the `.crt` on a shared drive for colleagues.

---

## 8. Connect Unity

1. Replace `Assets/Workshare/Runtime/WorkshareClient.cs` with the one in `UnityClientPatch/`, and add
   `WorkshareModelsProd.cs` next to it.
2. Setup Object → **WorkshareController** → **Default Server Url** = the https address. Save the scene.
3. For internal tests, give Unity the create token (from `sudo cat /etc/workshare/workshare.env`),
   for example in a startup script:
   ```csharp
   Exoa.Designer.Workshare.WorkshareClient.CreateToken = "<token>";
   ```
   Joining with a join code doesn't need it. **Don't ship the token in the customer app**: anyone can extract it. For customers, model creation will be tied to their login.
4. Player Settings → Other Settings → **Allow downloads over HTTP** → **Not allowed**.
5. Play → Workshare panel → Server = the https address → **New central model**; colleagues **Join** with the code.
6. Make a second person admin, so a lost PC never locks a model. The server supports this
   (`WorkshareClient.SetAdmin`); the Team tab doesn't have the button yet.

**Move your dev models** (optional): from your PC, copy the old `data\models` folder up, then put it in place:
```powershell
scp -r .\WorkshareServer\data\models youruser@server-address:~/old-models
```
```bash
sudo systemctl stop workshare
sudo cp -r ~/old-models/* /var/lib/workshare/models/
sudo chown -R workshare:workshare /var/lib/workshare
sudo systemctl start workshare
```

---

## 9. Problems and fixes

**FAIL: Node is inside a home folder / "node not found for root" (nvm).**
nvm installs Node only for one user, and the service can't use it. Ask your manager to install Node system-wide
(it can stay next to nvm):
```bash
# Ubuntu / Debian
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
# RHEL / Rocky / Alma
curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -
sudo dnf install -y nodejs
```
Then `sudo node --version` shows v22 and the check passes.

**FAIL: port 80/443 already used by 'nginx' / 'apache2' / 'httpd'.**
Another website runs on this server. Either your manager stops it (`sudo systemctl disable --now nginx`), or the
existing nginx does the HTTPS instead of Caddy: tell me and I'll give you the exact nginx config
(`deploy/nginx.conf` is the start).

**`sudo: ... is not in the sudoers file`.** You don't have admin: manager, item 2.

**Service not running.** `journalctl -u workshare -n 50 --no-pager` shows why. Send me the output.

**Unity: "Cannot reach the server" / "Secure connection failed".** Test `/health` in a browser on the same PC first
(section 6).

**FAIL: the database check failed (MySQL).** The installer prints why, for example: wrong user or password, the
database does not exist, the user lacks rights on it, or MySQL is older than 8.0. Fix it with your manager (the SQL
is in section 5.2b), then run the installer again. You can check the address any time with
`sudo -u workshare env WORKSHARE_DATABASE_URL_FILE=/etc/workshare/database-url node /opt/workshare/tools/db-setup.js`.

**FAIL: the workshare user cannot log in to PostgreSQL** (PostgreSQL setup only). The database only allows "peer" login (Linux user =
database user). Show your manager: `sudo grep -v '^#' /etc/postgresql/*/main/pg_hba.conf` (Ubuntu) or
`sudo grep -v '^#' /var/lib/pgsql/data/pg_hba.conf` (RHEL). There must be a line `local all all peer`.

**`/ready` says the database is down / Unity shows "server busy, try again" (HTTP 503).** The server is fine but
the database isn't answering. `systemctl status mysql --no-pager`, then `sudo systemctl restart mysql` (RHEL:
`mysqld`; with PostgreSQL: `postgresql`).
Nothing is lost: the server refuses to say "saved" unless the database really saved it, and the Unity app retries.

**Unity: "too many requests".** Raise the limit: `sudo nano /etc/workshare/workshare.env`, add
`WORKSHARE_RPM_MEMBER=1200`, save, `sudo systemctl restart workshare`.

---

## 10. Everyday operations

| Task | Command |
|---|---|
| Is it running? | `systemctl status workshare --no-pager` |
| Restart | `sudo systemctl restart workshare` |
| Live log | `journalctl -u workshare -f` |
| Errors of the last hour | `journalctl -u workshare --since "1 hour ago" -p warning` |
| Backup now | `sudo WORKSHARE_ENV_FILE=/etc/workshare/workshare.env WORKSHARE_DATA_DIR=/var/lib/workshare/models BACKUP_DIR=/var/backups/workshare sh /opt/workshare/deploy/backup.sh` |
| Is the database running? | `systemctl status mysql --no-pager` (RHEL: `mysqld`) |
| A customer deleted a house by mistake | The house's admin restores it in the app: Your central models → **Restore** (within 30 days). List: `sudo mysql workshare -e "SELECT id, name, deleted_at FROM models WHERE deleted_at IS NOT NULL"` |
| How many customer houses? | `sudo mysql workshare -e "SELECT COUNT(*) FROM models"` |
| Who did what (last 20) | `sudo mysql workshare -e "SELECT at, action, actor_member, client_ip FROM audit_log ORDER BY id DESC LIMIT 20"` |
| Check the database connection | `sudo -u workshare env WORKSHARE_DATABASE_URL_FILE=/etc/workshare/database-url node /opt/workshare/tools/db-setup.js` |

(`sudo mysql` works when MySQL lets root in through the system login, the Ubuntu default; otherwise use
`mysql -u workshare -p workshare` and type the Workshare password. With PostgreSQL use `sudo -u workshare psql workshare -c "..."`.)
| List backups | `ls -lh /var/backups/workshare` |
| Disk space | `df -h /var` |
| Change a setting | `sudo nano /etc/workshare/workshare.env` then restart (all settings: `/opt/workshare/src/config.js`) |

**Update to a new version:** push your changes from your PC (`git add .`, `git commit -m "..."`, `git push`), then on the server:
```bash
cd ~/kavion-workshare-server
git pull
sudo sh deploy/linux/update.sh
```
It backs up first, installs the new version, restarts, and **rolls back by itself** if the new version doesn't start.

**Restore after a disaster** (puts the database and the house files back to the night of the backup), with MySQL:
```bash
sudo systemctl stop workshare
mkdir -p /tmp/restore && cd /tmp/restore && sudo tar -xzf /var/backups/workshare/workshare-<date>.tar.gz
sudo mysql -e "DROP DATABASE workshare; CREATE DATABASE workshare CHARACTER SET utf8mb4 COLLATE utf8mb4_bin"
sudo mysql workshare < /tmp/restore/workshare.sql
sudo cp -r /tmp/restore/models/* /var/lib/workshare/models/
sudo chown -R workshare:workshare /var/lib/workshare
sudo systemctl start workshare
```
(The `workshare` MySQL user keeps its rights: they belong to the user, not to the dropped database.)

With PostgreSQL instead, the database lines are:
```bash
sudo -u postgres dropdb workshare
sudo -u postgres createdb -O workshare workshare
sudo -u workshare pg_restore -d workshare --no-owner /tmp/restore/workshare.dump
```
(A backup from an older file-only version has no database file: then only the `cp` line applies, and run
`sudo -u workshare env WORKSHARE_DATA_DIR=/var/lib/workshare/models WORKSHARE_DATABASE_URL_FILE=/etc/workshare/database-url node /opt/workshare/tools/import-files-to-db.js`
before starting.) Practise this once on the test setup (TESTING.md, stage 3) so you've done it before you need it.

**Copy backups off the server:** ask your manager to copy `/var/backups/workshare` to another machine every day
(rsync, NAS, or cloud with rclone: the backup script uploads by itself when `RCLONE_REMOTE` is set).

**Never** start a second copy of the server (e.g. `npm start` "for a test") on `/var/lib/workshare/models` or on the
`workshare` database.
For tests use another folder and port: `PORT=8090 WORKSHARE_DATA_DIR=/tmp/test-models node src/server.js`.

---

## 11. Optional: deploy from GitHub Actions

Do this only after the manual install (section 5) works.

- **CI** (`.github/workflows/ci.yml`) runs all tests on every push. It deploys nothing and needs no setup. You
  see a green tick or red cross next to each commit on GitHub.
- **Deploy** (`.github/workflows/deploy.yml`) runs **only when you ask**: Actions tab → "Deploy to server" →
  Run workflow, or by pushing a version tag (`git tag v0.3.1` then `git push origin v0.3.1`). Never on every push,
  because customers are using the server. It runs the tests, then the server backs up, installs, health-checks, and
  rolls back by itself if the new version doesn't start.

One-time setup on the server (from the repo folder):
```bash
git pull
sudo sh deploy/linux/setup-ci-deploy.sh git@github-workshare:Dikshant294/kavion-workshare-server.git
```
It prints a second read-only deploy key (add it on GitHub) and the four secrets to add under repo **Settings →
Secrets and variables → Actions**: `DEPLOY_HOST`, `DEPLOY_PORT`, `DEPLOY_SSH_KEY`, `DEPLOY_KNOWN_HOSTS`.

Safety: the key stored in GitHub can only run `deploy <commit>` on the server. It can't open a shell or read files.

**Needs from your manager:** GitHub's machines must reach the server's SSH port from the internet. If that isn't
allowed, keep deploying by hand (`git pull` + `update.sh`), or ask me for the "self-hosted runner" variant, where the
server fetches jobs from GitHub and no port is opened.

**PM2:** not needed. The `workshare` systemd service already restarts on crashes, starts at boot and keeps logs.
If your company standardises on PM2, `ecosystem.config.js` is ready. Use it **instead of** the systemd service, and
always with **1 instance in fork mode**; cluster mode corrupts models.

---

## 12. Releasing a new app version

Full steps: `UnityInstaller/README.md`. Short version:
1. Unity Player Settings > **Version** up (e.g. `0.1.1`), build to `Build\Windows`, run `build-installer.cmd 0.1.1`.
2. Upload `KavionSetup-0.1.1.exe` (e.g. to Cloudflare R2, public https link).
3. On the server:
   ```bash
   sudo nano /etc/workshare/workshare.env
   ```
   add or change:
   ```
   WORKSHARE_LATEST_APP_VERSION=0.1.1
   WORKSHARE_DOWNLOAD_URL=https://<your-download-domain>/KavionSetup-0.1.1.exe
   ```
   then `sudo systemctl restart workshare`. Older apps show "A new version is available".
4. Only when old apps must stop: add `WORKSHARE_MIN_APP_VERSION=0.1.1`. Older apps then show "Update required"
   and can't sync until they update.

---

## 13. Switching on Kavion login (customers' own accounts)

What it does: customers use Workshare with their **Kavion login**. They can create houses without the create
token, get their houses back on a new PC ("Find my models"), and a copied member key is useless without its
owner's login. The server checks each login with parent.globalinfocloud.in; it never stores the token.

**Step 1 – check the real Kavion API (on your PC, once).** Log in to the Kavion app, then in cmd:
```cmd
cd /d D:\Projects\WorkshareServer
node tools\kavion-login-check.js --file "%USERPROFILE%\AppData\LocalLow\kavion\kavion v4 sept\login_data.json"
```
(The folder is `AppData\LocalLow\<Company Name>\<Product Name>` from Unity's Player Settings.) It tries your login
and a wrong one and prints a verdict. It never prints your token, number or data.
- **OK** → go on.
- **PROBLEM** → don't switch on yet; send the output to the developer. Usually the fix is another endpoint
  (`--url https://parent.globalinfocloud.in/AllItemList`) or a check endpoint from the backend team.

**Step 2 – the Unity app** must contain `UnityClientPatch_0.9` and the **Workshare Kavion Login** component.

**Step 3 – the server:**
```bash
sudo nano /etc/workshare/workshare.env
```
add:
```
WORKSHARE_KAVION_AUTH=optional
```
(and `WORKSHARE_KAVION_VERIFY_URL=...` only if step 1 told you to use another endpoint), then
`sudo systemctl restart workshare`. Check the log: `journalctl -u workshare -n 20 --no-pager` shows
`kavionLogin=optional via parent.globalinfocloud.in`.

With **optional**, everything keeps working as before; each member gets linked to their Kavion account the first
time they use the updated app. After a few weeks, when all customers have the updated app, switch to
`WORKSHARE_KAVION_AUTH=required`: then nobody gets in without a valid Kavion login.

**Never change `WORKSHARE_ACCOUNT_SECRET`** (the installer made it, it's in the same file). Customers' accounts are
stored with it; a new secret would cut every customer off from their houses. It is included in the nightly backup.

**If parent.globalinfocloud.in is down:** people who were already working keep working (logins checked in the last
24 hours are trusted); new logins get "try again in a moment" until it's back.
