ARTIFACTORY: Automating the Post-Installation Steps of a New Artifactory Instance

ARTIFACTORY: Automating the Post-Installation Steps of a New Artifactory Instance

AuthorFullName__c
Joey Naor
articleNumber
000004828
ft:sourceType
Salesforce
FirstPublishedDate
2020-06-11T08:49:00Z
lastModifiedDate
2025-05-15
VersionNumber
6

In situations where you have limited UI accessibility or automation is a top priority, you can automate Artifactory’s post-installation configuration process using REST API calls. Following are the minimal mandatory steps (typically completed via the UI) to carry out for a newly installed Artifactory instance:

1. Run a health check to verify that all of your microservices are up and running, and that Artifactory is ready to be configured:

$ curl -u admin:password https://localhost:8082/router/api/v1/system/health

2. Provide our product license, which will be included in a separate file (license.json):
$ cat license.json
{    "licenseKey": "<license key>"    }
$ curl -u admin:password -XPOST -H 'Content-Type: application/json' -d @license.json https://localhost:8081/artifactory/api/system/licenses

3. Confirm that our license is configured correctly:
$ curl -u admin:password https://localhost:8081/artifactory/api/system/licenses

4. Change the default password of the admin user to p@ssword1:
$ curl -u admin:password -XPOST -H 'Content-Type: application/json' -d '{ "userName" : "admin", "oldPassword" : "password", "newPassword1" : "p@ssword1", "newPassword2" : "p@ssword1" }' https://localhost:8081/artifactory/api/security/users/authorization/changePassword

Artifactory is now ready to use and you can proceed with creating repositories and users through your UI or the use of automated REST API calls.