Some of the Postgres variables are empty

craftled
HOBBY

a year ago

I have some automatically generated variables in Railway but they appear to be empty, so I get this message when I try to view Postgres Data tab:

"Required Variables. Ensure that the following variables are configured."

PGHOST
PGPORT
PGUSER
PGPASSWORD
PGDATABASE
DATABASE_URL

Solved

8 Replies

a year ago

If this was a database that came deployed from a template it's likely that it came without a public TCP proxy.

I would instead recommend deploying the dbgate template into your project and using that to connect to the database over the private network.


Status changed to Solved railway[bot] about 1 year ago


edgarasben
HOBBY

a year ago

Thank you! Do it’s a mistake in some templates? But I guess this is also possible without the additional dbgate?


a year ago

Not a mistake, the application deployed with the database does not need to publicly access the database, the database is accessed via the private network, which also saves the end user from service to database egress fees.


edgarasben
HOBBY

a year ago

Oh I see, that makes sense. It’s just that I could not see my database data, said the variables were missing, so I guess I just needed to remove those empty ENVs?


a year ago

Please try not to modify any variables on the database service, it would be quite easy to break something, instead if you want to view your data from a database GUI deploy the dbgate template into your project and use that to connect to the database with the database's private URL.

But please also keep in mind directly modifying the data in the database is risky and Railway can not provide any assistance in the case of data loss or data corruption caused by the user.


edgarasben
HOBBY

a year ago

Sorry for confusion, this was just Umami template I was deploying and I saw some missing envs errors, that’s why I am asking. Didn’t mean to change data, just was previewing the tab to make sure all works as intended.

So I guess I should just ignore the missing variable errors if I see them.

Also should db gate be installed in every project, if I want to view/edit data?


a year ago

If you find it necessary to directly access your database in a such a way, yes dbgate is likely going to be your best bet.


edgarasben
HOBBY

a year ago

Thank you!