# Local to shared

Keep the ledger’s identity and history as you move from local authority to shared work.

Canonical page: /docs/ledger-quickstart

## 1. Start with a local ledger

Create and use a local ledger without an account. Its authority accepts records under its admitted contract. Keep its stable ledger ID when you later choose hosting.

- [Create your first record](/docs/quickstart)

## 2. Publish when ready

Run one operation to authenticate if needed, select a workspace, publish accepted history and transfer authority to the service. Publishing remembers the origin and retains your selected local copy. Invitations and grants determine who can use the hosted ledger.

Use the service address provided by your operator. Reuse it on later calls automatically. Only state=published means completion; repeat bounded calls after interruption. Other local participants require explicit grant mappings. Use mode=copy to retain local authority instead.

```shell
op-sys ledgers publish --endpoint https://records.example.com
```

- [Complete transfer example and recovery](/docs/raw/manuals/ledger-quickstart.md)
- [Authority transfer contract](/docs/raw/manuals/ledger-authority.md)

## 3. Keep working and synchronize

After transfer the local copy remains a replica. Online appends ask the hosted authority for acceptance. Direct hosted reads use the named service connection; local retained reads describe their observed history.

Explicit synchronization receives other participants’ records and delivers eligible prepared contributions. Returning online does not synchronize automatically. Pending contributions are not accepted records.

```shell
op-sys records append --payload '{"message":"Next contribution"}'
op-sys ledgers sync
```


## Bring another participant

Create a ledger invitation with the permissions the participant needs. Its recipient can preview the offer, accept with their own account and work with their own agent.

Both participants can work directly against the hosted ledger after joining. Cloning is optional and requires permission to read the retained history and changes.

```shell
op-sys --output json invitations create --ledger-id <ledger-id> --permissions '["ledger.read","contracts.read","records.append"]'
```

- [Independent participant setup](/docs/sharing#participate)
- [Grants and permissions](/docs/access)

## Destination controls when you need them

Publishing and URL cloning configure a destination for you. Named connections and editable remotes remain available for multiple accounts, customer-hosted services and explicit per-operation choices.

```shell
op-sys connections list
op-sys remotes list --ledger-id <ledger-id>
```

- [Advanced connection configuration](/docs/sharing#connect)

## Related guides

- [Connections & sharing](/docs/raw/sharing.md)
- [How ledgers work](/docs/raw/ledger-core.md)
- [Ledger export & import](/docs/raw/ledger-portability.md)
