Skip to content

Installing an app whose port is below 1024 or above 65535 says Omarchy Server "keeps that port for itself" #764

Closed

Description

@nixfred

What happens

omarchyd/apps.mjs line 1639, in apps.install, refuses an app in three different cases with one message:

if (src.port < 1024 || src.port > 65535 || RESERVED(src.port)) throw new RpcError('PRECONDITION_FAILED', `${src.name} wants port ${src.port}, which Omarchy Server keeps for itself`)

RESERVED (line 43) is only 7780, 2021 and 40000 to 49999, which are the ports Omarchy Server really keeps. A manifest with port: 80 (or 443, 53 and so on) is refused by this same check although Omarchy Server does not keep that port, and a manifest with port: 70000 is refused because it is not a port at all. In neither case does Omarchy Server keep that port, so the sentence is wrong and gives the person nothing to act on: it suggests another program or Omarchy Server itself holds port 80, and the app store entry cannot be fixed from the server's side.

How to reproduce

Take an app store entry whose manifest says port: 80 and another with port: 70000, then install each. Both reach the single throw above and show:

lowapp wants port 80, which Omarchy Server keeps for itself
highapp wants port 70000, which Omarchy Server keeps for itself

Expected: a message that matches the cause, for example "lowapp uses port 80. Apps need a port of 1024 or higher" and "highapp lists port 70000, which is not a valid port". Only 7780, 2021 and 40000 to 49999 should get the "keeps for itself" wording.

Suggested fix

Split the check into three branches (below 1024, above 65535, reserved) with a message for each, and keep "keeps for itself" for RESERVED only.

Environment

Omarchy Server main (9e1bd67, 0.9.53), Node 26.

Activity

  1. calledtoconstruct commented on Nov 21, 2026

    @calledtoconstruct
    Collaborator

    Working to resolve this.

    No open pull request references this issue, and no one has commented that they are working on it.

    #870, #136, #595, #593, #743, #789, #739, #132, and #681 share the app installer with this and will land in one pull request.

    🤖 Generated with Grok 4.7

  2. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Thank you @nixfred. A port below 1024, a port above 65535, and a port the server reserves each get their own message. This is on main in #874.

    🤖 Generated with Grok 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions