localhost:8000

The address of a development server running on your own computer, on port 8000. Django, FastAPI, Laravel and Python's built-in web server all use it by default.

Updated November 2026 · 3 min read

The short version: http://localhost:8000 opens the development server you started on your own computer, most often Django, FastAPI, Laravel or python -m http.server. If it will not load, that server is not running. If the server says the port is already in use, another one got there first: stop it, or start yours on 8001.

Used by
Django, FastAPI and Uvicorn, Laravel, Gatsby, Python http.server
Full address
http://localhost:8000
Reachable from
Your own computer only, with one exception below
Most common problem
The server is not running, or 8000 is taken

What is localhost:8000?

localhost is your own computer, and :8000 is the port a program on it is listening on. Like 8080, the number is a stand-in for the standard HTTP port 80 that needs no administrator rights.

It is the usual choice in the Python world: Django's runserver, Uvicorn and FastAPI, and the standard library's http.server all default to 8000. Laravel, Symfony, Gatsby and MkDocs use it too.

One difference matters: python -m http.server listens on every network interface, not only localhost. Anyone on the same network can browse the folder you serve. Add --bind 127.0.0.1 to keep it private.

What runs on port 8000

These tools listen on port 8000 unless you tell them otherwise. The last column shows how to move each one to a different port.

ProgramHow it startsChange the port
Djangopython manage.py runserverpython manage.py runserver 8001
FastAPI / Uvicornfastapi dev or uvicorn main:app--port 8001
Python http.serverpython -m http.serverpython -m http.server 8001
Laravelphp artisan servephp artisan serve --port=8001. It tries the next ports by itself
PHP built-in serverphp -S localhost:8000Change the number in the command
Gatsbygatsby developgatsby develop -p 8001
MkDocsmkdocs servemkdocs serve -a 127.0.0.1:8001

Why localhost:8000 will not load

  • Nothing is running. The browser shows "localhost refused to connect". The command that starts the server has to keep running in a terminal.
  • The server exited on startup. A syntax error, a missing package or a failed database connection stops Django or FastAPI before it listens. The terminal shows the traceback.
  • Port 8000 is already in use. Django prints Error: That port is already in use. Python's http.server and Uvicorn report Address already in use.
  • You are opening it from another device. Django and Uvicorn listen only on 127.0.0.1. For another device, start them on 0.0.0.0, and in Django add the address to ALLOWED_HOSTS.
  • The server answers, with an error page. A Django "DisallowedHost" page or a 404 means the port is fine and the problem is in the app's settings or routes.
  • It runs in a container. The server must listen on 0.0.0.0 inside the container and the port must be published with -p 8000:8000.

Find what is using port 8000

One command shows whether a program is listening on the port, and which one. No output means nothing is listening, and that is exactly when the browser says the connection was refused.

Finding the program on port 8000 and stopping it. The process ID 48213 is an example: use the one your own command prints.

On Linux, ss -ltnp | grep :8000 gives the same answer. Add sudo on macOS or Linux to see programs owned by another user. Stopping a process ends whatever it was doing, so check what it is before you stop it.

How to fix it

If the page will not load

  1. Start the server and keep the terminal open: python manage.py runserver, fastapi dev or php artisan serve.
  2. Read the output. A traceback means the server stopped: fix that error first.
  3. Open the exact address it prints, with http://.
  4. In Docker, start the server on 0.0.0.0:8000 and publish the port.

If the port is already in use

  1. Find the program holding the port with the commands in the section above.
  2. Stop it if it is an old server you forgot. Django's auto-reloader sometimes leaves a child process behind after a crash.
  3. Or start on another port: python manage.py runserver 8001.

From localhost to production

None of these development servers belong in production. Django's own documentation says not to use runserver there. A deployed app runs under a production server such as Gunicorn or PHP-FPM, behind a web server that answers on ports 80 and 443. If the application process dies, the web server stays up and visitors get a 502 or 504.

To test a deployed address by hand, the free bulk URL status checker shows the status code and redirects for a list of URLs, and Is Website Down checks one from several countries. Neither can see localhost: like any service on the internet, they only reach public addresses.

Deployed it? Watch the public URL.

Pulsetic is website uptime monitoring. It cannot reach localhost, but once your app is live it checks the public URL from outside your network, confirms any failure from another region, then emails you.

10 monitors free, checked every 5 minutes, with email alerts on failure and recovery. No credit card.

Sources and further reading

The documentation and specifications this guide is written from.

Frequently asked questions

  • What is localhost:8000?

    It is a development server on your own computer listening on port 8000. Django, FastAPI, Laravel, Gatsby and Python's built-in http.server all use that port by default.

  • How do I fix "That port is already in use" in Django?

    Another process holds port 8000, usually an earlier runserver. Stop it, or run python manage.py runserver 8001.

  • Is 127.0.0.1:8000 the same as localhost:8000?

    Nearly always. localhost is a name that resolves to 127.0.0.1, and on many systems to the IPv6 address ::1 as well. If a server listens on IPv4 only and one of the two addresses fails, use 127.0.0.1:8000.

  • Is python -m http.server safe to leave running?

    Only on a network you trust. By default it serves the current folder to every device on your network, with no login. Use --bind 127.0.0.1 to limit it to your own computer.