Why Use Local Mirrors?
Using a local mirror for your Ubuntu repositories provides several benefits:
- Faster Downloads: Local mirrors reduce latency and increase download speeds
- Bandwidth Savings: Reduces strain on your internet connection
- Reliability: More stable connections to nearby servers
- Support Local Infrastructure: Helps support Iranian hosting providers
How to Install and Use
Follow these steps to configure your Ubuntu system with a local mirror:
Important: Ubuntu doesn't install curl by default.
If you don't have it installed, use the wget method below instead.
Method 1: Using curl (Recommended)
# Download the mirror configuration tool
curl -L https://ubuntu.s3.ir-thr-at1.arvanstorage.ir/mirror-changer.sh -o mirror-changer.sh
# Make the script executable
chmod +x mirror-changer.sh
# Run the configuration tool
sudo ./mirror-changer.sh
Method 2: Using wget (Works without curl)
# Download the mirror configuration tool
wget https://ubuntu.s3.ir-thr-at1.arvanstorage.ir/mirror-changer.sh
# Make the script executable
chmod +x mirror-changer.sh
# Run the configuration tool
sudo ./mirror-changer.sh
Tip: The script now clears all existing mirror configurations before setting a new one.
After Configuration
Once you've selected your mirror, the script will automatically:
- Clear all existing mirror configurations
- Set your new mirror configuration
- Verify the new configuration
# After selecting your mirror, you'll see:
Sources.list.d configuration updated successfully!
New mirror: [Your Selected Mirror] ([URL])
Run 'apt update' to refresh package lists
Available Mirrors
Here's a quick reference of all available mirrors:
- 1 - Arvan Cloud (Recommended)
- 2 - Chabokan
- 3 - Runflare (Most Updated)
- 4 - Sindad (Recommended)
- 5 - Hyper Clouds
- 6 - Shatel (Not Working)
- 7 - Rasanegar (Not Working)
- 8 - Pardisco
- 9 - Mobinhost
- 10 - irarchive
- 11 - Liara
- 12 - Clear all mirrors
- 13 - Restore default Ubuntu
Reverting to Default Mirror
If you encounter any issues with your selected mirror, you can easily revert to the official Ubuntu repository:
# Select option 12 (Restore default Ubuntu) when prompted
sudo ./mirror-changer.sh
# Then select 12 when the menu appears
Alternatively, you can clear all mirror configurations:
# Select option 11 (Clear all mirrors) when prompted
sudo ./mirror-changer.sh
# Then select 11 when the menu appears
Docker Installation Tool
Install Docker using the HyperClouds mirror for optimized performance:
Important: This script uses the HyperClouds mirror by default.
# Download the Docker installation tool
curl -L https://ubuntu.s3.ir-thr-at1.arvanstorage.ir/docker-installer.sh -o docker-installer.sh
# Make the script executable
chmod +x docker-installer.sh
# Run the configuration tool
sudo ./docker-installer.sh
Tip: The script automatically handles all Docker installation steps.
Docker Installation Process
During installation, you'll see the following progress:
=== Docker Installation with HyperClouds Mirror ===
Ubuntu Codename: noble
-----------------------------------------------
[1/4] Installing required packages (ca-certificates, curl)...
[2/4] Setting up Docker GPG key...
[3/4] Configuring Docker repository...
[4/4] Installing Docker CE and related components...
-----------------------------------------------
Docker installation completed successfully!
Docker version: Docker version 25.0.3, build 11a4d5d
To manage Docker without sudo, add your user to the docker group:
sudo usermod -aG docker $USER
newgrp docker
-----------------------------------------------
Run 'docker run hello-world' to verify Docker is working