Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step by Step process to upgrade Node.js and Homebridge #548

Closed
juani13973 opened this issue Jan 17, 2024 · 4 comments
Closed

Step by Step process to upgrade Node.js and Homebridge #548

juani13973 opened this issue Jan 17, 2024 · 4 comments

Comments

@juani13973
Copy link

juani13973 commented Jan 17, 2024

Current Situation

Dear community,
I apologize if this is posted somewhere else. I could not find it.

I am not an expert on containers so I am looking to get a STEP BY STEP process to upgrade my home bridge from v16.15.0 to the latest so I can update homebridge as well.
My hombridge is running on a DOCK container in a QNAP NAS.

I have read multiple threads :
you can update from inside the container.
you should re install the image to the latest
etc

could you please recommend the best way and provide the steps.
Of course, my objective is to not loose any configuration and set up I have right now.

Thanks for your support,

Docker Config

I do not have them.

Logs

I do not have a problem.

Host Operating System

QNAP

Host Architecture

x86_64 / amd64

@chuckaknuckle
Copy link

I just figured this out. Before proceeding you can always export to a backup.

Steps:

  1. Launch/login to your Homebridge WebUI, go to Settings, and select Backup/Restore.
  2. Once the backup is complete, select the three dots in the top right corner of the WebUI, and select Terminal.
  3. It will show the current Node.js version. To update, enter: hb-service update-node
  4. Restart HomeBridge as prompted.

Those are the steps that worked for me for Docker. I'm now showing as being on Node.js v20.11.0. I didn't lose any configuration or data when doing the update.

@juani13973
Copy link
Author

Thx Chuckaknuckie.
I finally did it but in a different way. I asked in Chatgpt how to upgrade hombridge node.js bla bla and executed what came in. All work and did not loose anything.
I basically pause the old container and created a new one with the new image directing it to the same folder etc. It picked everything from the same folder and started with the same config. (the only difference in my new version of Qnap is that I had to define a new IP address and not the NAS one)

this is what came from Chat GPT :

Upgrading Homebridge running in a Docker container on your QNAP NAS involves a few steps. Here's a step-by-step guide:

  1. Access your QNAP NAS:

    • Open a web browser and navigate to the QNAP web interface using the NAS IP address.
  2. Stop the Homebridge Docker Container:

    • In the QNAP web interface, go to "Container Station."
    • Locate your Homebridge container in the list of containers.
    • Stop the Homebridge container.
  3. Update the Docker Image:

    • Open Container Station.
    • In the "Container" tab, find your Homebridge container.
    • Select the Homebridge container and click on "Duplicate/Edit" or "Create" (depending on your QNAP version).
    • In the new container settings, find the "Image" section.
    • Update the Docker image tag to the latest version. You can find the latest version on the Homebridge Docker Hub page.
    • Click "Apply" to save the changes.
  4. Start the Updated Container:

    • Go back to the "Container" tab in Container Station.
    • Start the newly created container (which has the updated image).
  5. Check Logs for Errors:

    • Monitor the logs for any errors or issues during the startup of the updated Homebridge container. You can find logs in the Container Station interface.
  6. Verify Homebridge Functionality:

    • Once the container has started without errors, verify that Homebridge is functioning correctly by checking its logs for any issues.
  7. Update Homebridge Plugins:

    • If you have Homebridge plugins installed, it's a good idea to check for updates and update them if necessary.
      docker exec -it <your_homebridge_container_name> npm outdated -g
      docker exec -it <your_homebridge_container_name> npm update -g
    • Replace <your_homebridge_container_name> with the actual name of your Homebridge container.
  8. Backup Configuration:

    • Before making significant changes, it's always a good practice to back up your Homebridge configuration. You can usually find the configuration file in the host machine's file system or within the Docker volume you have mapped.
  9. Reconfigure (if necessary):

    • Check the release notes of the Homebridge version you're upgrading to. If there are any breaking changes or new configuration options, adjust your Homebridge configuration file accordingly.
  10. Test Your Devices:

    • After the upgrade, test your smart home devices to ensure they are still working with Homebridge.

Remember to consult the Homebridge and Docker documentation for any version-specific instructions or updates. Also, take note of any specific configurations you've made in your current setup, as you may need to replicate them in the updated version.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 28, 2024
Copy link

github-actions bot commented Mar 4, 2024

This issue has been closed as no further activity has occurred.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants