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
Percy
Percy2y ago
Project ID: d124dc18-e659-4b0e-9ed0-b09490824b94
Zvezke
ZvezkeOP2y ago
d124dc18-e659-4b0e-9ed0-b09490824b94
csd4ni3l
csd4ni3l2y ago
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
Zvezke
ZvezkeOP2y ago
Thanks for the reply. 🙂 It seems though that the PORT is set:
csd4ni3l
csd4ni3l2y ago
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
Zvezke
ZvezkeOP2y ago
Yeah, I didn't set it.
csd4ni3l
csd4ni3l2y ago
. 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
Zvezke
ZvezkeOP2y ago
Oh, so I should remove it from 'Variables' in my project.
csd4ni3l
csd4ni3l2y ago
yes then use the automatically assigned value to it for the port then it will work
Zvezke
ZvezkeOP2y ago
Gone.
Zvezke
ZvezkeOP2y ago
😄
csd4ni3l
csd4ni3l2y ago
is pocketbase using the PORT env variable? if so then just re-deploy it and it will work
Zvezke
ZvezkeOP2y ago
Well, how can I tell? I'm just using the available template. ... isn't the creator of the template settings this up?
csd4ni3l
csd4ni3l2y ago
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
Zvezke
ZvezkeOP2y ago
Hmm ... it seems that removing PORT just killed it.
csd4ni3l
csd4ni3l2y ago
ah make it back then, sorry for taking your time, wait for a higher up to help you
Zvezke
ZvezkeOP2y ago
Leaving PORT as is gave me a reponds from the backend:
csd4ni3l
csd4ni3l2y ago
i thought i can help but sorry
Zvezke
ZvezkeOP2y ago
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/_/
mushuw
mushuw2y ago
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.
Zvezke
ZvezkeOP2y ago
Thanks for elaborating. 🙂
Want results from more Discord servers?
Add your server