# Pier for macOS — pre-beta

Pier puts a cloud or a server — Nextcloud and any other WebDAV, SFTP, NFS — into Finder as an ordinary drive
(`/Volumes/<name>`). Files are fetched when they are opened and stay in a cache on the Mac; changes go up to the
server in the background; without a network the drive works from the cache. Encrypted backups of folders are
included (Pier Backup). It is the same Pier as on Windows: the same window, the same settings, 16 languages.

Version 0.3.3, open pre-beta. The package is universal (Intel and Apple Silicon) but has so far been checked on
one Mac: Intel, macOS 12. If you have Apple Silicon or macOS 13–15, install it and tell us how it went:
<https://new-imobile.com/contact>.

На русском: [README.ru.md](README.ru.md).

## Free for half a year, then Pro

- Pier for Mac works with no time limit for half a year (182 days) from its first run.
- 14 days after the first run it asks for a registration — free, just an e-mail address (as on Windows).
  Without it the drives are disconnected until you register.
- 14 days before the half-year ends a warning appears at the bottom of the window. Once it is over the drives
  are disconnected, Pier opens the Pier Pro checkout in your browser and shows a "Pro license required" window
  (later on, at most once a day). Restoring from backups works without Pro.
- Pier Pro is $19 a year: <https://new-imobile.com/order/pier?plan=pro&lang=en>. No drive limit, no ads,
  scheduled backups. The license belongs to your e-mail and covers Windows and the Mac alike — up to
  10 computers.
- Paid? Press "Already paid — check" in that window (or "Refresh license" on the Account tab). Pier has to be
  registered with the e-mail the purchase was paid with. The drives connect again by themselves.
- Reinstalling Pier does not extend the half-year.

Until the half-year ends Pier for Mac is the free version, as on Windows: up to 5 drives at once, one backup
run by hand, ads in the window (none for the first 14 days after the registration).

## Requirements

- macOS 10.15 or later (checked on macOS 12), an Intel or Apple Silicon Mac;
- administrator rights to install: Pier's service runs as root, as the service does on Windows;
- a server: Nextcloud, ownCloud or any other WebDAV; SFTP (SSH); NFSv3. For backups also S3.

## Installing

1. Download [Pier-mac-0.3.3.pkg](Pier-mac-0.3.3.pkg) and check it against [SHA256SUMS](SHA256SUMS):
   `shasum -a 256 ~/Downloads/Pier-mac-0.3.3.pkg`.
2. The package is not signed with an Apple Developer ID certificate yet, so a double click is refused.
   - macOS 14 and earlier: Control-click (or right-click) the package → Open → Open.
   - macOS 15 and later: try to open the package once, then System Settings → Privacy & Security → at the
     bottom, Open Anyway.
   - Or in Terminal: `sudo installer -pkg ~/Downloads/Pier-mac-0.3.3.pkg -target /`.
3. The installer puts **Pier** into Applications and the service and the command line into `/usr/local/pier`
   (the `pier` command works in Terminal), starts the service and the Pier icon in the menu bar. At later
   logins the icon comes up by itself.

To update, install the newer package over it: drives, passwords and the cache are kept, and mounted drives
come back by themselves.

## The first drive

1. The Pier icon in the menu bar → Open Pier → Add.
2. Paste a link into the server field:
   - Nextcloud — the WebDAV address from the web interface (Files → Files settings), like
     `https://cloud.example.com/remote.php/dav/files/<login>/`; better give Pier an app password of its own
     (Nextcloud's security settings);
   - any other WebDAV — `https://server/path/`;
   - SFTP — `sftp://user@server/path` (a password or an OpenSSH key);
   - NFS — `nfs://server/export`.
3. OK. Pier checks the server and mounts the drive: it shows up in Finder (the sidebar, Locations) and under
   `/Volumes/<name>`. Open in Finder is in the icon's menu and in the drive's context menu.

Good to know:

- opened files are kept in the cache (`/Library/Application Support/Pier/cache`); transfers are on the
  Transfers tab, events on the Log tab;
- the Offline button keeps a drive working from the cache only; changes go up when the connection is back;
- macOS's own files (`._*`, `.DS_Store`) are not sent to the server;
- symbolic links are not supported on Pier drives; Spotlight does not index them.

## Registration

The Account tab → Register… → your e-mail → Send code → the code from the e-mail → Activate. It is free and it
is the same new-imobile.com account the other Imobile programs use.

## Backups

The Backup tab → Add: which Mac folders to back up and where to — WebDAV, SFTP or S3. Backups are encrypted
(AES-256) on the Mac, only encrypted blocks reach the server, and versions are kept. Restore everything or the
files you pick, to where they were or to another folder.

## Command line

`pier` with no arguments lists the commands: `pier status`, `pier mount <id>`, `pier unmount <id>`,
`pier log`, `pier backup list` and more. `pier status` also shows how many days of the free half-year are
left.

## Removing

```
sudo /usr/local/pier/uninstall.sh            # removes Pier, keeps the settings and the cache
sudo /usr/local/pier/uninstall.sh --purge    # removes Pier with its settings and cache
```

Pier unmounts the drives first; changes that had not reached the server yet stay in the cache and go up after
Pier is installed again (without `--purge`).
