Setup Youtrack Stand-alone on Linux Debian

Install java (version 7 minimum) by executing:
[code lang=”bash”]
apt-get update
apt-get install openjdk-7-jre
apt-get install openjdk-7-jdk

Check your java version by running
[code lang=”bash”]java -version

If your default version is not 7 or higher change by running and selecting another version as default.
[code lang=”bash”]
update-alternatives –config java

Download YouTrack Stand-alone from JetBrains. Or download by using console:

[code lang=”bash”]
mkdir /var/web/youtrack
wget /var/web/youtrack/youtrack-5.1.2.jar

Make a new init script like this
[code lang=”bash”]
nano /etc/init.d/youtrack

[code lang=”bash”]

# Provides:          youtrack
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Should-Start:      $named
# Should-Stop:       $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts YouTrack.
# Description:       Starts YouTrack tracking system.

java -Xmx1g -XX:MaxPermSize=1g -Djava.awt.headless=true -jar /var/web/youtrack/youtrack-5.1.2.jar 8088 &

Modify permissions like this
[code lang=”bash”]
chmod -R 755 /etc/init.d/youtrack

Then install your init-script by running:
[code lang=”bash”]
insserv /etc/init.d/youtrack

YouTrack server will now launch every time system boots and is accessed on port 8088. Notice this guide is for Youtrack 5.1.2 so if you download a newer version just change the path in the init script.

To launch YouTrack for this first-time do this:
[code lang=”bash”]

To integrate with Apache2 as a HTTPS site do this, otherwise you are done.

Activate modules needed for SSL proxy.

[code lang=”bash”]
a2enmod ssl
a2enmod proxy
a2enmod proxy_http
a2enmod headers

Add a Apache2 site by doing this:

[code lang=”bash”]
nano /etc/apache2/sites-available/default-ssl

Add following to the file:

[code lang=”bash”]

SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem

ServerAdmin admin@locahost
DocumentRoot /var/web/youtrack/

Header edit Location ^http: https:

RequestHeader set X-Forwarded-Proto “https”

ProxyRequests Off
ProxyPass /
ProxyPassReverse /

ErrorLog /var/web/youtrack/error.log
LogLevel warn
CustomLog /var/web/youtrack/access.log combined


Activate site by
[code lang=”bash”]
a2ensite default-ssl

Restart Apache2 configuration
[code lang=”bash”]
/etc/init.d/apache2 graceful

If all went good your YouTrack installation should be accessible at

Read more

Read more about install YouTrack stand-alone here.
Read more about install Java on Debian here.

Leave a Reply