> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.bearsampp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Resolve Port Conflicts in Bearsampp

> Find and fix port conflicts that prevent Bearsampp services from starting, including how to detect conflicts and reassign ports from the tray menu.

Port conflicts are the most common reason a Bearsampp service fails to start. Every service needs exclusive access to a specific network port, and if another application on your system is already using that port, the service cannot bind to it and will refuse to start.

## Default ports

Each service in Bearsampp listens on a default port. These are the ports most likely to conflict with other software already running on your machine:

| Service        | Default Port |
| -------------- | ------------ |
| Apache (HTTP)  | 80           |
| Apache (HTTPS) | 443          |
| MySQL          | 3306         |
| MariaDB        | 3307         |
| PostgreSQL     | 5432         |
| Memcached      | 11211        |
| Mailpit SMTP   | 1025         |
| Xlight FTP     | 21           |

## Detecting a port conflict

Bearsampp can check whether a port is in use and which process is holding it:

1. Right-click the Bearsampp tray icon.
2. Go to **\[module name] → Check port \[N]**.
3. Bearsampp displays one of two results:
   * **"Port X is used by \[process name]"** — the port is occupied by a specific service Bearsampp recognizes.
   * **"Port X is used by another application"** — the port is occupied by an unrecognized process.
   * **"Port X is not used"** — the port is free; a conflict is not the cause of the issue.

## Fixing a port conflict

The simplest fix is to assign Bearsampp's service to a different, unused port:

<Steps>
  <Step title="Open the Change Port dialog">
    Right-click the tray icon, go to **\[module name] → Change port**.
  </Step>

  <Step title="Enter a new port number">
    Type a port number that is not in use. For Apache, `8080` is a common alternative to `80`. For HTTPS, try `8443`.
  </Step>

  <Step title="Apply the change">
    Click **Finish**. Bearsampp updates its configuration and restarts the service on the new port.
  </Step>
</Steps>

<Note>
  After changing Apache's port, your local sites will be accessible at `http://localhost:8080` instead of `http://localhost`. Update any bookmarks or project URLs accordingly.
</Note>

## Common sources of conflicts

<AccordionGroup>
  <Accordion title="Port 80 and 443 — Apache">
    These ports are used by IIS (Internet Information Services), which is bundled with Windows and may be running even if you haven't set it up manually. Older versions of Skype also used port 80 as a fallback.

    **To disable IIS:** Open the Start menu, search for **Turn Windows features on or off**, and uncheck **Internet Information Services**. Restart your computer, then start Bearsampp.

    Alternatively, change Apache's port to `8080` as described above.
  </Accordion>

  <Accordion title="Port 3306 — MySQL">
    Another MySQL instance — from a previous installation, XAMPP, or another WAMP stack — is likely running in the background.

    Check the Windows Services panel (`services.msc`) for any service named `MySQL` and stop or disable it before starting Bearsampp's MySQL.
  </Accordion>

  <Accordion title="Port 5432 — PostgreSQL">
    A standalone PostgreSQL installation or another development stack may already be running a PostgreSQL service.

    Open `services.msc`, find the conflicting PostgreSQL service, and stop it. Alternatively, change Bearsampp's PostgreSQL port to `5433`.
  </Accordion>
</AccordionGroup>

## Finding the conflicting process manually

If Bearsampp's port check does not identify the process, you can use the Windows command line:

```bash theme={null}
netstat -ano | findstr :80
```

This lists all connections on port `80`, along with the Process ID (PID) in the last column. To identify the process:

1. Open **Task Manager** (`Ctrl + Shift + Esc`).
2. Go to the **Details** tab.
3. Find the row where the **PID** matches the number from the `netstat` output.
4. The **Name** column shows the executable using the port.

Once you know which application is responsible, you can stop it, disable its service, or change Bearsampp to use a different port.

<Tip>
  If you regularly run IIS or another web server alongside Bearsampp, configure Bearsampp to use port `8080` for HTTP and `8443` for HTTPS as a permanent setup. This avoids repeated conflicts without having to disable either server.
</Tip>
