---
title: Create a session
description: "Prepare the source and target databases, managed or external, and create a LiveSync session in the console, with one or more sessions per source."
---

## Before you start

- You need the **admin** role.
- With licensing enforced, a managed target needs an active
  [license](/docs/v2026.11.8-beta/licensing) with `LIVESYNC`. An external target must be a Tiger
  Cloud service, and the console needs an active license.
- The source runs PostgreSQL 17 or newer.
- Each managed service of the session is running.
- The source has `wal_level` set to `logical`. For a managed source, the
  create form shows **Set wal_level=logical & restart source**.
- Each PostgreSQL server of the service that runs LiveSync (see
  [Supported connections](/docs/v2026.11.8-beta/livesync#supported-connections)) can reach both
  databases. For an external database, check DNS, firewall, access rules,
  credentials and TLS from these servers.
- The target has the extensions that the tables need.

:::warning
A change of `wal_level` restarts PostgreSQL on the source. On an HA source, all
members restart. Do it in a maintenance window.
:::

## Use a managed source

1. **Open the form**

    Open **LiveSync** and select **Create LiveSync**.

2. **Name the session**

    Enter a **Name**, for example `orders_to_analytics`. See
    [Multiple sessions](#multiple-sessions) for name limits.

3. **Choose the source**

    Under **Source**, select **Managed cluster** and the **Source cluster**.
    Fix the version and `wal_level` checks that the form shows.

4. **Choose the tables**

    Keep **Create publication automatically** on. Keep **Publish all user
    tables** on, or turn it off and select the tables.

5. **Choose the target**

    Under **Target**, select a **Managed cluster**, or select **External
    database** and enter the **Target connection string**.

6. **Set the table options**

    **Create missing source tables on target** (on by default) creates the
    missing tables and hypertables. It does not change existing tables.

    **Add new source tables automatically** (off by default) adds tables
    that you create on the source later. Each addition restarts the session
    and stops replication for a short time.

7. **Create the session**

    Select **Create LiveSync**. Open the session and
    [verify replication](/docs/v2026.11.8-beta/livesync/operations#verify-replication).

![The Create LiveSync panel with the source, the publication and the target](/docs/screenshots/v2026.11.8-beta/livesync/create-panel.light.webp)

### Use an existing publication

Turn off **Create publication automatically** and enter the **Publication**
name. You then manage the tables of the publication on the source. The
console cannot edit its tables or add new tables automatically.

## Use an external source

An external source needs a managed target.

1. **Set the WAL level**

    On the source, set `wal_level=logical`.

2. **Create a publication**

    On the source, create a publication with the tables. For example:

    ```sql
    CREATE PUBLICATION orders_publication FOR TABLE public.orders;
    ```

3. **Prepare the target tables**

    Prepare the target tables, or keep **Create missing source tables on
    target** on. If the source runs a newer PostgreSQL major than the target,
    table creation fails. Then create the tables on the target yourself.

4. **Get the roles**

    Get a source role that can read the tables and use logical replication.
    Get a target role that can write the tables. A successful connection check
    does not prove these permissions.

5. **Fill in the form**

    In the form, under **Source**, select **External database**. Enter the
    **Source connection string** and the **Publication** name. Select the
    managed target.

A connection string is a single-line PostgreSQL URL. URL-encode special
characters in the password:

```text
postgresql://sync_user:REPLACE_WITH_PASSWORD@source.example.com:5432/appdb?sslmode=require
```

The console tests the connection from the primary that runs LiveSync.

## Use an external target

Select a managed source. Under **Target**, select **External database** and
enter the **Target connection string**. For a Tiger Cloud target (a host in
`.tsdb.cloud.timescale.com`), the console always sets `sslmode=verify-full`.

## Multiple sessions

- Give each session a short, distinct name. The console derives the
  subscription name from it and cuts it to 53 characters. The source slot is
  `live_sync_<subscription>`.
- Sessions on the same source cannot share a slot name, also when their
  targets differ. Names that differ only in punctuation can collide.
- For the same source and target, the table sets cannot overlap. Use
  separate publications and keep automatic table addition off. With an
  external source, only one session per source and target is allowed.
- The console detects a duplicate external database by its connection string
  only. Two different URLs for the same database are not detected.
- To sync several sources into one target, use distinct schema-qualified
  names on the sources, for example `store_a.orders` and `store_b.orders`.
