# Letterboxd Trakt Sync

Letterboxd Trakt Sync copies your Letterboxd **diary** (*the films you've logged, with their ratings*) and your Letterboxd **watchlist** over to your Trakt account. Log a film once, on Letterboxd, and Trakt catches up on the next run.

It's deliberately simple, and it helps to know its limits up front:

- **One way only:** Letterboxd to Trakt. Nothing on Trakt is copied back to Letterboxd.
- **Diary entries only** for watched films and ratings. A film you've marked as watched without logging it in your diary isn't copied.
- **Hourly, not instant.** It runs once an hour by default (*you can change the schedule, see below*).

**When does hosted Letterboxd Trakt Sync make sense?**

- **No laptop left open.** The sync runs on a schedule around the clock on ElfHosted, so it keeps happening whether or not your computer is on.
- **Kept working.** Letterboxd's site changes broke the upstream script's Letterboxd reader; our build carries a fix for that, and we keep it current.
- **Its terminal, at its own address.** The sign-in code and the sync log show up in a web terminal behind your ElfHosted login, so you never need a shell.
- **Backed up.** Your config (*including your saved Trakt sign-in*) is copied every day.

[Get a 7-day trial of ElfHosted Letterboxd Trakt Sync! 🪄](<https://store.elfhosted.com/product/letterboxd-trakt-sync/>)

## How do I access Letterboxd Trakt Sync?

Letterboxd Trakt Sync is available:

- From your dashboard: [https://your-username.elfhosted.com](<https://your-username.elfhosted.com>)
- Directly: [https://your-username-letterboxd-trakt-sync.elfhosted.com](<https://your-username-letterboxd-trakt-sync.elfhosted.com>)

> [!NOTE]
>
> **Signed-in users see their own URLs**
>
> The addresses above show the general pattern. [Sign in](<https://docs-internal.elfhosted.com/app/letterboxd-trakt-sync/>) and these become your personal, clickable links.

## How do I use it?

Setup is a config file, a restart, and a one-time Trakt sign-in.

### 1\. Create a Trakt app

Go to [trakt.tv/oauth/applications](<https://trakt.tv/oauth/applications>) and create a new application:

- **Name:** `letterboxd-trakt-sync` (*anything works*)
- **Redirect URI:** `urn:ietf:wg:oauth:2.0:oob`
- Tick the **/scrobble** permission

Keep the **Client ID** and **Client Secret** it gives you.

### 2\. Fill in the config

The first time it starts, the app writes a template config to `config/letterboxd-trakt-sync/config.yml`. Open it with [FileBrowser](</app/filebrowser/>) and fill in your details:

```
accounts:
  - letterboxd_username: your_letterboxd_username
    trakt_client_id: <your Trakt client ID>
    trakt_client_secret: <your Trakt client secret>
    sync_diary: true
    sync_watchlist: true
    internal:
      trakt_oauth:
        token: null
        refresh: null
        expires_at: null
      last_letterboxd_diary_entry: null
```

Leave everything under `internal:` alone; the app fills it in. Set `sync_watchlist` or `sync_diary` to `false` to skip either. You can list more than one account.

Then restart Letterboxd Trakt Sync with [ElfBot](<https://docs-internal.elfhosted.com/app/elfbot/>).

### 3\. Approve it on Trakt

Open Letterboxd Trakt Sync from your dashboard. You'll see its terminal, with a line like:

```
Your user code is: A84F9B0D, please navigate to https://trakt.tv/activate to authenticate
```

Go to [trakt.tv/activate](<https://trakt.tv/activate>), enter the code, and approve. The first sync runs straight away, and the terminal prints `Sync completed` and the time of the next run. You'll need a new code whenever you add another account to the config.

### Changing the schedule

The schedule is a cron expression, hourly (`0 * * * *`) by default. To run it less often, set `CRON_SCHEDULE` with [ElfBot](<https://docs-internal.elfhosted.com/app/elfbot/>):

Quick-paste into Letterboxd Trakt Sync's environment variables using ElfBot

```
CRON_SCHEDULE=0 */6 * * *
```

> [!TIP]
>
> **Want more than one direction?**
>
> If you also want Trakt history to flow back somewhere, or to sync between media servers and several trackers, look at [CrossWatch](</app/crosswatch/>). Letterboxd Trakt Sync does one job: Letterboxd into Trakt.

## Letterboxd Trakt Sync also works with

- [x] [CrossWatch](</app/crosswatch/>)
- [x] [Yamtrack](</app/yamtrack/>)

## How do I get support for Letterboxd Trakt Sync?

1. For general use of Letterboxd Trakt Sync, refer to the [official site](<https://github.com/f0e/letterboxd-trakt-sync>) or to one of the links in the resources section below.
2. For specific support re your ElfHosted configuration / account, see the [ElfHosted support options](</get-help/>)!

## Letterboxd Trakt Sync resources

- [Letterboxd Trakt Sync (*official site*)](<https://github.com/f0e/letterboxd-trakt-sync>)
