• How to change port runserver in python Django framework?

    By default, the runserver command starts the development server on the internal IP at port 8000.

    Titanium Asked on June 7, 2018 in Python.
    Add Comment
  • 1 Answer(s)
    Best answer

    If you want to change the server’s port, pass it as a command-line argument. For instance, this command starts the server on port 8080:

    $ python manage.py runserver 8080

    If you want to change the server’s IP, pass it along with the port. For example, to listen on all available public IPs (which is useful if you are running Vagrant or want to show off your work on other computers on the network), use:

    $ python manage.py runserver 0:8000

    0 is a shortcut for Full docs for the development server can be found in the runserver reference.

    Titanium Answered on June 7, 2018.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.