Supabase (Studio, DB, Auth)

8 months ago

Description: Supabase without Functions, Realtime, Logflare and Storage (Read Overview)

Category: Storage

URL: https://railway.com/template/supabase

32 Replies

stockotaco
PRO

8 months ago

Thank you for the template.

Does this also support using Supabase as a vector store?


8 months ago

Yes, it should support using Supabase as a vector store. You'll need to enable the Postgres extension in settings. There may be some features/APIs in the client SDKs that rely on the realtime service, and those will not be compatible yet, but the core vector store should work fine.


niko
PRO

6 months ago

Hello !
Thanks I'm actually testing it and it works perfect !

I would like to know if you could add Minio as a storage solution ? I've deployed it also on my environement and it seems adding these variables may help, but I'm not sure on witch .env I should add this or if it would be enough. I guess it won't popup into Supabase admin panel, but for me it's more to have something easier to play with Supabase JS.

# Active le backend S3

STORAGE_BACKEND=s3

# Identifiants d’accès à Minio

STORAGE_REGION=us-east-1

STORAGE_ENDPOINT=http://votre-minio:9000 # <- L’endpoint complet vers votre service Minio

STORAGE_ACCESS_KEY_ID=minio

STORAGE_SECRET_ACCESS_KEY=minio-secret

STORAGE_FORCE_PATH_STYLE=true # souvent nécessaire pour Minio

Thanks for your help !


4 months ago

Hello! I'm trying to install Supabase with this template. Thanks a lot!

I guess I'm having trouble with the variables : In the Supabase Studio service, we are prompted to add a variable for "IMPORTANT_READ_ME", I don't really know what is right to input.

Also, I'm having trouble knowing which is the correct GOTRUE_SITE_URL.

Appart from that, I managed to create JWT, anon and service key.

Any chance you can help me with these?

thanks for your help !


joyeuxnocode

Hello! I'm trying to install Supabase with this template. Thanks a lot!I guess I'm having trouble with the variables : In the Supabase Studio service, we are prompted to add a variable for "IMPORTANT_READ_ME", I don't really know what is right to input.Also, I'm having trouble knowing which is the correct GOTRUE_SITE_URL.Appart from that, I managed to create JWT, anon and service key.Any chance you can help me with these?thanks for your help !

4 months ago

IMPORTANT_READ_ME can be anything. The reason it's there is so people can figure out how to obtain the JWT keys because there's no easy way to do it natively in Railway; If you read the entire description you'll see that it instructs you to type "yes" or something similar. If you want to use Supabase Auth, you need to set GOTRUE_SITE_URL to whatever URL your website is hosted at. If you don't know what to put there, you can just use the example value in the description (`http://localhost:3000`).


4 months ago

Thanks a lot for your quick answer. So I tried several times but it does not seems to work.

I deploy your template, and the 7 services seem to work.

I want to access Supabase Studio, to setup my app. So I select Supabase Studio Service, I generate a domain.

But when I access the generated URL, I always get a 502 Bad Gateway error.

Any idea where that might come from?

(On Supabase self-hosting page, I generated and pasted JWT, Anon and Service Key. on IMPORTANT_READ_ME, I inputed "yes" and for GoTrue I added http://localhost:3000.)


joyeuxnocode

Thanks a lot for your quick answer. So I tried several times but it does not seems to work.I deploy your template, and the 7 services seem to work.I want to access Supabase Studio, to setup my app. So I select Supabase Studio Service, I generate a domain.But when I access the generated URL, I always get a 502 Bad Gateway error.Any idea where that might come from?(On Supabase self-hosting page, I generated and pasted JWT, Anon and Service Key. on IMPORTANT_READ_ME, I inputed "yes" and for GoTrue I added http://localhost:3000.)

4 months ago

You do not access Supabase Studio through the service. Use the domain in the Kang service (that's already generated for you).


4 months ago

Thankssss a lot! Now I see it works. By any chance, was it written somewhere I missed?

Thanks anyway!


4 months ago

Hi again!

I'm now trying to set Auth on. I would need to send verification mails, reset password mails, and have the control over my authentification process.

So now seem to be the right time to change the GoTrue URL from https://local.host/3000 to my app URL.

I already published my app project to this URL, that is live: https://5456b655-6a61-4cc8-9ccf-a8ce420f38ac.weweb-preview.io/

So the base URL should be : https://weweb-preview.io/.

But I often find the same error message : "Failed to delete user: API error happened while trying to communicate with the server." (See the screenshot).

Or should I input the Kong URL, already generated for me in the GoTrue Service ?

I'm sorry to be such a noob, I hope your answers will help future noobs like me

Attachments


niko
PRO

4 months ago

Hello,

Is there any timeline for S3 integration now with Railway ? What is the issue with that as https://github.com/supabase/storage# is available ?

Thanks for any feedback !


niko
PRO

3 months ago

Hello,

I understand that it can't be done for S3 as it can't share containers in Railway.

But I now have an other issue as I'm trying to integrate Supavisor, and it fails to connect for the transaction pooler (port 6543)

It looks like an issue in IPv6 (???)

Did you test this by any chance ? Or might be planned to be integrated at some point ?

Thanks !


joyeuxnocode

Hi again!I'm now trying to set Auth on. I would need to send verification mails, reset password mails, and have the control over my authentification process.So now seem to be the right time to change the GoTrue URL from https://local.host/3000 to my app URL.I already published my app project to this URL, that is live: https://5456b655-6a61-4cc8-9ccf-a8ce420f38ac.weweb-preview.io/So the base URL should be : https://weweb-preview.io/.But I often find the same error message : "Failed to delete user: API error happened while trying to communicate with the server." (See the screenshot).Or should I input the Kong URL, already generated for me in the GoTrue Service ?I'm sorry to be such a noob, I hope your answers will help future noobs like me

3 months ago

Your base URL is the full domain (e.x. https://sub.exanple.com) including the subdomains but not the path.


niko

Hello,I understand that it can't be done for S3 as it can't share containers in Railway.But I now have an other issue as I'm trying to integrate Supavisor, and it fails to connect for the transaction pooler (port 6543)It looks like an issue in IPv6 (???)Did you test this by any chance ? Or might be planned to be integrated at some point ?Thanks !

3 months ago

The rest of the Supabase stack is unfortunately omitted because of upstream support issues with Railway, not because I didn't want to implement it. This includes the pooler as mentioned as well as storage.


six

The rest of the Supabase stack is unfortunately omitted because of upstream support issues with Railway, not because I didn't want to implement it. This includes the pooler as mentioned as well as storage.

niko
PRO

3 months ago

Thanks for your reply.(and for this super cool template !)

I understand for the bucket and the way it works with Railway, but I’m not sure for supavisor.

Support pointed an issue from supavisor on handling IP v6.

Do you have infos to share about supavisor and how it can’t be used on railway ? (Witch is really inconvient for us 🫣)

Thanks a lot !


niko

Thanks for your reply.(and for this super cool template !)I understand for the bucket and the way it works with Railway, but I’m not sure for supavisor.Support pointed an issue from supavisor on handling IP v6.Do you have infos to share about supavisor and how it can’t be used on railway ? (Witch is really inconvient for us 🫣)Thanks a lot !

3 months ago

Yes, Supavisor does not handle IPv6 properly and as a result is not in the template yet. Logflare has the same issue as well. Storage doesn't work as discussed prior.


niko
PRO

3 months ago

Hello Six !

I'm checking the different versions used in this template and wondering if you are planning a little update soon ? I'll test by changing each docker individually on a test instance, and can let you know the results, or is there a better way to proceed ?

Thanks !


niko

Hello Six !I'm checking the different versions used in this template and wondering if you are planning a little update soon ? I'll test by changing each docker individually on a test instance, and can let you know the results, or is there a better way to proceed ?Thanks !

3 months ago

I update the containers when I can to match the Supabase self hosting versions in their repository.


six

I update the containers when I can to match the Supabase self hosting versions in their repository.

niko
PRO

3 months ago

ok ! just to let you know, I've tested (not very extensively, but seems all good at the moment with:

ghcr.io/6ixfalls/supabase-postgres:15.8.1.060

supabase/gotrue:v2.171.0

supabase/postgres-meta:v0.88.9

supabase/studio:2025.04.21-sha-173cc56

postgrest/postgrest:v12.2.11

supabase/realtime:v2.34.47 (here the 2.34.51 just crashed)


2 months ago

How do access the studio dashboard?
Everytime I go to the URL generated by the Kong service I get error


stockotaco
PRO

2 months ago

If I want to connect another service to the postgres service used by Supabase, is there an internal url that can be used here?

On another note, using the value in this variable doesn't work (seems to be missing the host).

Attachments


taimoor-tariq

How do access the studio dashboard?Everytime I go to the URL generated by the Kong service I get error

2 months ago

Sorry for the late reply, but you need to use the credentials under Kong (DASHBOARD_USERNAME and DASHBOARD_PASSWORD respectively) to login.


stockotaco

If I want to connect another service to the postgres service used by Supabase, is there an internal url that can be used here?On another note, using the value in this variable doesn't work (seems to be missing the host).

2 months ago

This has been fixed - try to update the template from the UI, but if you're unable to, update RAILWAY_PUBLIC_DOMAIN within the DATABASE_URL variable to RAILWAY_TCP_PROXY_DOMAIN. However if you're accessing it within Railway please use the private networking variable, which I've added to POSTGRES_PRIVATE_URL with a value of postgresql://${{PGUSER}}:${{PGPASSWORD}}@${{PGHOST}}:${{PGPORT}}/${{PGDATABASE}} (which should be correct).


six

This has been fixed - try to update the template from the UI, but if you're unable to, update RAILWAY_PUBLIC_DOMAIN within the DATABASE_URL variable to RAILWAY_TCP_PROXY_DOMAIN. However if you're accessing it within Railway please use the private networking variable, which I've added to POSTGRES_PRIVATE_URL with a value of postgresql://${{PGUSER}}:${{PGPASSWORD}}@${{PGHOST}}:${{PGPORT}}/${{PGDATABASE}} (which should be correct).

stockotaco
PRO

2 months ago

Amazing! Works. Thank you so much!


apensotti
HOBBY

21 days ago

Any solution?

Attachments


apensotti

Any solution?

21 days ago

You did not setup the SUPABASE_ANON_KEY or SUPABASE_SERVICE_KEY. Did you not follow the steps in IMPORTANT_READ_ME? Here it is again for your reference:

READ THIS! To setup Supabase, you need to generate a JWT Secret, Service and Anon Key. Use the JWT Generator, copy the JWT secret, generate an anon and service JWT, and paste their values into the respective environment variable. You can set this value to anything. https://supabase.com/docs/guides/self-hosting/docker#generate-api-keys


six

You did not setup the SUPABASE_ANON_KEY or SUPABASE_SERVICE_KEY. Did you not follow the steps in IMPORTANT_READ_ME? Here it is again for your reference:READ THIS! To setup Supabase, you need to generate a JWT Secret, Service and Anon Key. Use the JWT Generator, copy the JWT secret, generate an anon and service JWT, and paste their values into the respective environment variable. You can set this value to anything. https://supabase.com/docs/guides/self-hosting/docker#generate-api-keys

apensotti
HOBBY

21 days ago

You're right, I input the info in the JSON that generates the key, not the key itself. Thanks.


tacg78952
PRO

19 days ago

Hi guys, I'm having problem with the authentication with kong when my user needs to verify his email. Seems like the route verify doesn´t exist at kong service or I´m doing something wrong. Can anyone give me some tip how to proceed?


socier-ai
PRO

13 days ago

Hi, i see that currently supavisor already support ipv6 https://github.com/supabase/supavisor/pull/654

Mind to update the template? Thank you!


socier-ai

Hi, i see that currently supavisor already support ipv6 https://github.com/supabase/supavisor/pull/654Mind to update the template? Thank you!

13 days ago

Sorry, but there still seems to be some issues with Supavisor where the database can't connect over the internal network. My guess is whatever DNS resolution is being done does not include AAAA records, and as a result the logs say NXDOMAIN.


six

Sorry, but there still seems to be some issues with Supavisor where the database can't connect over the internal network. My guess is whatever DNS resolution is being done does not include AAAA records, and as a result the logs say NXDOMAIN.

niko
PRO

12 days ago

Hello,
Yes, it seems...I've tried, and failed, opened a ticket here:

https://github.com/orgs/supabase/discussions/36995

Does that helps ?


niko

Hello,Yes, it seems...I've tried, and failed, opened a ticket here:https://github.com/orgs/supabase/discussions/36995Does that helps ?

niko
PRO

12 days ago

This is what Perplexity suggested

Based on the discussion you referenced and my research, here's what I would suggest testing to address the IPv6/AAAA DNS resolution issues with Supavisor on Railway:

Diagnostic DNS IPv6 prioritaire

Test 1: Vérification résolution DNS AAAA

# Test depuis le conteneur PostgREST nslookup -type=AAAA myinstance.railway.internal # Résultat attendu : adresse IPv6 (fd12:...) # Si NXDOMAIN : problème de résolution DNS IPv6

Test 2: Configuration client IPv6 forcée

# Variables PostgREST pour forcer IPv6 PGRST_SERVER_HOST="::" # Force écoute IPv6 PGRST_DB_URI="postgres://user.prod:password@myinstance.railway.internal:6543/postgres" # Test connectivité IPv6 direct curl -6 -v http://[adresse_ipv6_supavisor]:6543/health

Solutions spécifiques Railway/Elixir identifiées

Configuration Elixir pour IPv6 sur Railway

D'après les discussions Railway, plusieurs développeurs Elixir rencontrent le même problème NXDOMAIN :

# config/runtime.exs ou config/prod.exs config :app, App.Repo, socket_options: [:inet6], # Force IPv6 pour Postgrex pool_size: 10

Problème architectural identifié

La recherche révèle que Supavisor ne gère pas correctement IPv6 sur Railway, ce qui explique les erreurs DNS AAAA. Un développeur du template Supabase confirme :

"Supavisor does not handle IPv6 properly and as a result is not in the template yet"

Suggestions de tests pratiques

Option 1: Test PgBouncer alternatif

text

# docker-compose.yml avec PgBouncer services: pgbouncer: image: bitnami/pgbouncer environment: PGBOUNCER_LISTEN_ADDR: "::" # IPv6 compatible POSTGRESQL_HOST: "${Postgres.RAILWAY_PRIVATE_DOMAIN}" POSTGRESQL_PORT: "${Postgres.PGPORT}"

Option 2: Configuration DNS alternative

# Test avec résolution DNS forcée IPv4 PGRST_DB_URI="postgres://user:password@${POSTGRES_IPV4_ADDRESS}:5432/postgres" # Ou utilisation du proxy TCP Railway PGRST_DB_URI="postgres://user:password@${Postgres.RAILWAY_TCP_PROXY_DOMAIN}:${Postgres.RAILWAY_TCP_PROXY_PORT}/postgres"

Tests de diagnostic recommandés

1. Vérification résolution DNS complète

# Test résolution A vs AAAA dig supavisor.railway.internal A dig myinstance.railway.internal AAAA # Test depuis différents conteneurs railway run --service postgrest nslookup myinstance.railway.internal railway run --service supavisor nslookup postgres.railway.internal

2. Configuration client PostgreSQL IPv6

# Test connexion PostgreSQL directe avec IPv6 psql "postgres://user:password@[IPv6]:5432/database" # Configuration Elixir/Postgrex explicite socket_options: [:inet6, {:keepalive, true}]


six

Sorry, but there still seems to be some issues with Supavisor where the database can't connect over the internal network. My guess is whatever DNS resolution is being done does not include AAAA records, and as a result the logs say NXDOMAIN.

niko
PRO

8 days ago

Hello !

I can see an update, and a commit here:

https://github.com/6ixfalls/supabase/commit/ab004907b3a539ed0da48070bc336122cb6cf991

Does it means that it is solved ? Do you have any details to share ? Thanks !