A modern, distributed IRC network infrastructure built for irc.perl.org with multi-region deployment.
The Magnet IRC Network is IRC infrastructure that provides reliable, secure, and performant IRC services across multiple geographic regions. Built using Solanum IRCd and Atheme services, it leverages Fly.io's global infrastructure and Tailscale's mesh networking for secure inter-server communication.
- Multi-Region Deployment: US (Chicago) and EU (Amsterdam) regions for optimal global performance
- Security-First Design: Tailscale mesh networking, ephemeral authentication keys, auto-generated passwords
- High Availability: Geographic redundancy with automatic failover capabilities
- Modern Infrastructure: Container-based deployment with proper health checks and monitoring
┌─────────────────┐ Tailscale ┌─────────────────┐
│ magnet-9RL │◄─────────────────►│ magnet-1EU │
│ (US Hub/IRC) │ Private Mesh │ (EU IRC) │
│ SID: 9RL │ │ SID: 1EU │
│ OpenSSL+EPYC │ │ OpenSSL+EPYC │
└─────────────────┘ └─────────────────┘
│ │
▼ ▼
┌─────────────────┐ Tailscale ┌─────────────────┐
│ magnet-atheme │◄─────────────────►│ magnet-postgres │
│ (US Services) │ Private Mesh │ (Fly MPG) │
│ OpenSSL+EPYC │ │ │
└─────────────────┘ └─────────────────┘
-
magnet-9RL - Primary IRC server (US/Chicago)
- Solanum IRCd with OpenSSL optimizations
- Hub server for network coordination
- SSL/TLS client connections on port 6697
-
magnet-1EU - Secondary IRC server (EU/Amsterdam)
- Solanum IRCd with OpenSSL optimizations
- Linked to US hub for global federation
- Regional optimization for European users
-
magnet-atheme - IRC Services (US/Chicago)
- User registration and authentication (NickServ)
- Channel management services (ChanServ)
- Persistent data storage via PostgreSQL
-
magnet-postgres - Database (US/Chicago)
- PostgreSQL database for services persistence
- User accounts, channel registrations, configurations
- Automated backups and high availability
- Access to the perl-irc Github organization
- Fly.io CLI installed and authenticated
- Access to the
magnet-irc
Fly.io organization - Tailscale account with access to the
perl-irc
organization - Basic familiarity with IRC network administration
For testing and development purposes, use development-specific app names to avoid conflicts with production:
# Create development apps with -dev suffix
fly apps create magnet-hub-dev --org magnet-irc
fly apps create magnet-atheme-dev --org magnet-irc
# Set up Tailscale authentication for dev
fly secrets set TAILSCALE_AUTHKEY=tskey-auth-xxxxx --app magnet-9rl-dev
# Deploy base infrastructure (development)
fly deploy --app magnet-hub-dev
fly deploy --app magnet-atheme-dev
# Validate mesh connectivity
fly ssh console --app magnet-hub-dev
tailscale status
Important: Always use the -dev
suffix for development deployments to prevent
conflicts with production infrastructure.
Follow the systematic approach outlined in github-issues.md
:
- Start with Issue #1 - Implement base infrastructure with proper testing
- Follow TDD methodology - Write failing tests, implement minimal code to pass
- Validate each step - Ensure all tests pass before proceeding
- Build incrementally - Each issue adds functionality while maintaining stability
SERVER_NAME
- Unique server identifier (magnet-9RL, magnet-1EU)SERVER_SID
- Three-character server ID for IRC protocolSERVER_DESCRIPTION
- Human-readable server descriptionTAILSCALE_AUTHKEY
- Ephemeral auth key for mesh networkingSERVICES_PASSWORD
- Authentication between IRC server and servicesLINK_PASSWORD_9RL_1EU
- Authentication between linked IRC servers
The project uses environment variable substitution in configuration templates:
ircd.conf.template
- Solanum server configurationatheme.conf.template
- Atheme services configuration- Startup scripts handle dynamic password generation and Tailscale initialization
- Ephemeral Tailscale Keys - Devices automatically cleaned up on container termination
- Auto-Generated Passwords - 24-32 character secure passwords for all inter-service communication
- SSL/TLS Everywhere - All client and server-to-server communications encrypted
- Private Mesh Networking - Inter-server communication isolated via Tailscale
- AMD EPYC Optimizations - Hardware-accelerated cryptography with OpenSSL
- No passwords stored in plain text or logs
- Secure credential distribution via Fly.io secrets
- Network isolation from public internet for internal communication
- Regular password rotation capabilities
- Comprehensive security audit coverage in test suite
- OpenSSL with AES-NI acceleration on AMD EPYC processors
- Multi-core compilation during Docker builds
- Optimized connection classes for different user types and regions
- Efficient resource allocation (1-2GB RAM, 1-2 vCPUs per service)
- Geographic distribution for optimal user experience
The project includes comprehensive performance testing:
- Response time measurement and SLA establishment
- Throughput testing under load
- Resource utilization monitoring
- Capacity planning metrics
- Performance regression detection
# Check application status
fly status --app magnet-9rl
# View logs
fly logs --app magnet-9rl
# SSH into container
fly ssh console --app magnet-9rl
# Check Tailscale mesh status
tailscale status
# Monitor SSL connections
netstat -an | grep :6697
# Test OpenSSL performance
openssl speed aes-256-cbc
# Verify AMD EPYC features
cat /proc/cpuinfo | grep flags
All components include comprehensive health checks:
- Tailscale mesh connectivity
- IRC server responsiveness
- Services authentication status
- Database connectivity
- SSL certificate validity
- Use GitHub Issues - Follow the systematic 15-issue implementation plan
- Maintain Documentation - Update relevant documentation with changes
- Test Thoroughly - Ensure all tests pass before submitting changes
- Security Review - Consider security implications of all changes
The project emphasizes comprehensive testing:
- Unit Tests - Component-level functionality validation
- Integration Tests - Inter-component communication testing
- End-to-End Tests - Complete IRC network functionality
- Load Tests - Performance and stability under realistic usage
- Security Tests - Vulnerability and penetration testing
- Simple, clean, maintainable solutions preferred
- Match existing code style and formatting
- Preserve comments and documentation
- Use descriptive, evergreen naming conventions
- No mock implementations - always use real data and APIs
README.md
- This comprehensive project overviewLICENSE
- MIT License for the project
- Fly.io Documentation
- Tailscale Documentation
- Solanum IRCd Documentation
- Atheme Services Documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Fly.io Organization:
magnet-irc
- Tailscale Organization:
perl-irc
- Github Organization:
perl-irc
For issues, questions, or contributions:
- Submit issues following the established format
- Ensure all tests pass before requesting reviews
Note: This infrastructure is designed for production IRC network operation. Follow all security best practices and test thoroughly in development environments before production deployment.