A shameless extract from Wiki states the following about recoilless rifles:
A recoilless rifle, recoilless launcher or recoilless gun, sometimes abbreviated "RR" or "RCL" (for ReCoilLess) is a type of lightweight artillery system or man-portable launcher that is designed to eject some form of counter-mass such as propellant gas from the rear of the weapon at the moment of firing, creating forward thrust that counteracts most of the weapon's recoil. This allows for the elimination of much of the heavy and bulky recoil-counteracting equipment of a conventional cannon as well as a thinner-walled barrel, and thus the launch of a relatively large projectile from a platform that would not be capable of handling the weight or recoil of a conventional gun of the same size. Technically, only devices that use spin-stabilized projectiles fired from a rifled barrel are recoilless rifles, while smoothbore variants (which can be fin-stabilized or unstabilised) are recoilless guns. This distinction is often lost, and both are often called recoilless rifles.
Because some projectile velocity is inevitably lost to the recoil compensation, recoilless rifles tend to have inferior range to traditional cannon, although with a far greater ease of transport, making them popular with paratroop, mountain warfare and special forces units, where portability is of particular concern, as well as with some light infantry and infantry fire support units. The greatly diminished recoil allows for devices that can be carried by individual infantrymen: heavier recoilless rifles are mounted on light tripods, wheeled light carriages, or small vehicles, and intended to be carried by crew of two to five. The largest versions retain enough bulk and recoil to be restricted to a towed mount or relatively heavy vehicle, but are still much lighter and more portable than cannon of the same scale. Such large systems have mostly been replaced by guided anti-tank missiles in first-world armies.
There are a number of principles under which a recoilless gun can operate, all involving the ejection of some kind of counter-mass from the rear of the gun tube to offset the force of the projectile being fired forward. The most common system involves venting some portion of the weapon's propellant gas to the rear of the tube, in the same fashion as a rocket launcher. This creates a forward directed momentum which is nearly equal to the rearward momentum (recoil) imparted to the system by accelerating the projectile. The balance thus created does not leave much momentum to be imparted to the weapon's mounting or the gunner in the form of felt recoil. Since recoil has been mostly negated, a heavy and complex recoil damping mechanism is not necessary. Despite the name, it is rare for the forces to completely balance, and real-world recoilless rifles do recoil noticeably (with varying degrees of severity). Recoilless rifles will not function correctly if the venting system is damaged, blocked, or poorly maintained: in this state, the recoil-damping effect can be reduced or lost altogether, leading to dangerously powerful recoil. Conversely, if a projectile becomes lodged in the barrel for any reason, the entire weapon will be forced forward.
Since venting propellant gases to the rear can be dangerous in confined spaces, some recoilless guns use a combination of a counter-shot and captive piston propelling cartridge design to avoid both recoil and backblast. The Armbrust "cartridge," for example, contains the propellant charge inside a double-ended piston assembly, with the projectile in front, and an equal counter-mass of shredded plastic to the rear. On firing, the propellant expands rapidly, pushing the pistons outward. This pushes the projectile forwards towards the target and the counter-mass backwards providing the recoilless effect. The shredded plastic counter-mass is quickly slowed by air resistance and is harmless at a distance more than a few feet from the rear of the barrel. The two ends of the piston assembly are captured at the ends of the barrel, by which point the propellant gas has expanded and cooled enough that there is no threat of explosion. Other counter-mass materials that have been used include inert powders and liquids.
In other words, recoilless rifles were great for infantry in the days before small AT missiles but really a bit of a waste of time, range and efficiency for an AFVs other than that a larger calibre round could be fire and a certain saving in all up weight. Furthermore, I'm not sure I would wish to crew a tank that advertised itself like Krakatoa every time it fired!
All that said, here is my take on what was asked for. I have left the basic stripped-down WOMBAT 120mm barrel to give you an idea of size...
View attachment 715420