Let $k>1$ be a positive integer and $n>2018$ an odd positive integer. The non-zero rational numbers $x_1,x_2,\ldots,x_n$ are not all equal and:
$$x_1+\frac{k}{x_2}=x_2+\frac{k}{x_3}=x_3+\frac{k}{x_4}=\ldots=x_{n-1}+\frac{k}{x_n}=x_n+\frac{k}{x_1}$$
Find the minimum value of $k$, such that the above relations hold.
Given the system of equations:
\[ x_1 + \frac{k}{x_2} = x_2 + \frac{k}{x_3} = x_3 + \frac{k}{x_4} = \ldots = x_{n-1} + \frac{k}{x_n} = x_n + \frac{k}{x_1} \]

We need to find the minimum value of \( k \) such that the above relations hold.

1. **Express the common value:**
   Let \( c \) be the common value of all the expressions:
   \[ x_i + \frac{k}{x_{i+1}} = c \quad \text{for all } i \]
   This implies:
   \[ x_1 + \frac{k}{x_2} = x_2 + \frac{k}{x_3} = \ldots = x_n + \frac{k}{x_1} = c \]

2. **Rearrange the equations:**
   From the above, we can write:
   \[ x_i = c - \frac{k}{x_{i+1}} \]
   Substituting \( x_{i+1} \) in terms of \( x_{i+2} \):
   \[ x_i = c - \frac{k}{c - \frac{k}{x_{i+2}}} \]

3. **Form a product equation:**
   Multiply all the equations:
   \[ \prod_{i=1}^{n} \left( x_i + \frac{k}{x_{i+1}} \right) = c^n \]
   Since \( x_i + \frac{k}{x_{i+1}} = c \), we have:
   \[ \prod_{i=1}^{n} x_i \cdot \prod_{i=1}^{n} \frac{k}{x_{i+1}} = c^n \]
   Simplifying, we get:
   \[ \left( \prod_{i=1}^{n} x_i \right) \cdot \left( \frac{k^n}{\prod_{i=1}^{n} x_i} \right) = c^n \]
   \[ k^n = c^n \]
   Since \( c \) is a rational number, \( k \) must be a rational number.

4. **Consider the nature of \( k \):**
   Since \( n \) is odd, \( k^n \) must be a rational number. For \( k \) to be rational and \( k^n \) to be rational, \( k \) must be an integer.

5. **Check possible values of \( k \):**
   - If \( k = 2 \) or \( k = 3 \), then \( k^{n/2} \) is not rational because \( n \) is odd.
   - If \( k = 4 \), then \( k^{n/2} = 4^{n/2} = (2^2)^{n/2} = 2^n \), which is rational.

6. **Verify \( k = 4 \):**
   For \( k = 4 \), we need to check if there exists a solution for \( n = 2019 \):
   - Consider \( x_{3k-2} = 2 \), \( x_{3k-1} = -1 \), \( x_{3k} = -4 \).
   - Verify if these values satisfy the given equations:
     \[ 2 + \frac{4}{-1} = -2 \]
     \[ -1 + \frac{4}{-4} = -2 \]
     \[ -4 + \frac{4}{2} = -2 \]
   - These values satisfy the equations, hence \( k = 4 \) is a valid solution.

The final answer is \( \boxed{4} \)