Cannot access UI (Pocketbase)

ZZvezke5/24/2023
I've deployed Pocketbase via the template. It seems that the Pocketbase is alive, but I can't access the UI.
I might be wrong, but isn't it just a matter of accessing through the provided URL (in settings: 'Domains' ->
'Expose this service to the public internet')?

Looking at the deploy logs, I see that locally I should be able to access admin UI via 0.0.0.0:8090/_/. ).
I've tried replacing 0.0.0.0 with the provided URL (pocketbase-production-randomIncorrectString.app) as well as appending the specific endpoint to the URL (pocketbase-production-randomIncorrectString.app:8090/_/).

The bare URL gives a responds (JSON), the appended URLs time out. I can't see how else I should access the UI.
ZZvezke5/24/2023
d124dc18-e659-4b0e-9ed0-b09490824b94
Ccsdaniel5/24/2023
you need to set it so it uses the PORT env variable
Ccsdaniel5/24/2023
the PORT env variable has the port that is then forwarded to your subdomain
ZZvezke5/24/2023
Thanks for the reply. 🙂
It seems though that the PORT is set:
Ccsdaniel5/24/2023
and it has automatic HTTPS
Ccsdaniel5/24/2023
no
Ccsdaniel5/24/2023
i meant
Ccsdaniel5/24/2023
you shouldnt set it
Ccsdaniel5/24/2023
it is automatically given a port
Ccsdaniel5/24/2023
if its not set in env variables
Ccsdaniel5/24/2023
and that port is then forwarded
ZZvezke5/24/2023
Yeah, I didn't set it.
Ccsdaniel5/24/2023
.
Ccsdaniel5/24/2023
you are setting it in service variables, remove it from there and if pocketbase isnt using the PORT env variable then make it use it
Ccsdaniel5/24/2023
it automatically gets assigned the correct forwarded port if its not set
ZZvezke5/24/2023
Oh, so I should remove it from 'Variables' in my project.
Ccsdaniel5/24/2023
yes
Ccsdaniel5/24/2023
then use the automatically assigned value to it
Ccsdaniel5/24/2023
for the port
Ccsdaniel5/24/2023
then it will work
ZZvezke5/24/2023
Gone.
ZZvezke5/24/2023
😄
Ccsdaniel5/24/2023
is pocketbase using the PORT env variable?
Ccsdaniel5/24/2023
if so then just re-deploy it and it will work
ZZvezke5/24/2023
Well, how can I tell? I'm just using the available template.
ZZvezke5/24/2023
... isn't the creator of the template settings this up?
Ccsdaniel5/24/2023
then redeploy and lets see
Ccsdaniel5/24/2023
i know because i have a python websockets server hosted on railway.
Ccsdaniel5/24/2023
in python it would be os.environ['PORT'] is the port
Ccsdaniel5/24/2023
and it forwards it to wss://endlz-server.up.railway.app:443
Ccsdaniel5/24/2023
for me
ZZvezke5/24/2023
Hmm ... it seems that removing PORT just killed it.
Ccsdaniel5/24/2023
ah make it back then, sorry for taking your time, wait for a higher up to help you
ZZvezke5/24/2023
Leaving PORT as is gave me a reponds from the backend:
Ccsdaniel5/24/2023
i thought i can help
Ccsdaniel5/24/2023
but sorry
ZZvezke5/24/2023
No apologies - I really appreciate that you took the time and the effort. 🙂 Thanks a lot.
ZZvezke5/24/2023
Oh, I just realised. Railway is omitting the port in the URL. Access is granted by just appending the specific endpoint (and omitting the port):

Correct:
pocketbase-production-randomIncorrectString.app/_/

Incorrect:
pocketbase-production-randomIncorrectString.app:8090/_/
Mmushuw5/24/2023
Yeah typically when a hosting provider like Railway, Heroku, etc gives you a url with “https” enabled, that means you shouldn’t hit a specific port. It’s automatically routed there.
Mmushuw5/24/2023
If you were to run it only localhost or a bare EC2 instance, you wouldn’t have https, and therefore you’d have to hit the specific port.
ZZvezke5/25/2023
Thanks for elaborating. 🙂