RegisterNamespace throws an error Invalid RetentionDays when my retention in days is > 30 (java sdk)


RegisterNamespace throws an error saying “Invalid RetentionDays” when my retention in days is > 30
I am using below code to register namespace

WorkflowServiceStubs service = WorkflowServiceStubs.newInstance(WorkflowServiceStubsOptions.newBuilder()
            RegisterNamespaceRequest request =
            RegisterNamespaceResponse response = service.blockingStub().registerNamespace(request);    

Currently the max retention days allowed by the server is 30 days.

can we increase that in some way by any temporal-server docker setting or any other way??

This is defined as a constant. The only way to change that is to update the constant and rebuild your own binary.
If you need higher retention, I would recommend to look into setting up Archival.