Infrastructure as Code repository for the KyleHub network. This repository contains container orchestration configurations, setup scripts, and service definitions.
For comprehensive documentation, please visit our Docusaurus docs (coming soon).
Standard commands for a fresh installation (Debian 13 / Ubuntu 24.04):
# Update system
sudo apt update && sudo apt upgrade -y
# Install essential tools
sudo apt install -y curl wget git nano htop fail2ban
# Configure Fail2ban (protect SSH)
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo systemctl enable fail2ban
sudo systemctl start fail2ban
# Install Docker
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USERIf you added an SSH key during creation, connect using the root user:
ssh root@<your-ip>Note: If you are asked for a password, ensure you are using root@ and not your local username.
It is recommended to create a non-root user for daily operations.
- Create user:
adduser kyle
- Add to sudo group:
usermod -aG sudo kyle
- Setup SSH for new user:
Run these commands as
root:# Create .ssh directory mkdir /home/kyle/.ssh chmod 700 /home/kyle/.ssh # Create authorized_keys touch /home/kyle/.ssh/authorized_keys chmod 600 /home/kyle/.ssh/authorized_keys # Set ownership chown -R kyle:kyle /home/kyle/.ssh
- Add your Public Key:
On your local machine, get your public key:
On the server (as root), add it to the new user's config:
cat ~/.ssh/id_ed25519.pubecho "YOUR_PUBLIC_KEY_CONTENT" >> /home/kyle/.ssh/authorized_keys
services/- Service definitions and configurations
To prevent accidental leakage of secrets (API keys, passwords, private keys), we use a multi-layered approach.
We have configured .gitignore to exclude:
.envfiles (Environment variables)*.patfiles (Zitadel Personal Access Tokens)*.key,*.pem(SSL/SSH keys)data/,backups/(Persistent data)
We use pre-commit with Gitleaks to automatically scan your staged changes for secrets before you commit.
Setup:
- Install pre-commit:
pip install pre-commit # OR on macOS brew install pre-commit - Install the hooks:
pre-commit install
Now, every time you run git commit, Gitleaks will scan your changes. If it finds a secret, the commit will be blocked.
Ensure your configuration files on the server are secure:
# Secure .env files
chmod 600 services/auth/.env
# Secure ACME (Let's Encrypt) storage
chmod 600 services/auth/letsencrypt/acme.jsonThis project is licensed under the MIT License - see the LICENSE file for details.