This is the code that I use to host my personal instance of The Lounge.
It's in two parts:
ansible/
has Ansible playbooks for installing and maintaining The Lounge and its supporting software.tf/
is a Terraform module to provide the underlying server.
See the readmes in those directories for more details.