This website is a series of (somewhat disorganized) notes on running non-router software on routers, hosted on a router - a TP-Link Google OnHub (TGR1900). I have a focus primarily on OpenWRT, as it as open source as it can be and is a relatively conventional Linux distribution, which is the basis for most of this. Currently, I am serving this website with a statically linked Caddy binary built with xcaddy.
An initial forward note: Not all routers are going to be suitable for this sort of usage. A majority of routers will likely not have the CPU, RAM, and flash memory to act as a server and perform their routing functions. Many will not be suitable for open source router firmware that allows for this sort of functionality. Recently, however, many companies have been making equipment that can handle quite a bit of load. You’re also probably not going to want to use the main (consumer-grade, off the shelf) router connected to your WAN drop to host many services unless it’s pretty beefy, especially if you have relatively fast internet speeds - best to leave that to its task. If you’re using routers as a WiFi AP/repeater/bridge, though, might as well make use of the extra computing power, right?