The documentation does assume you will run a local server. But anyone can build a gateway, with or without the server. To operate a gateway, you really only need to be able to process transactions just like a client does. When a transaction happens you need to know. When you need to perform a transaction, you need to perform it.
If you do decide to run your own server, nothing really needs to change. Just point your gateway interface to your local server instead of the public server pool.
Whatever you do, please don't send your secrets to the public server pool. If you use ripple-lib, make sure local signing is on. If you use anything else, use ripple-lib's
rsign.js program to sign transactions for you.