If you reside abroad, you don’t have to pay taxes in Germany, but you’ll need to report the capital gains on your tax return in your residence country.