A high-performance Git repository caching server designed for Arch Linux AUR packages. Aurora Server provides caching of AUR repositories with intelligent TTL management, reducing external API calls and improving package manager performance.
Aurora Server acts as a proxy for AUR repositories, caching packages and serving them via Git protocol. It's designed to work seamlessly with package managers like yay and paru, providing faster package operations and reducing dependency on external services.
- AUR Repository Caching: Automatically fetches and caches AUR packages
- Git Protocol Support: Full Git protocol implementation for seamless integration
- Intelligent TTL Management: Configurable cache expiration with automatic refresh
- Performance Monitoring: Built-in statistics and monitoring endpoints
- RPC Request Handling: Supports AUR RPC requests for package information
- SQLite Database: Efficient storage with package metadata tracking
The server consists of several key components:
- GitServer: Main HTTP server handling Git operations and RPC requests
- AURService: Manages AUR package fetching and repository management
- PackageDatabase: SQLite-based storage for package metadata and statistics
- GitRequestHandler: Processes Git protocol requests and responses
- RPCHandler: Handles AUR RPC requests for package searches and info
- Node.js 18+
- Git
- TypeScript (for development)
- Clone the repository:
git clone https://github.com/AuroraMirror/aurora-server.git
cd aurora-server- Install dependencies:
npm install- Build the project:
npm run build- Start the server:
npm startThe server can be configured using environment variables:
PORT: Server port (default: 3000)CACHED_PACKAGES_PATH: Path for cached packages (default:./cached_packages)MAX_UPLOAD_SIZE: Maximum upload size for Git operations (default:50mb)
# Development mode
npm run dev
# Production mode
npm run build
npm startConfigure your package manager to use the local server:
Option 1: Command line parameter (temporary)
yay --aurrpcurl "http://localhost:3000/rpc" -SyuOption 2: Environment variable (permanent)
# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
export AURRPCURL="http://localhost:3000/rpc"Option 3: yay configuration file (recommended)
Create or edit ~/.config/yay/config.json:
{
"aurrpcurl": "http://localhost:3000/rpc"
}Option 1: Command line parameter
paru --aururl "http://localhost:3000" -SyuOption 2: Configuration file
Edit ~/.config/paru/paru.conf:
[options]
aururl = "http://localhost:3000"After configuring your package manager, test it with:
# For yay
yay -Syu
# For paru
paru -SyuYou should see proper version comparisons instead of all packages showing "1.0.0" from AUR.
GET /stats- Package statistics overviewGET /stats/top-fetched- Most frequently fetched packagesGET /stats/top-requested- Most frequently requested packages
src/
├── config/ # Configuration management
├── server/ # HTTP server and routing
├── services/ # Core business logic
└── types/ # TypeScript type definitions
npm run buildThe compiled JavaScript will be output to the dist/ directory.
The project uses TypeScript for type safety and follows modern JavaScript practices. All source code is in the src/ directory with proper type definitions.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
Contributions are welcome. Please ensure your code follows the existing style and includes appropriate tests.
For issues and questions, please use the GitHub issue tracker.