Is it possible to create Django Admin account with free plan?

The tutorial Getting Started with Django on Render | Render says that creation of a Django Admin account can be done with the Render Shell.
But the Render Shell is not available for free plan services.
Is there any other alternatives methods to create Django Admin account with free plan?

Hi there,

Thanks for reaching out.

You could probably workaround this by adding it to your build script to run the admin creation command:

python createsuperuser

To make sure it’s not run on every deploy, maybe wrap it in an env var check, maybe something like:

if [[-z $CREATE_SUPERUSER]]; then python createsuperuserfi

Set the env var CREATE_SUPERUSER, deploy to have the command run, then remove the CREATE_SUPERUSER env var, so it’s not run again.

Hope that helps



But how it is supposed to work if the createsuperuser command is interactive?

I’ve tried to add your snippet to my ‘’ script, but this just gives me this message in the logs:

Superuser creation skipped due to not running in a TTY. You can run ` createsuperuser` in your project to create one manually.

Ah apologies, I’m not a Python/Django expert.

A quick search seemed to come up with a workaround:


I went through the link and was able to solve the same issue I had. So basically, you just add the superuser email, username(this wasn’t specified in the link but i think its equally necessary in order to log in as the admin login page requires a “username” and password) and password as environmental variables. Then include the “python createsuperuser --no-input” command in your build script. This forces django to look for the credentials as environmental variables. Note the risk in exposing sensitive credentials by supplying them as environmental variables.

All the hints are given, but I’ve received a request to write the complete solution to this problem, so here it is.

Go to the dashboard of your project and create the following environment variables:

Key = Value

After that add something like this to your script:

  python world_champ_2022/ createsuperuser --no-input

Commit and push your changes. CI pipeline should create the superuser now. Check your website to verify this.

If everything is ok, you can drop CREATE_SUPERUSER variable from your environment, so the snippet in the wouldn’t execute on your next builds.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.