I have in the past run a successful indoor goldfish tank. The recipe I used: large tank, hard water (KH 16) - gold fish do much better in hard water, under gravel filtration, medium sized gravel with a syphon used on the gravel at least once a month, lots of floating plants - mainly hornwort, no rooted plants, good lighting and two external filters and a HOB filter - goldfish are messy and with big body weight they need good O2 levels and they eat a lot and produce a lot of waste so a lot of filtration is called for.
They are much happier in my formal stone edged pond, hard water, lots of plants and a very large filter with a UV system, the filter, it runs March to October, running it in the winter would kill the fish by removing the protection from ice the still water levels provide and the UV, it is only needed to stop summer algae blooms. Goldfish also of course breed in the summer, when in even a modest pond, they do need, in my garden, protection from the Magpies, the latter love feeding sushi to their chicks. Very clever birds Magpies and actually very beautiful. I don't mind them taking a few juvenile fish as the fish transition from black/brown to gold in year 2, chicks need their dinner, but the Magpies are expert fisher folks and they would empty my pond of all but the largest and most wary fish. I used a steel concrete reinforced mesh, 4 inch by 2 inch gaps, raised on bricks, it makes the reach down beyond Magpies, and local heron will not pop its legs into the pond if it has to straddle the metal mesh. The size of the mesh allows frogs and newts access, they don't listen to me and will not stick to my other pond. My other pond is an earth edged wildlife pond which allows birds access for water, however, a clever male blackbird once stole loads of tadpoles to feed its chicks, birds aren't daft. In dry spells I get dozens of interesting birds drinking from my wildlife pond, which of course, has no goldfish, they would only eat the daphnia and the tadpoles and make a mess of the water quality, the pond is soft water, so not really good for gold fish.