Skip to content

docs(config): update Snowflake serverid config.sample explanation - #58577

Open
joshtrichards wants to merge 1 commit into
masterfrom
jtr/docs-config-sample-serverid
Open

docs(config): update Snowflake serverid config.sample explanation#58577
joshtrichards wants to merge 1 commit into
masterfrom
jtr/docs-config-sample-serverid

Conversation

@joshtrichards

@joshtrichardsjoshtrichards commented Feb 25, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Adds additional detail/context and clarity regarding this newer parameter.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

- Add additional detail/context
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards
joshtrichards requested a review from a team as a code ownerFebruary 25, 2026 16:18
@joshtrichards
joshtrichards requested review from ArtificialOwl, CarlSchwan and salmart-dev and removed request for a teamFebruary 25, 2026 16:18
@joshtrichardsjoshtrichards added this to the Nextcloud 34 milestone Feb 25, 2026
@joshtrichards

Copy link
Copy Markdown
MemberAuthor

/backport to stable33

joshtrichards added a commit that referenced this pull request Feb 25, 2026
Context: This will be the default behavior and visible message to any instance upgraded from <v33.
Builds on #58577
Signed-off-by: Josh <josh.t.richards@gmail.com>

@AltahrimAltahrim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the improvements :)

I think there is still a few points to clarify but it's better than my original one ^^

* It is useful when your Nextcloud instance is using different PHP servers.
* Once it's set it shouldn't be changed.
* This parameter is used to differentiate between different PHP server instances
* that share the same ``config.php``. Its core use is in the "Snowflake" ID generation

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that share the same config.php

The important point is they share the same database. For some reasons, it can be different configuration files

* When config.php is shared between different servers, this value should be overriden with "NC_serverid=<int>" on each server.
* Note that it must be overriden for CLI and for your webserver.
* This parameter is especially important if you deploy Nextcloud across multiple servers
* using a shared ``config.php`` file.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* using a shared ``config.php`` file.

For the same reason as above

* using a shared ``config.php`` file.
*
* Example for CLI: NC_serverid=42 occ config:list system
* Once it is set, it should not be changed, to avoid data inconsistencies.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it can be changed, but the important point to never have two identical server IDs in your cluster.

One drawback of changing it: you can't find the server which created an ID from the ID itself (unless you keep history). I don't know if it will help for debugging at some point…

* Example for CLI: NC_serverid=42 occ config:list system
* Once it is set, it should not be changed, to avoid data inconsistencies.
*
* In shared configurations, override ``serverid`` by setting the environment variable

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can also be a different config.php file

* NC_serverid=42 occ config:list system
*
* For simple, standalone deployments, the default fallback (based on the hostname)
* is generally safe as long as your server's hostname does not change and you do not

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as long as your server's hostname does not change

See above, if hostname change, server ID also change and it's not an issue, except to find server responsible for the ID

@melroy89

Copy link
Copy Markdown
Contributor

@nextcloud-botnextcloud-bot mentioned this pull request May 27, 2026
@nextcloud-botnextcloud-bot mentioned this pull request Jun 4, 2026
This was referenced Jun 5, 2026
@susnuxsusnux added the community pull requests from community label Jun 9, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbackport-requestcommunitypull requests from communityenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@joshtrichards@melroy89@Altahrim@susnux@nextcloud-bot