YouTrack Standalone 2018.2 Help

Stop and Start YouTrack

This page describes how to stop and start your YouTrack Standalone server.

The following situations require that you stop YouTrack:

  • You want to change the location of the database.

  • You want to modify properties or JVM options for your YouTrack Standalone server.

  • You want to upgrade your YouTrack Standalone installation.

Stop and Start an MSI Installation

When you install YouTrack with an MSI distribution, YouTrack runs as a Windows service. The display name of the windows service is JetBrains YouTrack. After the initial configuration, the application runs in the background on the server.

To start and stop the Windows service, use the Services Microsoft Management Console (MMC) (Control Panel > Administrative Tools > Services).

In later versions of Windows, you can right-click the application in the Start menu to stop and start the service.

Stop and Start a ZIP Installation

If you installed YouTrack with a ZIP distribution, you run YouTrack from the command line. The scripts that you use to start and stop YouTrack are located in the <youtrack_home>/bin/ directory. The <youtrack_home> directory is the location where the ZIP distribution was unpacked during installation.

To stop and start YouTrack on macOS or Linux platforms, execute the command as a non-root user.

Enter commands to stop and start the YouTrack service in a command-line interface. Use the following commands to manage the status of your YouTrack Standalone instance:


Description run

Starts the YouTrack service. With this command, the console is blocked until the service is stopped with the stop command. start

Starts the YouTrack service. With this command, the console is only blocked during the startup process. stop

Stops the YouTrack service. restart

Restarts the YouTrack service. help

Displays a list of all commands that can be executed in the command-line interface.

Stop and Start a JAR Distribution

To start YouTrack JAR, run the command:

java -jar youtrack-<version>.jar

To stop YouTrack JAR, in the console, press Ctrl+C or run the command:

java -jar youtrack-<version>.jar stop

Stop and Run a Docker Container

Run YouTrack docker container

To run YouTrack container, execute the command:

docker run -it --name youtrack-server-instance \ -v <path to data directory>:/opt/youtrack/data \ -v <path to conf directory>:/opt/youtrack/conf \ -v <path to logs directory>:/opt/youtrack/logs \ -v <path to backups directory>:/opt/youtrack/backups \ -p <port on host>:8080 \ jetbrains/youtrack:<version>

Command attributes:

  • -it — a flag that attaches YouTrack container input and output including the startup logs to the terminal window. Note that pressing `Ctrl+C` when the terminal is attached to a container output causes the container to shut down. Use `Ctrl+PQ` in order to detach the terminal from container output. For more details, see the official docker documentation.

  • --name youtrack-server-instance — the arbitrary name for the container.

  • -v <path to NNN directory>:/opt/youtrack/NNN — binding the YouTrack-specific 'NNN' directory on the host machine to the respective /opt/youtrack/NNN directory inside the container.

  • -p <port on host>:8080 — parameter that defines the ports mapping. It instructs the host machine to listen on port <port on host> and propagate all traffic to the port `8080` inside the docker container.

Stop YouTrack docker container

To stop the YouTrack service gracefully, run the command:

docker exec <containerId> stop

For a graceful shutdown, you can also use the standard `docker kill --signal=SIGTERM <containerId>` command.

We do not recommend using the standard command `docker stop`. By default, this command sends the `SIGTERM` signal to the YouTrack process inside the Docker container, then waits for 10 seconds. If YouTrack does not finish the shutdown within that time period, the `SIGKILL` is sent to the kernel and the YouTrack process is killed. This may lead to data corruption. To avoid this outcome, specify an appropriate timeout value when using this command. For example, the following command leaves enough time for the YouTrack service to shut down:

docker stop -t 60 <containerId>
Last modified: 7 March 2019