Skip to content

Composer #7971

Open
Open

Description

@Its-egner

Hi, develop branch now wants composer to be installed, is there somwhere an Tutorial to do this ?

FATAL: The include/vendor directory is not populated. Cacti requires its Composer dependencies before it can start. From the Cacti directory, run:

composer install

Then reload this page. See the README for details.

I tried apt install composer but thats not enough.

Greetings

Pull request relationships

Pull request Target State Relationship
#8266 develop Open Related / partial implementation; remaining scope below

Related installer hardening. The image-specific installer/login loop has not been reproduced; dependency requirements remain.

Activity

  1. somethingwithproof commented on Sep 5, 2026

    @somethingwithproof
    Member

    Installing the composer package only installs the Composer command. You then need to run it from the root of the Cacti source checkout (the directory containing composer.json):

    cd /path/to/cacti
    composer install

    For example, if this checkout is /usr/share/cacti13, run cd /usr/share/cacti13 first. Composer will populate include/vendor; reload the page after it completes. Do not run composer update, because that changes the locked dependency set.

    The source-checkout steps are also in the README: https://github.com/Cacti/cacti#installation-source-checkout

    If composer install fails, please paste the error output (without passwords or other credentials) and the output of php -v.

  2. Its-egner commented on Sep 6, 2026

    @Its-egner
    Author

    Hi,

    I tried with Chrome and Firefox, just get this Message:

    Image Image

    It Says Website are allowed to use Javascript

    Does the 1.2.x branch also need composer? At the Moment seems ok without.

    Greetings

  3. somethingwithproof commented on Sep 8, 2026

    @somethingwithproof
    Member

    No, 1.2.x does not need Composer. That branch keeps its dependencies committed under include/vendor, so a checkout runs as-is. develop generates that directory instead, which is why it stops there.

    One thing to expect next on develop: the front-end libraries under include/js are also generated now, from package.json. They are not committed either, and unlike the Composer tree there is currently no message when they are missing. The page just comes up blank after login with jQuery is not defined in the browser console (that is #8007). So run both:

    cd /path/to/cacti
    composer install
    npm install

    npm install needs Node. The README covers only the Composer half today; I have a PR open to document the Node step and to fail with an actionable message instead of a blank page.

  4. Its-egner commented on Sep 8, 2026

    @Its-egner
    Author

    Hi,

    ok I can klick through installer now. But when it wants to install it cacels and go back to First install Page.

    If I try with php 8.3 i cant login, even on clean installation.

    Greetings

  5. somethingwithproof commented on Sep 8, 2026

    @somethingwithproof
    Member

    What distro and what version of the distro are you using?

  6. Its-egner commented on Sep 8, 2026

    @Its-egner
    Author

    Ubuntu 24 and 26 i tried

  7. arno-st commented on Sep 8, 2026

    @arno-st
    Contributor

    Hello,
    Compose is not suppose to run as root:
    composer install
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    Continue as root/super user [yes]?

    And doing so will make file as owned by root.

  8. Its-egner commented on Sep 8, 2026

    @Its-egner
    Author

    Hmm.

    How should i builld it inside container?

    Greetings

  9. Its-egner commented on Sep 8, 2026

    @Its-egner
    Author

    COMPOSER_ALLOW_SUPERUSER#
    If set to 1, this env disables the warning about running commands as root/super user. It also disables automatic clearing of sudo sessions, so you should really only set this if you use Composer as a super user at all times like in docker containers.

    Should i do this in Dockerfile ?

  10. TheWitness commented on Sep 8, 2026

    @TheWitness
    Member

    @somethingwithproof , I don't want NODE any where near Cacti. Thanks! Unwind that if it's part of the 1.2.x or develop dependency tree.

  11. 15 remaining items

  12. TheWitness commented on Oct 2, 2026

    @TheWitness
    Member

    Anything in the logs?

  13. arno-st commented on Oct 2, 2026

    @arno-st
    Contributor

    Nothing

  14. Its-egner commented on Oct 8, 2026

    @Its-egner
    Author

    Hi,

    are there any News regarding the installer?

    Greetings

  15. TheWitness commented on Oct 8, 2026

    @TheWitness
    Member

    Still pounding on 1.2.x. I'll get there.

  16. somethingwithproof commented on Oct 10, 2026

    @somethingwithproof
    Member

    There is now a concrete installer follow-up: #8266 is open against develop. It fixes migration failure propagation, preservation of legacy authentication data when reads fail, and concurrent CLI/background installer state changes. Its CI has passed the fresh/upgrade failure-path matrix and authenticated web UI integration checks. Those are relevant to this thread, but I have not reproduced the exact return-to-first-step/login loop from your image, so I am linking it as a related fix rather than claiming it closes this entire report.

    Current develop still requires generated dependencies: Composer and the npm frontend-asset installation steps are documented in the README. Merely installing the Composer/npm executables is not sufficient. The installer PR does not remove those requirements. If the loop remains with a fully populated dependency tree, the exact Cacti commit and installer/server log from the failed attempt would let us match it to a specific remaining failure.

  17. added this to the v1.3.0 milestone on Oct 10, 2026
  18. Its-egner commented on Oct 13, 2026

    @Its-egner
    Author

    Hi, this is ubuntu 24.04 atm with apache php composer npm

    root@33790a3bcc63:/var/www/html# php -v
    PHP 8.3.6 (cli) (built: Sep 2 2026 12:56:02) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.3.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies
    root@33790a3bcc63:/var/www/html# composer --version
    Composer version 2.7.1 2024-02-09 15:26:28
    root@33790a3bcc63:/var/www/html# npm version
    {
    npm: '9.2.0',
    node: '18.19.1',
    acorn: '8.8.1',
    ada: '2.7.2',
    ares: '1.27.0',
    base64: '0.5.0',
    brotli: '1.1.0',
    cjs_module_lexer: '1.2.3',
    cldr: '44.1',
    icu: '74.2',
    llhttp: '6.1.0',
    modules: '109',
    napi: '9',
    nghttp2: '1.59.0',
    openssl: '3.0.13',
    simdutf: '3.2.18',
    tz: '2023c',
    unicode: '15.1',
    uv: '1.48.0',
    uvwasi: '0.0.19',
    v8: '10.2.154.26-node.28',
    zlib: '1.3'
    }
    root@33790a3bcc63:/var/www/html# node
    Welcome to Node.js v18.19.1.

    Greetings

  19. TheWitness commented on Oct 13, 2026

    @TheWitness
    Member

    When you run npm install it will install the required packages and then uninstall the node_modules directory to ensure a smooth cleanup and that no base node packages remain. Per @somethingwithproof, the installer should be working again.

  20. arno-st commented on Oct 13, 2026

    @arno-st
    Contributor

    Cacti is not as fun and easy to run anymore!
    Sorry, I try npm install and it give this:

    npm WARN lifecycle cacti-frontend-assets@0.0.0~postinstall: cannot run in wd cacti-frontend-assets@0.0.0 patch-package && node build/sync-js.mjs && node build/clean-node-modules.mjs (wd=/usr/share/cacti13)
    npm notice This endpoint is being retired. Use the bulk advisory endpoint instead. See the following docs for more info: https://api-docs.npmjs.com/#tag/Audit
    audited 111 packages in 0.854s
    
    20 packages are looking for funding
      run `npm fund` for details
    
    found 1 high severity vulnerability
      run `npm audit fix` to fix them, or `npm audit` for details
    

    and npm fund give this, but dosen't help:

    cacti-frontend-assets@0.0.0
    ├─┬ https://opencollective.com/bigjs
    │ └── big.js@7.0.1
    ├─┬ https://github.com/sponsors/sindresorhus
    │ └── screenfull@6.0.2, open@7.4.2, is-docker@2.2.1
    ├─┬ https://github.com/chalk/chalk?sponsor=1
    │ └── chalk@4.1.2
    ├─┬ https://github.com/sponsors/sibiraj-s
    │ └── ci-info@3.9.0
    ├─┬ https://github.com/sponsors/ljharb
    │ └── json-stable-stringify@1.3.0, minimist@1.2.8, call-bind@1.0.9, call-bound@1.0.4, jsonify@0.0.1, get-intrinsic@1.3.0, function-bind@1.1.2, gopd@1.2.0, has-symbols@1.1.0, define-data-property@1.1.4, has-property-descriptors@1.0.2
    ├─┬ https://github.com/sponsors/eemeli
    │ └── yaml@2.9.1
    ├─┬ https://github.com/chalk/ansi-styles?sponsor=1
    │ └── ansi-styles@4.3.0
    └─┬ https://github.com/sponsors/jonschlinkert
      └── picomatch@2.3.2
    ``
    and Version:
    ``
    npm version
    { 'cacti-frontend-assets': '0.0.0',
      npm: '6.14.11',
      ares: '1.15.0',
      brotli: '1.0.7',
      cldr: '35.1',
      http_parser: '2.9.4',
      icu: '64.2',
      modules: '64',
      napi: '7',
      nghttp2: '1.41.0',
      node: '10.24.0',
      openssl: '1.1.1g',
      tz: '2019c',
      unicode: '12.1',
      uv: '1.34.2',
      v8: '6.8.275.32-node.59',
      zlib: '1.2.11' }
    ``
    
    
  21. Its-egner commented on Oct 14, 2026

    @Its-egner
    Author

    27. node_module

    What do I have to do in cli ? There is node uninstall command, what exactly i have to do here ?

    Greetings

  22. TheWitness commented on Oct 14, 2026

    @TheWitness
    Member

    I'll force push the files into the correct location. I'll get a pull in tonight for approval. The composer stuff you will have to continue to do. Sorry about this massive change on the develop branch. We've been very busy.

  23. Its-egner commented on Oct 20, 2026

    @Its-egner
    Author

    Hi,

    what is with 1.2.x branch is composer needed here ? Seems it just runs fine without.

    Greetings

  24. TheWitness commented on Oct 20, 2026

    @TheWitness
    Member

    We are releasing using a PHP 8.2 compatible compose install, but at some point there may be a CVE that you can fix by simply doing a composer upgrade for example.

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

Metadata

Metadata

Labels

area:installerNamespaced Cacti workflow labelcomposerDependabot composer updatesrelease:1.3Namespaced Cacti workflow labelsupportSupport related issuetype:questionNamespaced Cacti workflow label

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions