Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@
"self-hosted/aws",
"self-hosted/sign-in",
"self-hosted/roles",
"self-hosted/operations"
"self-hosted/operations",
"self-hosted/releases"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions features/licensing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ Every option starts at 3 seats.

| Option | Price |
|---|---|
| Monthly | $12 per seat a month. The server has to reach tablepro.app to renew its license |
| Monthly | $12 per seat a month. Each month's license file comes from tablepro.app, so the server needs [license renewal](/self-hosted/operations#renew) turned on and outbound HTTPS to api.tablepro.app |
| One-time | $179 per seat with a year of updates, $143.20 from 5 seats and $125.30 from 10. Updates after that are $45, $36 or $31.50 per seat a year, and optional. The discounts from 25 seats do not apply |
| Updates after a lapse | Pay for the years missed, never more than a new one-time license |
| Paid ahead | 10% off for 2 years, 15% off for 3 years, taken after the seat discount: 50 seats for 3 years are $81.60 per seat a year |
| 25 seats or more | 10% off the whole install, 20% from 50 seats, 30% from 100, yearly, monthly or paid ahead |

A renewal keeps its price for as long as you renew, updates included. Payment is by card. A purchase is refunded in full within 14 days while no license file has been issued for it, and renewals are not refunded. A staging install gets a free license with the same seats. Support is by email, with a reply within 2 business days.
A renewal keeps its price for as long as you renew, updates included. Payment is by card. Sign in at [account.tablepro.app](https://account.tablepro.app) with the email address you paid with: **Billing** lists your licenses and downloads each license file, and an email tells you when a new one is there. A purchase is refunded in full within 14 days while no license file has been issued for it, and renewals are not refunded. A staging install gets a free license with the same seats. Support is by email, with a reply within 2 business days.

### Students and teachers

Expand Down
6 changes: 4 additions & 2 deletions self-hosted/aws.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Six subnets across two Availability Zones: two for the ALB, two for the task and
- **Target group.** Type `ip`, port 8080, health check path `/readyz`, matcher 200, interval 15 seconds, healthy threshold 2, unhealthy threshold 5, deregistration delay 30 seconds. No host rules: the server routes by `Host` itself.
- **ALB attributes.** `routing.http.drop_invalid_header_fields.enabled=true`, `routing.http.preserve_host_header.enabled=true`, `routing.http.xff_header_processing.mode=append` (the default), `deletion_protection.enabled=true`.
- **Security groups.** The ALB takes 443 and 80 from the clients. The task takes 8080 from the ALB's group only. RDS takes 5432 from the task's group only.
- **Task subnets.** Two of their own, never the ALB's. The task pulls the image from GHCR, and with OIDC it calls the IdP: use private subnets with a NAT gateway, or public subnets with `assignPublicIp`.
- **No egress.** Mirror the image to ECR with `oras cp -r` ([Image and keys](/self-hosted/image#mirror-to-a-private-registry)) and run an OIDC IdP inside the VPC. A SAML IdP needs no route from the task: the browser carries its answer.
- **Task subnets.** Two of their own, never the ALB's. The task pulls the image from GHCR, with OIDC it calls the IdP, and with `LICENSE_RENEWAL=on` it calls `api.tablepro.app` on 443: use private subnets with a NAT gateway, or public subnets with `assignPublicIp`.
- **No egress.** Mirror the image to ECR with `oras cp -r` ([Image and keys](/self-hosted/image#mirror-to-a-private-registry)), run an OIDC IdP inside the VPC, and take a term other than monthly: each license file is then installed by hand. A SAML IdP needs no route from the task: the browser carries its answer.
- **Database subnets.** Two more, for RDS's DB subnet group. They need no route out.
- **Client address.** `CLIENT_ADDRESS=xff`, with `CLIENT_ADDRESS_TRUSTED_CIDRS` set to the CIDRs of the ALB's subnets. Not the VPC's CIDR: a workload elsewhere in it would set its own rate-limit key.

Expand Down Expand Up @@ -254,6 +254,8 @@ ARM64, 0.5 vCPU and 1 GB, with `GOMEMLIMIT=700MiB`. `migrate` runs `migrate up`

With a SAML IdP, replace `OIDC_ISSUER` and `OIDC_CLIENT_ID` with `SAML_IDP_ENTITY_ID` in every server container: `migrate` and `app` here, and `install` in the [license task definition](#install-the-license). Drop the `OIDC_CLIENT_SECRET` secret. Every server container checks the whole configuration at start, and refuses OIDC settings next to `SAML_IDP_ENTITY_ID`.

With a monthly license, add `{ "name": "LICENSE_RENEWAL", "value": "on" }` to `app`'s `environment`. See [Renew](/self-hosted/operations#renew).

```bash
aws ecs register-task-definition --cli-input-json file://ecs-task-definition.json
```
Expand Down
11 changes: 10 additions & 1 deletion self-hosted/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ volumes:
# Fill in, then chmod 600 .env. Every variable: https://docs.tablepro.app/self-hosted/settings

# The release to run, by version and digest.
TABLEPRO_IMAGE=ghcr.io/tableproapp/tablepro-cloud:0.1.1@sha256:<index digest>
TABLEPRO_IMAGE=ghcr.io/tableproapp/tablepro-cloud:0.2.0@sha256:<index digest>

# The database password: openssl rand -hex 24. Postgres keeps the first one it starts with.
POSTGRES_PASSWORD=
Expand Down Expand Up @@ -133,6 +133,13 @@ IDP_ADMIN_GROUP_ID=
# The sign-in button's name for your identity provider.
IDP_DISPLAY_NAME=

# Fetch each new file of the license from tablepro.app once a day: on, or off, the default. A monthly license needs it.
# It sends the installed license file to https://api.tablepro.app and nothing else.
# LICENSE_RENEWAL=on
# A proxy for it. Every outbound call takes it, the OIDC IdP's included: list an IdP inside your network in NO_PROXY.
# HTTPS_PROXY=http://proxy.example.com:3128
# NO_PROXY=idp.example.com

# The server's signing and encryption keys, as one line from credentials.sh, in single quotes.
# Keep a copy offline: a database restored without these keys cannot read the IdP tokens it holds.
TABLEPRO_CREDENTIALS=
Expand Down Expand Up @@ -168,6 +175,8 @@ TABLEPRO_CREDENTIALS=
docker compose run --rm --no-deps -T app license install - < license.jwt
docker compose run --rm --no-deps app license status
```

With a monthly license, also set `LICENSE_RENEWAL=on` in `.env`, then `docker compose up -d`. See [Renew](/self-hosted/operations#renew).
</Step>
<Step title="Claim the server">
Register `https://tablepro-account.example.com/api/auth/oidc/callback` with an OIDC IdP, or set up the SAML application first; see [Sign-in](/self-hosted/sign-in). Then:
Expand Down
16 changes: 8 additions & 8 deletions self-hosted/image.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ title: Image and keys
description: Pull the TablePro server image from GHCR, verify its cosign signature, SBOM and provenance, mirror it to a private registry, and generate the server's keys
---

Pull from `ghcr.io/tableproapp/tablepro-cloud`. It is public, built for `linux/amd64` and `linux/arm64`, and the current release is `0.1.1`.
Pull from `ghcr.io/tableproapp/tablepro-cloud`. It is public and built for `linux/amd64` and `linux/arm64`. The current release is `0.2.0`; [Self-hosted releases](/self-hosted/releases) lists every release and what it changed.

| | |
|---|---|
| Tags | `X.Y.Z` and `X.Y`, such as `0.1.1` and `0.1`. There is no `latest` |
| Tags | `X.Y.Z` and `X.Y`, such as `0.2.0` and `0.2`. There is no `latest` |
| Base | `gcr.io/distroless/static-debian13:nonroot`. No shell |
| User | 65532. The root filesystem can be read-only |
| Entry point | `/tablepro-cloud`, default command `serve`, listening on `:8080` |
| `version` | Prints the release, such as `0.1.1` |
| `version` | Prints the release, such as `0.2.0` |
| Third-party notices | `/usr/share/doc/tablepro-cloud/THIRD_PARTY_NOTICES` |
| Amazon RDS CA bundle | `/etc/ssl/rds-global-bundle.pem`, for `sslrootcert` in `DATABASE_URL` |

Deploy by digest, not by tag. Get the index digest with:
Deploy by digest, not by tag. The index digest of `0.2.0` is `sha256:de9130a22de1439e917fa621b9b22af62fd080ac9cf848b19b2e3e4c1d1885d8`. Check it, or get another release's, with:

```bash
docker buildx imagetools inspect ghcr.io/tableproapp/tablepro-cloud:0.1.1
docker buildx imagetools inspect ghcr.io/tableproapp/tablepro-cloud:0.2.0
```

`Digest:` at the top is the index digest. Each entry under `Manifests:` names one platform's digest.
Expand Down Expand Up @@ -57,7 +57,7 @@ The signatures are also in Sigstore's public Rekor log, which `cosign verify` ch
### Mirror to a private registry

```bash
oras cp -r ghcr.io/tableproapp/tablepro-cloud@sha256:<index digest> registry.example.com/tablepro-cloud:0.1.1
oras cp -r ghcr.io/tableproapp/tablepro-cloud@sha256:<index digest> registry.example.com/tablepro-cloud:0.2.0
```

ORAS 1.3 or later copies the signatures and attestations with the image, since cosign 3 stores them as OCI referrers. `cosign copy` 3.1 leaves them behind. Run the verify commands against the mirror afterwards.
Expand Down Expand Up @@ -117,10 +117,10 @@ Run it once per install, with the image by digest, and with your SAML IdP's meta
chmod +x credentials.sh

# OIDC
./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.1.1@sha256:<index digest> > credentials.json
./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.2.0@sha256:<index digest> > credentials.json

# SAML 2.0: the IdP's metadata file as the second argument
./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.1.1@sha256:<index digest> idp-metadata.xml > credentials.json
./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.2.0@sha256:<index digest> idp-metadata.xml > credentials.json
```

<Warning>
Expand Down
2 changes: 1 addition & 1 deletion self-hosted/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Self-hosted server
description: What the Enterprise Self-Hosted preview runs, what it needs from your infrastructure, the order to set it up in, and its limits
---

One OCI image serves your teams and their Team Library to the Macs, from your own PostgreSQL. People sign in through your identity provider. The server sends no email and no telemetry and never calls tablepro.app. Its only outbound calls go to an OIDC identity provider.
One OCI image serves your teams and their Team Library to the Macs, from your own PostgreSQL. People sign in through your identity provider. The server sends no email and no telemetry. Its only outbound calls go to an OIDC identity provider and, when you turn on [license renewal](/self-hosted/operations#renew), to tablepro.app for the license's next file.

<Info>
This is a preview. It serves TablePro for macOS. The other apps follow. To try it, write to [hello@tablepro.app](mailto:hello@tablepro.app) with the subject "TablePro Enterprise Self-Hosted"; plans and prices are under [Enterprise Self-Hosted](/features/licensing#enterprise-self-hosted).
Expand Down
26 changes: 20 additions & 6 deletions self-hosted/operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,20 @@ The license file is one signed line of text that TablePro issues for your API ad

### Renew

A renewal, or a change of seats, is a new file: install it the same way. A file with fewer seats than are taken keeps everyone who has one, and no one new signs in until enough seats are freed under [Remove someone](/self-hosted/roles#remove-someone).
A renewal, or a change of seats, is a new file of the same license. Sign in at [account.tablepro.app](https://account.tablepro.app) with the email address you paid with: **Billing** lists your licenses under **Self-hosted licenses**, each with **Download**, and an email tells you when a new file is there. Install it as above, or let the server fetch it. A file with fewer seats than are taken keeps everyone who has one, and no one new signs in until enough seats are freed under [Remove someone](/self-hosted/roles#remove-someone).

To fetch renewals, set `LICENSE_RENEWAL=on`. It is off by default, and with it off the server makes no call to tablepro.app. Once a day, and at each start, the server asks `https://api.tablepro.app/v2/licenses/latest` for the newest file of its license. The first fetch runs about a minute after the server starts. It sends the installed file and nothing else: no seat count, usage or version.

- The server fetches renewals only from a file tablepro.app issued through **Billing**. An evaluation file fetches nothing: install the first file from **Billing** by hand, and the server fetches from then on. Until then, each try logs `license renewal failed`.
- It installs the answer only when it is a later file of the same license for the same address, after the checks `license install` makes. The audit log records it as `license.installed` with `source` `renewal`.
- A failed fetch logs `license renewal failed` and tries again the next day. The installed file keeps working to the end of its grace, and the file from **Billing** still installs by hand.
- A monthly license needs it. A server that cannot reach tablepro.app takes a yearly or longer term.

Behind a proxy, set `HTTPS_PROXY`, such as `http://proxy.example.com:3128`. Every outbound call of the server then goes through it, the OIDC identity provider's too: list an IdP inside your network in `NO_PROXY`. A proxy that inspects TLS needs its CA in `SSL_CERT_FILE`, as under [Settings](/self-hosted/settings#identity-provider).

### When a license ends

A file with an end date has a grace after it, written into the file: 7 days for a monthly license, 30 days for every other.
A file with an end date has a grace after it, written into the file: 21 days for a monthly license, 30 days for every other.

| State | From | What works |
|---|---|---|
Expand All @@ -36,6 +45,8 @@ A perpetual file has no end date. It covers every release dated up to its end of

## Upgrades

Read the release's notes under [Self-hosted releases](/self-hosted/releases) first.

- **One minor version at a time**, such as 0.1 to 0.2, then 0.2 to 0.3. Each release's migrations only promise that the release before it runs on the new schema. To skip a minor version, stop the old server first.
- **Back up first**, as under [Back up](#back-up). Migrations only go forward, so going back to the earlier release means restoring the backup taken before the upgrade.
- **A perpetual license** must cover the new release; `migrate up` refuses it otherwise, before it changes anything.
Expand Down Expand Up @@ -90,8 +101,8 @@ On AWS, RDS keeps automated backups. Before each upgrade, also take a manual sna

```bash
aws rds create-db-snapshot --db-instance-identifier <db-instance-id> \
--db-snapshot-identifier tablepro-before-0-1-1 --query 'DBSnapshot.Status' --output text
aws rds wait db-snapshot-available --db-snapshot-identifier tablepro-before-0-1-1
--db-snapshot-identifier tablepro-before-0-2-0 --query 'DBSnapshot.Status' --output text
aws rds wait db-snapshot-available --db-snapshot-identifier tablepro-before-0-2-0
```

## Restore a backup
Expand Down Expand Up @@ -136,14 +147,17 @@ The server writes one JSON object per line to standard output, with `level` and
| The ALB's `UnHealthyHostCount` at 1 or more for 5 minutes, and `HTTPCode_Target_5XX_Count` | The server is down or failing requests |
| RDS `FreeStorageSpace` under 2 GB, `CPUCreditBalance` running low, `FreeableMemory` | The database is running out of room |

The server also logs these events once a day and at each start. A metric filter `{ $.msg = "license*" }` catches the license ones, along with `license active` at INFO.
The server also logs these events once a day and at each start. A metric filter `{ $.msg = "license*" && $.level != "INFO" }` catches the license ones and leaves out `license active` and `license renewed`.

| `msg` | Level | When |
|---|---|---|
| `license not installed` | WARN | No license file verifies |
| `license expires soon` | WARN | From 30 days before the end date |
| `license expires soon` | WARN | From 30 days before the end date, unless `LICENSE_RENEWAL=on` |
| `license expired, in grace` | WARN | Past the end date, within the grace |
| `license lapsed, library pushes refused` | ERROR | Past the grace |
| `license renewal failed` | WARN | With `LICENSE_RENEWAL=on`: no route, a proxy that refused, tablepro.app down, or an answer the server does not take. It tries again the next day |
| `license renewed` | INFO | With `LICENSE_RENEWAL=on`: a later file was installed |
| `license renewal found no newer file` | INFO | With `LICENSE_RENEWAL=on`: nothing newer yet |
| `license maintenance ends soon` | WARN | A perpetual file, in the 30 days before its maintenance ends |
| `idp certificate expiring` | WARN | A trusted SAML signing certificate ends within 30 days |
| `idp certificate expired` | ERROR | A trusted SAML signing certificate has ended, and sign-ins it signs fail |
Expand Down
Loading
Loading