Where to get latest version number?

Hello from the Linuxserver.io team, do you have a solid endpoint we can use to determine the latest version of Nextcloud to ingest and build?

We used to manually parse your installer using this command, but it was always a stop gap hoping for a sane endpoint.

curl -s https://download.nextcloud.com/server/installer/setup-nextcloud.php | awk -F \' '/NC_VERSION/{print \$4;exit}'

I haven’t found one for my stuff. This is what i use in my ansible:

https://download.nextcloud.com/server/releases/latest.tar.bz2

But i havent found an endpoint to check for a version number. @jospoortvliet would this be something that you can implement on the website?

curl -SsL https://github.com/nextcloud/server/releases | awk '/\/tag\//' | grep -v no-underline | head -n 1 | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | sed s/v//g

gives you the latest release on github.

nevertheless you have to filter for your preferred major release because v14, v15 and v16 are all mixed.

curl -SsL https://github.com/nextcloud/server/releases | awk '/\/tag\//'
      <a href="/nextcloud/server/releases/tag/v16.0.0RC1">
      <a href="/nextcloud/server/releases/tag/v15.0.7">
      <a href="/nextcloud/server/releases/tag/v14.0.10">
      <a href="/nextcloud/server/releases/tag/v16.0.0beta3">
      <a href="/nextcloud/server/releases/tag/v15.0.6">
      <a href="/nextcloud/server/releases/tag/v14.0.9">
      <a href="/nextcloud/server/releases/tag/v15.0.6RC1">
      <a href="/nextcloud/server/releases/tag/v14.0.9RC1">
      <a href="/nextcloud/server/releases/tag/v16.0.0beta2">
      <a href="/nextcloud/server/releases/tag/v16.0.0beta1">

I mean Github Tags has an API endpoint: (no need to parse through html use json)

https://api.github.com/repos/nextcloud/server/tags

Let me rephrase my question, I am not looking for help from the community unless someone here knows what endpoint I can hit to get the latest stable release version. I assure you we have been down all the workaround paths.

If this truly does not exist then I want to recommend to the Nextcloud team that when they are pushing a stable release they also push something like https://download.nextcloud.com/server/releases/stable.json containing either a download URL or a version.

Or if you want to keep this in Github then publish real github releases for your current stable releases and pre-releases for your betas/old major tags, so people can consume this stuff in a sane manner. (Github Tags are not guaranteed to be returned in order and all blend together as is)

Even if this is semi manual, we on the build side really need a simple file with a version number in it.

This is what our updater server is for - that is what Nextcloud systems use to get the latest version. There is no other service we (intend to) offer.

See https://github.com/nextcloud/updater_server

Alternatively, you can check what our website offers. We put the latest version number always in this file: https://github.com/nextcloud/nextcloud.com/blob/master/strings.php#L6 but at some point we’ll rewrite our website (I hope) and then that will stop working.

Thanks for the info, I will setup something to grab out of that file in github.

The setup you have requires the client passes a long complex string to the update server which specifies the exact version the client is running.
Why not take simple strings also for external consumption vs just in app IE:
version=stable or version=15.x

The updater server is open source, you could totally do a pull request that enables it to send simply the latest stable version to the request :wink:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.