Install the worker
This page assumes Node.js 20+ (or PHP 8.1+ with Composer) is installed and you have read the Worker setup overview.
The instructions below show the Node.js starter, which is the fastest path today and bundles the AI bootstrap rules. The PHP equivalent is a regular Composer project that pulls the PHP SDK; see the PHP variant note at the bottom.
1. Get the template #
Clone the bootstrap template into your projects folder:
git clone https://github.com/Orchesty/orchesty-nodejs-bootstrap.git my-orchesty-worker
cd my-orchesty-worker
rm -rf .git && git init
2. Install dependencies and start the dev server #
make init-dev
make init-dev auto-detects pnpm/npm, installs @orchesty/nodejs-sdk plus the dev tooling (TypeScript, Jest, ESLint, nodemon, @orchesty/nodejs-ai for AI editors), generates .env from .env.dist, and launches nodemon src/index.ts.
No local Node.js? Use the Docker variant instead:
make init-dev-docker
3. Configure your env file #
make init-dev already created .env from .env.dist with the right DEV_UID/DEV_GID for your OS. The file ships placeholder values for the keys the worker reads at startup (API key, platform endpoints, encryption secret). You don't need to fill anything in yet — the next page registers the worker in the Admin UI and the UI hands you the exact env block to paste in.
4. Verify the build #
make test # lint + unit tests
The empty test suite passes immediately. If TypeScript errors appear, check the Node.js version and the install output.
PHP variant #
The PHP worker setup follows the same idea: a Composer project with the PHP SDK and an entry script that registers your applications, connectors, and custom nodes. There is no dedicated bootstrap template for PHP yet, so you wire the project up by hand:
mkdir my-orchesty-worker && cd my-orchesty-worker
composer init --name="acme/my-orchesty-worker" --no-interaction
composer require orchesty/php-sdk symfony/dotenv
Create an index.php (or your framework's entry script) that boots the SDK container and registers your components, mirroring the Node.js src/index.ts pattern. The same .env variables apply, see step 3 above.
PHP SDK tunnel support (similar to the Node.js worker's existing tunnel helper) is on the roadmap. Until it ships, expose your worker via ngrok or a LAN IP when running against a remote instance.
What's next #
Continue with Connect to an instance to point the worker at a real Orchesty instance and register it from the Admin UI.