configures database and establishes port forwarding