Skip to content

metalcloud-cli server-default-credentials create

Create new server default credentials

Create new server default credentials for a server.

This command creates a new set of default credentials that can be used during server provisioning and management. The password is encrypted before storage and can be retrieved using the get-credentials command.

Required Flags: —site-id Site ID where the server is located (required) —serial Server serial number for identification (required) —mac Server MAC address for network identification (required) —username Default username for server authentication (required) —password Default password for server authentication (required)

Optional Flags: —rack-name Default rack name where server is located —rack-position-lower Default rack position lower unit (e.g., “1”) —rack-position-upper Default rack position upper unit (e.g., “2”) —inventory-id Default inventory ID for asset tracking —uuid Default UUID for server identification

Examples:

Create credentials with required fields only

Section titled “Create credentials with required fields only”

metalcloud-cli server-default-credentials create
—site-id 1
—serial “ABC123456”
—mac “00:11:22:33:44:55”
—username “admin”
—password “securepassword”

metalcloud-cli sdc create
—site-id 2
—serial “DEF789012”
—mac “aa:bb:cc:dd:ee:ff”
—username “root”
—password “complexpass123”
—rack-name “R1-A”
—rack-position-lower “10”
—rack-position-upper “12”

Create credentials with all optional metadata

Section titled “Create credentials with all optional metadata”

metalcloud-cli srv-dc create
—site-id 3
—serial “GHI345678”
—mac “11:22:33:44:55:66”
—username “operator”
—password “mypassword”
—rack-name “R2-B”
—rack-position-lower “5”
—rack-position-upper “6”
—inventory-id “INV-2024-001”
—uuid “550e8400-e29b-41d4-a716-446655440000”

metalcloud-cli server-default-credentials create [flags]
-h, --help help for create
--inventory-id string Default inventory ID
--mac string Server MAC address
--password string Default password
--rack-name string Default rack name
--rack-position-lower string Default rack position lower unit
--rack-position-upper string Default rack position upper unit
--serial string Server serial number
--site-id float32 Site ID
--username string Default username
--uuid string Default UUID
-k, --api_key string MetalCloud API key
-c, --config string Config file path
-d, --debug Set to enable debug logging
-e, --endpoint string MetalCloud API endpoint
-f, --format string Output format. Supported values are 'text','csv','md','json','yaml'. (default "text")
-i, --insecure_skip_verify Set to allow insecure transport
-l, --log_file string Log file path
-v, --verbosity string Log level verbosity (default "INFO")

Auto generated by spf13/cobra on 11-Aug-2025

Section titled “Auto generated by spf13/cobra on 11-Aug-2025”