Cannot access UI (Pocketbase)
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.
21 Replies
Project ID:
d124dc18-e659-4b0e-9ed0-b09490824b94
d124dc18-e659-4b0e-9ed0-b09490824b94
you need to set it so it uses the PORT env variable
the PORT env variable has the port that is then forwarded to your subdomain
Thanks for the reply. 🙂
It seems though that the PORT is set:
and it has automatic HTTPS
no
i meant
you shouldnt set it
it is automatically given a port
if its not set in env variables
and that port is then forwarded
Yeah, I didn't set it.
.
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
it automatically gets assigned the correct forwarded port if its not set
Oh, so I should remove it from 'Variables' in my project.
yes
then use the automatically assigned value to it
for the port
then it will work
Gone.
😄
is pocketbase using the PORT env variable?
if so then just re-deploy it and it will work
Well, how can I tell? I'm just using the available template.
... isn't the creator of the template settings this up?
then redeploy and lets see
i know because i have a python websockets server hosted on railway.
in python it would be os.environ['PORT'] is the port
and it forwards it to wss://endlz-server.up.railway.app:443
for me
Hmm ... it seems that removing PORT just killed it.
ah make it back then, sorry for taking your time, wait for a higher up to help you
Leaving PORT as is gave me a reponds from the backend:
i thought i can help
but sorry
No apologies - I really appreciate that you took the time and the effort. 🙂 Thanks a lot.
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/_/
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.
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.
Thanks for elaborating. 🙂