This guide will help you set up Supabase to sync your watch history across devices.
- A Supabase account (free tier is sufficient)
- A Supabase project
- Go to supabase.com and sign up/sign in
- Click "New Project"
- Choose your organization and enter project details
- The name doesn't matter. Don't change other settings
- For region choose somewhere closest to you for better latency
- Wait for the project to be created
- In your Supabase dashboard, go to the "SQL Editor"
- Copy and paste the following SQL command to create the watch history table. Click run:
CREATE TABLE IF NOT EXISTS watch_history (
id BIGSERIAL PRIMARY KEY,
tmdb_id INTEGER NOT NULL,
title TEXT NOT NULL,
type TEXT NOT NULL CHECK (type IN ('movie', 'tv')),
poster_path TEXT,
watched_at TIMESTAMPTZ NOT NULL,
season_number INTEGER,
episode_number INTEGER,
episode_title TEXT,
user_rating REAL,
notes TEXT,
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW(),
UNIQUE(tmdb_id, type, season_number, episode_number)
);
ALTER TABLE watch_history ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Allow all operations on watch_history" ON watch_history
FOR ALL USING (true);- In your Supabase dashboard, go to "Settings" > "Data API"
- Copy the following values:
- Project URL (looks like
https://your-project-id.supabase.co) - Anon/Public Key (the
anonkey, not theservice_rolekey)
- Project URL (looks like
- Open Mirarr and go to Settings
- In the "Supabase Configuration" section:
- Enter your Project URL in the "Supabase URL" field
- Enter your Anon Key in the "Supabase Anon Key" field
- Click "Save Configuration"
- You should see a green checkmark indicating successful configuration
- Upload: Compares your local database with Supabase and ensures they match exactly. Items deleted locally will be removed from Supabase, and new/updated items will be uploaded.
- Download: Merges remote data with local data without removing anything locally.
- Sync All: Combines both operations for complete synchronization.
- Don't share your url and anon key. The current setup has no authentication implemented.
- Check your internet connection
- Verify your Supabase URL and anon key are correct
- Make sure the watch_history table exists in your Supabase project
- Make sure you ran the SQL commands from Step 2
- Check that the table name is exactly
watch_history
If you don't upload or download anything from your project for 7 days on free tier, the project gets paused (Supabase will email you about it.). Just open up your Supabase dashboard and click resume if this happens.
If you encounter issues, please check:
- Supabase project status
- Network connectivity. Try with a VPN.
- Correct credentials in Mirarr settings