For Windows, you can run YouTrack as a service with the help of Docker Compose.
Ensure you have Docker Desktop installed on your Windows system. For instructions, please refer to the Docker documentation.
Create a Docker Compose File.
A Docker Compose file is typically a .yml
that defines your containerized application and its configuration. In this case, your file contains the parameters you would typically use to run YouTrack.
Here's an example you can use as a guide for writing your file:
version: "3"
services:
YouTrack:
container_name: youtrack-server
image: jetbrains/youtrack:<version>
user: "13001:13001"
restart: unless-stopped
ports:
- "<port on host>:8080"
volumes:
- <path to data folder>:/opt/youtrack/data
- <path to conf folder>:/opt/youtrack/conf
- <path to logs folder>:/opt/youtrack/logs
- <path to backups folder>:/opt/youtrack/backups
Run Docker Compose as a Windows Service.
Open a Command Prompt or PowerShell with administrative privileges. Navigate to the directory where your Docker Compose file is located and use the following command to run it as a Windows service:
docker-compose -f docker-compose.yml up -d
This command starts YouTrack as a Windows service in detached mode, running it in the background.
You can then manage your YouTrack service using standard Docker commands. For example:
To stop the service, use: docker-compose -f docker-compose.yml down
To check the service status, use: docker-compose -f docker-compose.yml ps
If the server shuts down for whatever reason, Docker will automatically restart the container on reboot.
In order for this to work, you must configure the Docker service to start automatically when the server boots up. For specific instructions, please refer to the documentation for your server operating system.
You will also need to ensure that the Windows user account that runs the service is automatically logged in on reboot. This is typically done at the Windows service level and is managed separately from the Docker container's user context. For specific instructions, please refer to the documentation for the application that manages user access in your server environment.