Yes, the AltServer app must be open and running on the same Wi-Fi network that AltStore ensures you can install and refresh your apps on your device. You don’t need it running permanently, though; simply ensure it is active regularly, and your device is connected, and your apps will be refreshed – do this at least once a week to stop the apps expiring.
The easiest way around this is to have AltServer set to run automatically when you log in to your computer. If you are a Windows user, go into your settings and enable Network Connectivity under Sleep Mode.