[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72793":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":14,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},72793,"portracker","mostafa-wahied\u002Fportracker","mostafa-wahied","An open source, self-hosted, real-time port monitoring and discovery tool.","",null,"JavaScript",2193,82,8,23,0,67,68.46,"MIT License",false,"main",true,[24,25,26],"open-source","self-hosted","truenas","2026-06-12 04:01:07","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"frontend\\public\\portracker-logo.svg\" alt=\"portracker Logo\" width=\"170\"\u002F>\n  \u003Ch1 style=\"font-size: 3em; margin-bottom: 0.1em;\">portracker\u003C\u002Fh1>\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>A self-hosted, real-time port monitoring and discovery tool.\u003C\u002Fstrong>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmostafa-wahied\u002Fportracker\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fmostafa-wahied\u002Fportracker?style=flat-square\" alt=\"License\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fhub.docker.com\u002Fr\u002Fmostafawahied\u002Fportracker\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fv\u002Fmostafawahied\u002Fportracker?label=docker&style=flat-square\" alt=\"Docker Version\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmostafa-wahied\u002Fportracker\u002Freleases\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fmostafa-wahied\u002Fportracker?style=flat-square\" alt=\"Latest Release\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmostafa-wahied\u002Fportracker\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fmostafa-wahied\u002Fportracker\u002Fdocker-publish.yml?style=flat-square\" alt=\"Build Status\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"screenshots\u002Fmain-light-v1.3.png\" \u002F>\n    \u003Cimg src=\"screenshots\u002Fmain-dark-v1.3.png\" alt=\"portracker Dashboard Screenshot\" width=\"95%\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\n\nBy auto-discovering services on your systems, portracker provides a live, accurate map of your network. It helps eliminate manual tracking in spreadsheets and prevents deployment failures caused by port conflicts.\n\n---\n\n## Key Features\n\n- **Automatic Port Discovery**: Scans the host system to find and display running services and their ports automatically. No manual data entry is needed.\n- **Platform-Specific Collectors**: Includes specialized collectors for Docker and TrueNAS to gather rich, contextual information from the host.\n- **Internal Port Detection**: Distinguishes between internal container ports and published host ports, providing complete visibility into containerized services.\n- **Lightweight & Self-Contained**: Runs as a single process with an embedded SQLite database. No external database dependencies like PostgreSQL or Redis are required.\n- **Peer-to-Peer Monitoring**: Add other `portracker` instances as peers to view all your servers, containers, and VMs from a single dashboard.\n- **Hierarchical Grouping**: Organize servers in a parent-child structure, perfect for nesting servers, e.g. a VM's `portracker` instance under its physical host.\n- **Enhanced TrueNAS Discovery**: Providing an optional TrueNAS API key allows `portracker` to discover running VMs\\* and gather enhanced system information like the OS version and uptime.\n- **Modern & Responsive UI**: A clean dashboard with light\u002Fdark modes, live filtering, and multiple data layout views (list, grid, table).\n\n\u003Csub>\\*_Note: VMs discovered on TrueNAS with the optional API key are shown in read-only mode. To enable full monitoring, deploy a portracker instance on each VM and add it as a separate server._\u003C\u002Fsub>\n\n## Deployment\n\nDeployment is designed to be simple using Docker.\n\n### Quick Get Started\n\n**Using Docker Compose:**\n\nCreate a `docker-compose.yml` file:\n\n```yaml\nservices:\n  portracker:\n    image: mostafawahied\u002Fportracker:latest\n    container_name: portracker\n    restart: unless-stopped\n    pid: \"host\"  # Required for port detection\n    # Required permissions for system ports service namespace access\n    cap_add:\n      - SYS_PTRACE     # Linux hosts: read other PIDs' \u002Fproc entries\n      - SYS_ADMIN      # Docker Desktop: allow namespace access for host ports (required for MacOS)\n    security_opt:\n      - apparmor:unconfined # Required for system ports\n    volumes:\n      # Required for data persistence\n      - .\u002Fportracker-data:\u002Fdata\n      # Required for discovering services running in Docker\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock:ro\n    ports:\n      - \"4999:4999\"\n    # environment:\n      # Optional: For enhanced TrueNAS features\n      # - TRUENAS_API_KEY=your-api-key-here\n```\n\nThen, run the application:\n\n```sh\ndocker-compose up -d\n```\n\n**Using Docker Run:**\n\n```sh\ndocker run -d \\\n  --name portracker \\\n  --restart unless-stopped \\\n  --pid host \\\n  --cap-add SYS_PTRACE \\\n  --cap-add SYS_ADMIN \\\n  --security-opt apparmor=unconfined \\\n  -p 4999:4999 \\\n  -v .\u002Fportracker-data:\u002Fdata \\\n  -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock:ro \\\n  mostafawahied\u002Fportracker:latest\n```\n\n### Enhanced Security with Docker Proxy\n\nFor enhanced security, you can run portracker without direct access to the Docker socket by using a proxy. This restricts the Docker API permissions to read-only operations.\n\n**Using Docker Compose:**\n\n```yaml\nservices:\n  docker-proxy:\n    image: tecnativa\u002Fdocker-socket-proxy:latest\n    container_name: portracker-docker-proxy\n    restart: unless-stopped\n    environment:\n      - CONTAINERS=1\n      - IMAGES=1\n      - INFO=1\n      - NETWORKS=1\n      - POST=0\n    volumes:\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock:ro\n    ports:\n      - \"2375:2375\"\n\n  portracker:\n    image: mostafawahied\u002Fportracker:latest\n    container_name: portracker\n    restart: unless-stopped\n    pid: \"host\"\n    cap_add:\n      - SYS_PTRACE\n      - SYS_ADMIN\n    security_opt:\n      - apparmor:unconfined\n    volumes:\n      - .\u002Fportracker-data:\u002Fdata\n    ports:\n      - \"4999:4999\"\n    environment:\n      - DOCKER_HOST=tcp:\u002F\u002Fdocker-proxy:2375\n    depends_on:\n      - docker-proxy\n```\n\n**Using Docker Run:**\n\n```sh\n# Start the Docker proxy\ndocker run -d \\\n  --name portracker-docker-proxy \\\n  --restart unless-stopped \\\n  -p 2375:2375 \\\n  -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock:ro \\\n  -e CONTAINERS=1 \\\n  -e IMAGES=1 \\\n  -e INFO=1 \\\n  -e NETWORKS=1 \\\n  -e POST=0 \\\n  tecnativa\u002Fdocker-socket-proxy:latest\n\n# Start portracker\ndocker run -d \\\n  --name portracker \\\n  --restart unless-stopped \\\n  --pid host \\\n  --cap-add SYS_PTRACE \\\n  --cap-add SYS_ADMIN \\\n  --security-opt apparmor=unconfined \\\n  -p 4999:4999 \\\n  -v .\u002Fportracker-data:\u002Fdata \\\n  -e DOCKER_HOST=tcp:\u002F\u002Flocalhost:2375 \\\n  mostafawahied\u002Fportracker:latest\n```\n\n## Configuration\n\nConfigure `portracker` using environment variables.\n\n| Variable           | Description                                            | Default               |\n| ------------------ | ------------------------------------------------------ | --------------------- |\n| `PORT`\\*           | The port the web application will run on.              | `4999`                |\n| `DATABASE_PATH`\\*  | Path inside the container to the SQLite database file. | `\u002Fdata\u002Fportracker.db` |\n| `TRUENAS_API_KEY`  | Optional API key for enhanced TrueNAS data collection. | ` `                   |\n| `ENABLE_AUTH`      | Set to `true` to enable authentication (v1.2.0+).      | `false`               |\n| `SESSION_SECRET`   | Only needed with auth enabled. Prevents logout on container restart. | _random_  |\n| `CACHE_TIMEOUT_MS` | Duration in milliseconds to cache scan results.        | `60000`               |\n| `DISABLE_CACHE`    | Set to `true` to disable all caching.                  | `false`               |\n| `INCLUDE_UDP`      | Set to `true` to include UDP ports in scans.           | `false`               |\n| `DEBUG`            | Set to `true` for verbose application logging.         | `false`               |\n\n\u003Csub>\\*_Required_\u003C\u002Fsub>\n\nFor a complete list of all environment variables with detailed explanations, see [`.env.example`](.env.example).\n\n### TrueNAS Integration\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Click to expand TrueNAS setup guide\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n#### Getting Your TrueNAS API Key\n\n1. Log into your TrueNAS web interface\n2. Go to **System Settings → API Keys**\n3. Click **Add** to create a new API key\n4. Give it a descriptive name (e.g., \"portracker\")\n5. Copy the generated key\n6. Add it to portracker:\n   - **TrueNAS Apps**: Edit your portracker app → Add Environment Variable: `TRUENAS_API_KEY=your-api-key-here`\n   - **Docker Compose**: Add to environment section:\n     ```yaml\n     environment:\n       - TRUENAS_API_KEY=your-api-key-here\n     ```\n\n#### What You'll See\n\nWith the API key configured, portracker will display:\n- ✅ TrueNAS native apps (from Apps catalog)\n- ✅ Virtual machines (VMs)\n- ✅ LXC containers\n- ✅ Enhanced system information (OS version, uptime, etc.)\n\nWithout the API key, you'll only see Docker containers and system ports.\n\nFor timeout configuration options, see [`.env.example`](.env.example).\n\n\u003C\u002Fdetails>\n\n### Authentication Setup (v1.2.0+)\n\nportracker includes optional authentication to secure dashboard access:\n\n1. **Enable Authentication**: Set `ENABLE_AUTH=true` in your environment variables\n2. **First-Time Setup**: On first access, you'll see a setup wizard to create the admin account\n3. **Login**: Use your admin credentials to access the dashboard\n4. **Stay Logged In** (optional): Set `SESSION_SECRET` to avoid being logged out on container restart\n\n**Example with Authentication:**\n\n```yaml\nservices:\n  portracker:\n    image: mostafawahied\u002Fportracker:latest\n    environment:\n      - ENABLE_AUTH=true\n      - SESSION_SECRET=your-random-secret-here-change-this\n```\n\n**Important Notes:**\n- Authentication is **disabled by default** for backward compatibility\n- When enabled, the dashboard requires login but API endpoints for peer communication remain accessible\n- API key authentication for peer-to-peer communication is available in v1.3.0\n\n### Autoxpose Integration (v1.3.0+)\n\nIf you run [autoxpose](https:\u002F\u002Fgithub.com\u002Fmostafa-wahied\u002Fautoxpose) to manage your public-facing services, portracker can display which ports are publicly exposed alongside their internal addresses.\n\n**Setup:**\n\n1. Open Settings (gear icon in header)\n2. Expand the **autoxpose** section\n3. Enter your autoxpose URL (e.g., `http:\u002F\u002Fautoxpose:3000`)\n4. Click **Connect**\n\n**What You'll See:**\n\nOnce connected, exposed services show a public URL chip or globe badge next to the port:\n\n- **URL Mode**: Full clickable chip showing `🌐 photos.example.com 🔒`\n- **Badge Mode**: Compact globe icon with tooltip\n\n**Display Options:**\n\n- **Display Mode**: Toggle between URL chip or compact badge\n- **URL Style**: Show subdomain only (compact) or full hostname\n\n**SSL Status Indicators:**\n\n| Icon | Color | Status |\n|------|-------|--------|\n| 🔒 | Green | SSL secured |\n| ⚠️ | Amber | SSL pending |\n| ❌ | Red | SSL error |\n\n## Technical Stack\n\n- **Backend**: Node.js, Express, WebSocket, better-sqlite3\n- **Frontend**: React, Vite, Tailwind CSS, Shadcn UI\n- **Containerization**: Docker\n\n## Roadmap\n\nFuture development is focused on improving the application based on community feedback. Key areas include:\n\n- ~~Adding user authentication~~ ✅ **Added in v1.2.0** (optional authentication with setup wizard)\n- ~~Adding API key authentication for peer-to-peer communication~~ ✅ **Added in v1.3.0**\n- ~~autoxpose integration for public URL visibility~~ ✅ **Added in v1.3.0**\n- Expanding the library of platform-specific collectors for other host systems\n- Addressing bugs and incorporating requested changes from the community\n\n## Star History\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=mostafa-wahied\u002Fportracker&type=Date)](https:\u002F\u002Fwww.star-history.com\u002F#mostafa-wahied\u002Fportracker&Date)\n\n## Contributing\n\nContributions are welcome! Please feel free to open an issue to report a bug or suggest a feature, or submit a pull request with your improvements.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https:\u002F\u002Fgithub.com\u002FMostafa-Wahied\u002Fportracker\u002Fblob\u002Fmain\u002FLICENSE)\n","portracker 是一个开源的、自托管的实时端口监控和发现工具。它能够自动扫描主机系统以发现并显示正在运行的服务及其端口，无需手动输入数据。项目支持Docker和TrueNAS平台的特定收集器，可以区分内部容器端口和发布的主机端口，提供对容器化服务的全面可见性。此外，portracker轻量级且自包含，运行时仅依赖于嵌入式的SQLite数据库，同时支持通过添加其他portracker实例作为同伴来从单一仪表板监控所有服务器、容器和虚拟机。该工具非常适合需要自动化网络管理、避免因端口冲突导致部署失败的企业或个人开发者使用场景。",2,"2026-06-11 03:43:38","high_star"]