feat: Make the API and console ports configurable by Pijukatel · Pull Request #80 · apify/actor-runtime · GitHub
Skip to content

feat: Make the API and console ports configurable - #80

Merged
Pijukatel merged 4 commits into
masterfrom
claude/serene-allen-afb5h5
Sep 29, 2026
Merged

Pijukatel merged 4 commits into
masterfrom
claude/serene-allen-afb5h5

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

ACTOR_RUNTIME_API_PORT and ACTOR_RUNTIME_CONSOLE_PORT (defaults 3333 and
3000) move the ports the runtime listens on and every URL it hands out.
Invalid or clashing values fail at startup.

Refs #77

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ac6RaZAULDqhZMW7UhSeHD
@Pijukatel
Pijukatel marked this pull request as ready for review September 29, 2026 09:15
@Pijukatel
Pijukatel merged commit 16abee7 into master Sep 29, 2026
29 checks passed
@Pijukatel
Pijukatel deleted the claude/serene-allen-afb5h5 branch September 29, 2026 09:15
Pijukatel added a commit to apify/apify-cli that referenced this pull request Sep 29, 2026
…art' (#1465)

- `apify runtime start --api-port/--console-port` runs the Actor runtime
on other ports; they are remembered for later starts, `connect`,
`status`, `skill` and console links in `apify call`.
- Ports are ignored while disconnected, so platform traffic is
unaffected. Default ports keep older runtime images working.
- Needs apify/actor-runtime#80 for non-default
ports. No new dependencies.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Pijukatel pushed a commit that referenced this pull request Sep 29, 2026
Clean merge of #81 (changelog and GitHub releases) and #80 (configurable
API and console ports), plus the two release-bot commits.

#81 is CI and release workflows only - nothing the OpenAPI document is
normative for.

#80 does touch the document. It replaced the fixed-ports contract:
`ACTOR_RUNTIME_API_PORT` and `ACTOR_RUNTIME_CONSOLE_PORT` now move the
ports, and `system.md`'s "Both ports are fixed and not configurable" is
gone. The document's `servers` entry still called the API port fixed and
cited that requirement, so this corrects it: the port is 3333 unless the
env var moves it, and the entry now says so once and states that every
`:3333` elsewhere in the document is that same default. That covers the
two standby addresses (`proxyStandbyRequest` and the `standbyUrl`
platform note for `GET /v2/actors/{actorId}`), which keep the literal
default port the README's own examples use.

No endpoint changed, so the endpoint list in
test/unit/actor-runtime-spec.test.ts is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VvUV6661cyYbxoHZv2Pby
Pijukatel added a commit to apify/apify-cli that referenced this pull request Oct 12, 2026
…s 3333 (#1490)

## What

- `apify login` with a local Console URL always validated the token
against `http://localhost:3333`, so a runtime started on another port
(`apify runtime start --api-port 4333`, or `ACTOR_RUNTIME_API_PORT` from
apify/actor-runtime#80) was unreachable from login.
- Login now picks the API in this order: `APIFY_CLIENT_BASE_URL` or the
connected runtime, then the port the runtime was last started on, then
3333 when no port is known (hand-started runtime on the defaults, local
platform development).
- Adds `resolveLoginApiBaseUrl()` with unit tests for each of those
cases.

## Verified

- Against a real `apify/actor-runtime:latest` started with `--api-port
4333 --console-port 4000`: login succeeds while connected, and with only
`APIFY_CONSOLE_URL=http://localhost:4000` set, with nothing listening on
3333.
- Lint, format, build, and `test:local` (the only failures are the
pre-existing root-user "cannot write" cases).

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make port configurable

3 participants