# Use specific ports (advanced)
./scripts/configure-ports.sh ../worktrees/{name} 8005 5178 5437 6383
```

The script updates all port-related variables in `.env` including `DATABASE_URL`, `REDIS_URL`, and `CORS_ALLOWED_ORIGINS`.

## Important Notes

[Section titled “Important Notes”](#important-notes)

* **Isolated services**: Each worktree has its own PostgreSQL and Redis instances with unique ports
* **Database independence**: Migrations and data changes in one worktree don’t affect others
* **Docker required**: PostgreSQL and Redis run via Docker Compose (`make start-bg`)
* **Independent npm packages**: Each worktree has its own `node_modules`
* **Branch naming**: If a branch name conflicts, the script appends `-2`, `-3`, etc.
* **Port conflicts**: Make sure no other services are using the allocated port ranges

## Known Limitations

[Section titled “Known Limitations”](#known-limitations)

* This feature has only been tested on Linux environments and may not work with other operaring systems.

If you have any feedback on this feature please let us know!