Skip to content

Feature: Find available ports starting from 3000 #1642

Open

Description

@thetsajeet

If port:3000 is occupied by another service, json-server to find the next available port.

Activity

  1. manikanta5827 commented on Sep 15, 2025

    @manikanta5827
    Contributor

    Hi, I’m interested in working on this issue. Could you please confirm if it’s available to work on?

  2. nektobit commented on Feb 18, 2026

    @nektobit

    Hi, I’m interested in working on this issue. Could you please confirm if it’s available to work on?

    Hi
    Can you check your telegram messages?
    I sent you a message.
    Sorry for finding you on telegram, but I prefer face-to-face communication.

  3. tamjid14 commented on May 24, 2026

    @tamjid14

    I think this feature could be helpful, especially for beginners who may already have another local server running on port 3000.

    However, changing ports automatically could also be confusing if the user expects the API to always be available at a specific URL.

    A possible compromise could be:

    1. Keep port 3000 as the default.
    2. If port 3000 is already in use, show a clear error message.
    3. Suggest the next available port, for example 3001.
    4. Only auto-switch ports if the user enables it with an explicit flag.

    For example:

    json-server db.json --auto-port

    This keeps the default behavior predictable while still giving users an easy option when port 3000 is already occupied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions