R
Railway14mo ago
Zvezke

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