  Signature-based algorithms have become a standard approach for computing
Gr\"obner bases in commutative polynomial rings. However, so far, it was not
clear how to extend this concept to the setting of noncommutative polynomials
in the free algebra. In this paper, we present a signature-based algorithm for
computing Gr\"obner bases in precisely this setting. The algorithm is an
adaptation of Buchberger's algorithm including signatures. We prove that our
algorithm correctly enumerates a signature Gr\"obner basis as well as a
Gr\"obner basis of the module generated by the leading terms of the generators'
syzygies, and that it terminates whenever the ideal admits a finite signature
Gr\"obner basis. Additionally, we adapt well-known signature-based criteria
eliminating redundant reductions, such as the syzygy criterion, the F5
criterion and the singular criterion, to the case of noncommutative
polynomials. We also generalize reconstruction methods from the commutative
setting that allow to recover, from partial information about signatures, the
coordinates of elements of a Gr\"obner basis in terms of the input polynomials,
as well as a basis of the syzygy module of the generators. We have written a
toy implementation of all the algorithms in the Mathematica package OperatorGB
and we compare our signature-based algorithm to the classical Buchberger
algorithm for noncommutative polynomials.
