Port Manager is a dead simple tool that helps developers find free ports for their Docker containers without the hassle. It scans your system and Docker setup to suggest a port that’s good to go, all within a specified range.
- Checks Docker and system ports to avoid conflicts.
- Picks a port between the range specified in the
conf.inifile. - Verifications:
- Socket test:
Is it free?✅ - Docker check:
No container using it?✅ - System check:
No service hogging it?✅ - Range check:
Is it within the safe range?✅
- Socket test:
- Full Info: Breakdown of containers and ports.
- Container Map
| Main | Extra Info | All Containers |
|---|---|---|
![]() |
![]() |
![]() |
Port Manager offers two ways: a web interface or a command-line tool. Pick your flavor
- Clone the repository:
git clone https://github.com/sanjeevneo/port-manager.git cd port-manager - Ensure PHP is installed and configured with your web server (e.g., Apache or Nginx).
- Update
conf.iniwith your desired port range and settings. - For Synology NAS: Add the
httpuser to thedockergroup so the web server can talk to Docker without permission headaches:sudo synogroup --add docker http
- Point your browser to
http://hostIP/port-manager/index.phpand you’re set!
Use api.php with different modes:
api.php?mode=<modetype>
Replace <modetype> with one of the available modes:
portfullverifydocker_ports
- Download
docker-run-with-port.pyfrom the repository. - Make it executable:
chmod +x docker-run-with-port.py
- Run it:
- For just the port number:
./docker-run-with-port.py -p
- For a full rundown of ports and containers:
./docker-run-with-port.py
- For just the port number:
This project is licensed under the MIT License. You’re free to use, tweak, or share it, but keep the attribution intact:
Copyright (c) [sanjeevneo/port-manager]. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Got ideas or want to help out? We’d love to have you. For bugs or feature requests, just pop an issue on GitHub.


