Install YouTrack JAR as a Service on Linux
The instructions that are provided in this setup guide have been used by the JetBrains development team to install and run YouTrack JAR in a Linux environment.
To perform this installation, verify that the following prerequisites are met:
You have installed Oracle Java SE Runtime Environment 8 or later. The instructions here require that the JRE is available from the path
Any external hostname (proxy hostname) is resolvable from the actual host where YouTrack is installed.
The following procedure describes how to install and run YouTrack JAR as a service on Linux or another *nix-like operating system.
To install the YouTrack JAR distribution as a service on Linux:
Create a user account to run the YouTrack service. For example,
youtrackuser account manages YouTrack data and services.adduser youtrack --disabled-password
Use the following command to download the latest version of the JAR distribution:wget -O /home/youtrack/youtrack.jar https://download.jetbrains.com/charisma/youtrack-<version>.jar
<version>with the current version number and build number. For example,
You can find the current version and build on the download page for YouTrack Standalone. Alternatively, you can download the JAR file manually and save it under
Set the permissions for the JAR file with the following command:chown youtrack:youtrack /home/youtrack/youtrack.jar
systemdservice file in the following directory:
Paste the following content into the
youtrack.servicefile:[Unit] Description=Youtrack Requires=network.target After=syslog.target network.target [Service] Type=simple WorkingDirectory=/home/youtrack ExecStart=/usr/bin/java -jar /home/youtrack/youtrack.jar --J-Xmx1G 8080 User=youtrack [Install] WantedBy=default.target
Customize the content of the file as needed:
If you want YouTrack to start on a different port number, edit the default port
Add and modify other Java parameters as needed.
Use the following command to reload the
systemddaemon and enable the YouTrack service on system start:systemctl daemon-reload systemctl enable youtrack.service
Enter the following command to run the YouTrack service:service youtrack start
http://<your-host-name>:8080in a web browser and wait for the application to become available. As it takes some time to start the application, the port may be unreachable for a short while.
After installation, you can set up YouTrack to run behind a reverse proxy server. For instructions, see Reverse Proxy Configuration.
When you have installed the JAR distribution as described above, upgrading to a later version is relatively simple. All you need to do is:
Remove the previous version of the JAR file.
Download the latest version.
Set permissions for the file.
Restart the service.
All of this can be done by executing the following commands: