Assume $\mathcal{C}$ is a monoidal category, with unit $I$. Given a monoid object $M$, I'd like to talk about modules over $M$, but couldn't find any reference. This might seem quite a stretch, but it is not so bad: 


* there are notions of left, right and bimodule that "play well" with [residuals](https://ncatlab.org/nlab/show/residual)
* modules of the same "handedness" make up categories as we would expect
* all objects are modules over $I$, and
* we can still define the tensor product of right $M$-module with a left $M$-module as a coequalizer (as in [this nlab page](https://ncatlab.org/nlab/show/tensor+product#of_modules_in_a_monoidal_category)).


Let's assume all such coequalizers exist in
 $\mathcal{C}$.


Now, fix monoids $A, B, C: \mathcal{C}$, an $A$-$B$-bimodule $X$ and a $B$-$C$-bimodule $Y$: can we endow $X \otimes\_{B} Y$ with an $A$-$C$-bimodule structure as we usually do in the case where $\mathcal{C} = \mathbf{Ab}$?


It seems to me that it should be possible, and indeed by the universal property of coequalizers we can show there are morphisms 


$$A \otimes (X \otimes\_{B} Y) \leftarrow (A \otimes X) \otimes\_{B} Y \rightarrow X \otimes\_{B} Y$$
$$(X \otimes\_{B} Y) \otimes C \leftarrow X \otimes\_{B} (Y \otimes C) \to X \otimes\_{B} Y$$


Is this the wrong approach, or should I just *assume* the left arrow is an isomorphism (meaning I'll only consider monoidal categories where $\otimes$ behaves this way)? Is there some reference where this all has already been treated?



Tensor product of modules over a monoid in a monoidal category
As from my own comment, requiring residuals to exist actually endows $X \otimes\_B Y$ with the structure of an $A$-$C$-bimodule; here's a sketch of the proof:


Assume both residuals exists, being the right adjoint to the (left and right) tensor product: this means both tensor products *are* left adjoints and [hence](https://ncatlab.org/nlab/show/adjoints+preserve+%28co-%29limits) cocontinuous. Since coequalizers are colimits, they are preserved by the tensor product, meaning the arrows on the left are isomorphisms:


$$ A \otimes (X \otimes\_B Y) \simeq (A \otimes X) \otimes\_B Y$$
$$(X \otimes\_B Y) \otimes C \simeq X \otimes\_B (Y \otimes C)$$


This allows us to define a functor $\otimes\_B : \mathbf{Mod}\_{B}(\mathcal{C}) \times {}\_{B}\mathbf{Mod}(\mathcal{C}) \to \mathcal{C}$, and functoriality now allows us to endow $X \otimes\_B Y$ of the structure of a left $A$-module and a right $C$-module; we now need to show that such structures "interact nicely": again, functoriality saves the day.


It seems the existence of residuals gives everything else "for free", and I'm kind of satisfied with this. I won't, however, accept this answer for a while: if anyone thinks there are better ways of doing this, or relevant cases where residuals don't exist and still all this "bimodule tensor product" is possibile, I'll be very happy to read about it.


