server: try to use env vars for state to make it faster