Adds the specified keystore bundle to a target domain keystore.


asadmin add-to-keystore [--help]


This command adds a certificate bundle (e.g. .p12 or .jks file) to the target instance or listener’s key store using the provided alias.

If the instance or listener is configured to use the default key store, the command will instead synchronize the instance with the DAS (under the assumption the certificate has been added to the default key store of the DAS), since any certificates added to the instance stores would be lost upon next synchronisation.

This will overwrite an entry already present with the same alias. A certificate without a private key cannot be used by an HTTP listener and will generate a warning.



Displays the help text for the subcommand.


This option helps specify the target on which you are adding to its keystore. Valid values are:


Applies to the default server instance. This is the default value.


Applies to every server instance in the cluster.


Applies to a specified sever instance.


Whether the HTTP listeners should be reloaded. Defaults to false


The name of the HTTP or IIOP listener to add the certificate to.


The name of the domain where the target instance exists.

Defaults to domain1 or the existing domain if only one exists.


The path to the directory containing the target domain.

Defaults to as-install/glassfish/domains


The name of the node where the target instance exists.

Defaults to localhost-$domainname


The path to the directory containing the target node.

Defaults to as-install/glassfish/nodes


The bundle file to add to the target keystore.



The alias name to store the certificate bundle in the keystore under.


Example 1 Add the specified P12 bundle under the mycert alias

asadmin add-to-keystore --file mycert.p12 mycert

Exit Status


subcommand executed successfully


error in executing the subcommand

See Also