Using the latest version?
JFrog Platform User Guide
JFrog Artifactory 6.x Documentation
To get the latest version, go to the JFrog Unified Platform
Requirements
Setting JAVA_HOME
As mentioned in the section on System Requirements, make sure that your JAVA_HOME
environment variable is correctly set to your JDK installation.
Setting Java Memory Parameters
While not a strict requirement, it is recommended to modify the JVM memory parameters used to run Artifactory.
If you can reserve at least 512MB for Artifactory, the recommended values for JVM parameters are:
Recommended minimal JVM parameters
The larger your repository or number of concurrent users, the larger you need to make the -Xms and -Xmx values accordingly. Recommended minimal values are:
-server -Xms512m -Xmx2g -Xss256k -XX:+UseG1GC
For more recommendations about your hardware configuration (especially the -Xmx parameter), please refer to Recommended Hardware.
Where you set your JVM parameters depends on how you are running Artifactory:
- For a manual installation, modify JAVA_OPTIONS in $ARTIFACTORY_HOME/bin/artifactory.default.
- For a service installation, modify JAVA_OPTIONS in $ARTIFACTORY_HOME/etc/default
- For an RPM or Debian installation, modify JAVA_OPTIONS in /etc/opt/jfrog/artifactory/default
- For a Docker Container installation, pass the EXTRA_JAVA_OPTIONS environment variable to the docker run command
Restart required
For any change to your JVM parameters to take effect, you need to restart your Artifactory installation/service/container.
Manual Installation
Installing Artifactory
To install Artifactory manually, simply unzip the Artifactory download file to a location on your file system. This will be your $ARTIFACTORY_HOME
location.
No further action is needed.
Don't forget to modify your JVM parameters as needed by setting JAVA_OPTIONS in $ARTIFACTORY_HOME/bin/artifactory.default
.
Running Artifactory
You can run Artifactory manually to see its behavior by directly executing:
$ARTIFACTORY_HOME/bin/artifactory.sh
The console is locked on the Artifactory process and you can stop it cleanly with Ctrl+C
.
To directly run Artifactory as a daemon process, using the environment variables of the shell you are currently in, execute the following script:
$ARTIFACTORY_HOME/bin/artifactoryctl start
To verify Artifactory is running, you can access it in your browser at:
http://SERVER_DOMAIN:8081/artifactory
For example, if you are testing on your local machine you would use: http://localhost:8081/artifactory
Startup time
Depending on your system performance it may take Artifactory several seconds to start up. If you try to access Artifactory through your browser while it is starting up, within a few seconds it will provide a notification that it is in the startup process.
Using the same script, you can check if Artifactory is running and display its process id, or stop it using:
$ARTIFACTORY_HOME/bin/artifactoryctl check | stop
Service Installation
Artifactory is packaged as a zip file with a bundled Tomcat, and a complete install script that can be used to install it as a service running under a custom user.
Permissions
When running Artifactory as a service, the installation script creates a user called Artifactory
which must have run and execute permissions on the installation directory.
Therefore it is recommended to extract the Artifactory download file into a directory that gives run and execute permissions to all users such as /opt
Not supported on Mac OS
The service Installation is currently supported only on Linux and Solaris. It is not supported with Mac OS.
Service, Debian/RPM and Docker Installations
By default, in service, Debian/RPM and Docker installation types, the Tomcat directory will be located under the /opt directory. In cases of large file deployments, the TOMCAT_HOME/temp directory (that's under the /tomcat directory) will store temporary files until the deployment is complete. In cases of a small partition of storage allocation to the /opt directory, this can cause a "disk full" error.
To fix this, change the CATALINA_TEMPDIR environment variable to /var/opt/jfrog/artifactory/tomcat/temp (make sure to create /var/opt/jfrog/artifactory/tomcat/temp before starting Artifactory.)
Don't forget to modify your JVM parameters as needed by setting JAVA_OPTIONS in $ARTIFACTORY_HOME/etc/default.
You need to restart the service for your changes to take effect.
Installing Artifactory
To install Artifactory as a service, browse to your $ARTIFACTORY_HOME/bin
directory and execute the following command as root:
$ARTIFACTORY_HOME/bin/installService.sh [USER [GROUP]]
The following table describes the sequence of commands performed by the install script:
User creation | Creates a default user named You can also optionally run the install script to start the Artifactory service under a different user by passing in the user name as the first parameter. If you include the user name, you may also optionally include a group. |
etc config | Creates the folder /etc/opt/jfrog/artifactory , copies the configuration files there and creates a soft link in$ARTIFACTORY_HOME/etc |
etc default | Creates the file To modify your JVM parameters modify JAVA_OPTIONS in /etc/opt/jfrog/artifactory/default |
systemd or init. | If you are running on a Linux distribution that supports If If |
Logs folder | Creates the folder The |
Backup folder | Creates the folder $ARTIFACTORY_HOME/backup , so you must create a link if you want this folder to point to a different place (such as /var/backup/artifactory for example). The script makes $ARTIFACTORY_HOME/backup writable for the user ARTIFACTORY_USER . |
Data folder | Creates the folder $ARTIFACTORY_HOME/data , so you must create a link if you want this folder to point to somewhere else. The script makes it writable for the user ARTIFACTORY_USER . |
chkconfig calls | The script calls add and list (you can see the output), and then activates the Artifactory service |
Running Artifactory
To start or stop Artifactory as a service you must be running as root. The command you use depends on whether the Artifactory service was installed using systemd
or init.d.
Using systemd
systemd fix
From Artifactory version 6.14.0, systemd runs properly as a service in RedHat 7.7 and 8 as well as Ubuntu 18.04 and higher.
Start or stop Artifactory using:
systemctl <start | stop> artifactory.service
Checking the status of the Artifactory service
Once Artifactory is correctly installed, you can check if it is running with:
systemctl status artifactory.service
If Artifactory is running, you should see its pid.
If Artifactory is not running you will see a list of environment variables used by the service.
Using init.d
Start or stop Artifactory using
service artifactory <start | stop>
Checking the status of the Artifactory service
Once Artifactory is correctly installed, you can check if it is running with:
service artifactory check
If Artifactory is running, you should see its pid.
If Artifactory is not running you will see a list of environment variables used by the service.
Checking the Artifactory Log
You can check the Artifactory log to see the status of the service using:
tail -f $ARTIFACTORY_HOME/logs/artifactory.log
RPM or Debian Installation
Artifactory can also be installed from an RPM or Debian distribution on Red Hat compatible Linux distributions.
The installation package creates a dedicated user, installs a stripped-down distribution of the Apache Tomcat container configured for Artifactory (on port 8081), and registers this Tomcat as a service (but does not start it immediately).
This package effectively replaces the different setup scripts included with the Artifactory Zip distribution.
Service, Debian/RPM and Docker Installations
By default, in service, Debian/RPM and Docker installation types, the Tomcat directory will be located under the /opt directory. In cases of large file deployments, the TOMCAT_HOME/temp directory (that's under the /tomcat directory) will store temporary files until the deployment is complete. In cases of a small partition of storage allocation to the /opt directory, this can cause a "disk full" error.
To fix this, change the CATALINA_TMPDIR environment variable to /var/opt/jfrog/artifactory/tomcat/temp (make sure to create /var/opt/jfrog/artifactory/tomcat/temp before starting Artifactory).
Managed Files and Folders
When installed from an RPM distribution, Artifactory retains the FHS (Filesystem Hierarchy Standard) format:
File/Folder | Location | Ownership |
---|---|---|
Artifactory home | /var/opt/jfrog/artifactory | artifactory |
Artifactory etc | /etc/opt/jfrog/artifactory | artifactory |
Artifactory logs | /var/opt/jfrog/artifactory/logs | artifactory |
Artifactory env variables | /etc/opt/jfrog/artifactory/default | artifactory |
Tomcat home | /opt/jfrog/artifactory/tomcat | artifactory (root for sub dirs) |
Artifactory startup script | /etc/init.d/artifactory | root |
Artifactory binary | /opt/jfrog/artifactory | root |
Installing Artifactory
To install Artifactory from an RPM or Debian distribution you must be running as root and can use the corresponding commands below:
JVM parameters
Make sure to modify your JVM parameters by modifying JAVA_OPTIONS in /etc/opt/
jfrog/
artifactory/default
as appropriate for your installation.
Running Artifactory
To start or stop Artifactory you must be running as root and can use the following command:
service artifactory start | stop
Checking the status of the Artifactory service
Once Artifactory is correctly installed, you can check if it is running with:
service artifactory check
If Artifactory is running, you should see its pid.
If Artifactory is not running you will see a list of environment variables used by the service.
You can also check the Artifactory log with:
tail -f $ARTIFACTORY_HOME/logs/artifactory.log
When installing from an RPM distribution, Artifactory is generally started as root
and will su
internally to the $ARTIFACTORY_USER
user.
Security
For reasons of security, it is not recommended to leave the $ARTIFACTORY_USER
variable undefined with Artifactory running as the current user, especially if the current user is root
.
Backup and Recover
When uninstalling an RPM distribution of Artifactory, it will save the $ARTIFACTORY_HOME
folder and create a backup folder at /var/opt/jfrog/
while preserving symbolic links to remote filestores.
After installing a new instance of Artifactory, you can recover the configuration and filestore from this backup by running the script $ARTIFACTORY_BINARY/bin/recover.backup.sh
.
Working with an external database
This process does not back up an external database, but rather its definitions in Artifactory. Therefore, when working with an external database, a manual dump should be performed before uninstalling the RPM, and then imported when starting the new installation.
Installing/Upgrading on a new machine
The Backup and Recover described above will only work if you are re-installing the RPM on the same machine. If you are installing or upgrading the RPM on a new machine you will need to use Import as described in the section on Upgrading Artifactory.
Running with Docker
From Version 3.6, Artifactory may be pulled as a Docker Image. For full details, please refer to Installing with Docker.
Service, Debian/RPM and Docker Installations
By default, in service, Debian/RPM and Docker installation types, the Tomcat directory will be located under the /opt directory. In cases of large file deployments, the TOMCAT_HOME/temp directory (that's under the /tomcat directory) will store temporary files until the deployment is complete. In cases of a small partition of storage allocation to the /opt directory, this can cause a "disk full" error.
To fix this, change the CATALINA_TEMPDIR environment variable to /var/opt/jfrog/artifactory/tomcat/temp (make sure to create /var/opt/jfrog/artifactory/tomcat/temp before starting Artifactory).
The ARTIFACTORY_HOME
Folder
It is important to know where your Artifactory home folder is located, since this folder stores your configurations and important repository data.
When Artifactory runs for the first time, it sets up a default configuration and creates all necessary files and folders under the ARTIFACTORY_HOME
folder.
The default location of ARTIFACTORY_HOME is {user.home}/.artifactory
.
To run Artifactory with the home folder set to a different location on the file system (particularly when installing Artifactory on a production server), either:
- Start the Tomcat virtual machine with
-Dartifactory.home=<your preferred Artifactory home folder location>
- or - - Set an
ARTIFACTORY_HOME
environment variable pointing to your preferred location before running the installation.
Artifactory creates the home folder on startup if it does not already exist.
Permissions on the Artifactory Home Folder
Make sure that the user running the Tomcat has write permissions on the Artifactory home folder.
Accessing Artifactory
Artifactory can be accessed using the following URL:
http://SERVER_DOMAIN:8081/artifactory
For example, if you are testing on your local machine you would use: http://localhost:8081/artifactory