Free modules internal to a nice category Let $\mathcal{C}$ be a cocomplete category with finite products such that for all $X \in \mathrm{Ob}(\mathcal{C})$ the functor $X \times - : \mathcal{C} \to \mathcal{C}$ is cocontinuous; perhaps we will even need that $\mathcal{C}$ is cartesian closed, and/or locally finitely presentable. Let $R$ be a ring object in $\mathcal{C}$ and consider the category ${}_R \mathrm{Mod}$ of left $R$-module objects internal to $\mathcal{C}$ (these are objects $X \in \mathrm{Ob}(\mathcal{C})$ equipped with morphisms $+ : X \times X \to X$, $\cdot : R \times X \to X$, $0 : 1 \to X$ and $- : X \to X$, such that certain diagrams commute). We have a forgetful functor ${}_R \mathrm{Mod} \to \mathcal{C}$. How can we describe its left adjoint (if it exists)? That is, how does the free left $R$-module object on $X \in \mathrm{Ob}(\mathcal{C})$ look like? 
We are familiar with the case $\mathcal{C}=\mathsf{Set}$. What's special in this situation is that $X$ is a coproduct of copies of $1$, and in that case the free left $R$-module is just a direct sum of copies of "$R$". But I don't directly see what to do with arbitrary objects $X$.
 A: Let $\mathcal{S}$ be a category with finite products and let $R$ be a ring in $\mathcal{S}$. There is an $\mathcal{S}$-enriched Lawvere theory $\mathcal{T}_R$ where $\mathcal{T}_R (n, m) = R^{m \times n}$ with composition defined by matrix multiplcation. We can define models of $\mathcal{T}_R$ in $\mathcal{S}$ to be an object $M$ together with morphisms $\alpha_n : \mathcal{T}_R (n, 1) \times M^n \to M$ making the obvious diagrams of the form below commute:
$$\require{AMScd}
\begin{CD}
\mathcal{T}_R (m, 1) \times \mathcal{T}_R (n, m) \times M^n @>>> \mathcal{T}_R (n, 1) \times M^n \\
@VVV @VV{\alpha_n}V \\
\mathcal{T}_R (m, 1) \times M^m @>>{\alpha_m}> M
\end{CD}$$
It is straightforward to check that the category of models of $\mathcal{T}_R$ is equivalent to the category of $R$-modules (as concrete categories over $\mathcal{S}$).
Now, suppose $\mathcal{S}$ has colimits of countable diagrams. Then we can define the coend
$$F (X) = \int^{n : \mathbf{FinSet}} \mathcal{T}_R (n, 1) \times X^n$$
and if $\times$ preserves colimits in each variable, then there is an induced $R$-module structure on $F (X)$. There is also an evident morphism $X \to F (X)$, and it exhibits $F (X)$ as the free $R$-module generated by $X$. Thus, very concretely, the free $R$-module generated by $X$ is the quotient of
$$\coprod_{n \ge 0} R^n \times X^n$$
by a certain countable family of parallel pairs: writing an element of $R^n \times X^n$ suggestively as 
$$\begin{pmatrix} r_1 & \cdots & r_n \end{pmatrix} \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix}$$
we are imposing the relations
$$
\begin{pmatrix}
a_1 & \cdots & a_m
\end{pmatrix}
\begin{pmatrix}
x_{f (1)} \\
\vdots \\
x_{f (m)}
\end{pmatrix}
= 
\begin{pmatrix}
b_1 & \cdots & b_n
\end{pmatrix}
\begin{pmatrix}
x_{1} \\
\vdots \\
x_{n}
\end{pmatrix}
$$
for every map $f : \{ 1, \ldots, m \} \to \{ 1, \ldots, n \}$, where $b_1, \ldots, b_n$ are defined as follows,
$$b_j = \sum_{f (i) = j} a_{i}$$
i.e. $\vec{b} = \vec{a} F^\mathsf{T}$, where $F$ is the 0-1 matrix corresponding to the map $f$ and $\vec{a}$ and $\vec{b}$ are the obvious row vectors.
Of course, we can run the same argument whenever we have an $\mathcal{S}$-enriched Lawvere theory.

Also, as mentioned in the comments, I believe we can construct $F (X)$ when $\mathcal{S}$ is only a locally presentable category, without assumptions on $\times$. I suspect the cost is that we will have to iterate the coend construction infinitely many times before we obtain an $R$-module.
