Migrating AWS Deployment To Self-Hosting
By David Nimon
Migrate services from AWS to onsite servers and database
Details:
- Goal was to save money by eliminating our internal requirement to use multiple AWS EC2 instances.
- Created a local server cluster
- Installed Pfsense on a PC and setup a Ubiquiti AP for WiFiInstall to act as the router and setup Docker containers on an Intel NUC and a Raspberry Pi.
- Used Docker Compose and publishing services hosted locally with Cloudflare.
- Installed Ubuntu Server on an Intel NUC and a Raspberry Pi, then installed Docker and Portainer for container management
- Created Docker Compose environments for Gitea, Mattermost, Redmine, and KeyCloak, and an authorization server - migrating from the original on AWS as EC2 instances (originally without docker)
- Setup all of the above services to authenticate with KeyCloak, so that only one login is required
- Setup Cloudflare tunnels to have the services accessible on the internet, without exposing the IP address
- Setup a backup process automatically uploading all onsite data to an S3 bucket