2 months ago
I don't now how to open the shell in Railway, I need to create the superuser using Django but I couldn't find it, everything working well...but where is the shell?
I've already tried using the Railway agent, but the solutions it provides haven't worked. For example, I tried installing the shell locally on my PC, but it doesn't work; it only creates the superuser locally, not in Railway.
I would appreciate any help with this, thanks.
1 Replies
Status changed to Awaiting Railway Response Railway • about 2 months ago
2 months ago
hello, the reason it only creates the superuser locally is because railway run and railway shell run commands on your machine, not on railway's servers.
what you need is railway ssh ; this opens a shell directly inside your deployed container on railway.
just do this:
make sure your cli is up to date, then run railway login, then railway link to connect your project, then railway ssh to get inside the container, and finally python manage.py createsuperuser
that's it, the superuser will be created on railway's side this time. make sure your service is actually running before you try to ssh into it or it won't connect.
