Skip to content

Online Database

Tygo de Vries edited this page May 8, 2026 · 1 revision

Onride Photos supports uploading your ride photos to an online database, so they can be displayed on your website.

Currently, the plugin only supports connecting with Supabase. If you need something else, please get in contact. Supabase was chosen because its free, and does not require any extra software or port-forwarding on your server.

Setting up Supabase

Create a new project on supabase. Todo this, create your organization https://supabase.com/dashboard/organizations image

Then create a new project in this organization, you can use the default values.

Metadata table

Go to the 'table editor' tab, and create a new table
image
image

Table Columns

Name the table 'photos' and setup the following columns:

  • id = int8
  • created_at = timestamptz
  • layout = text
  • players = text
image

Setting up the Bucket

You also need a bucket, here the image data is stored.
Navigate to storage
image

And click 'new bucket'
image

name it 'photos', and turn on 'Public bucket' as we want people to be able to look at them on our site.
image

Plugin Settings

Next up, open the 'database.yml' file in the plugins folder.

Set 'enabled' to true, and the provider to 'supabase'

image

Set your project id, to the id of your supabase project. You can find this in the URL
image

Last, navigate to 'Project Settings' -> 'API Keys' -> 'Legacy anon, service_role API keys' and copy the 'service_role secret'

Keep the 'bucket' and 'table' settings to 'photo' as those are the names we gave earlier while setting up the buckets and tables. image

Reload

Save the file, and restart or /photo reload the server.

When a picture is taken in game, its data should appear in the table. image

Accessing the data on your website

To enable access on your website, go to the 'table editor', select the photos table, and 'Add RLS policy' image

Then 'Create policy' image

Add the 'Select' template, and save. image

This allows external APIs to read the database.

You can access a basic template here.

Clone this wiki locally