This Github Speedtest-x project is an extension of LibreSpeed, which is a pretty lightweight speedtest tool. Speedtest-x project uses file datebase to save speedtest results from various users. Thus you can check out different results from various countries/regions.
Features
- Self-hosted lightweight speedtest page
- User speedtest result datasheet
- No MySQL, but lightweight file database
- Use ip.sb to get IP info by default
- https://fast.51sec.org
- https://speed.51sec.org (test/test)
Docker Run Deployment
-d:start it as a daemon mode
9001: default mapping internal port 80 to host port 9001
Environment variables :
-e WEBPORT=80: Internal Speedtest-x Docker Web Port . Default is 80.
-e MAX_LOG_COUNT=100: Maximum history numbers for saved test results. Default is 100.
-e IP_SERVICE=ip.sb: Which IP DB service provider( default is ip.sb or ipinfo.io)
-e SAME_IP_MULTI_LOGS=false: If allow save multiple results for same ip. Default is false. but strongly suggest to set it to True
Self Hosted Docker Installation Pre-requirements
Free resources you might need to complete this docker project:
- Server: Oracle Free VPS, Azure Free VPS, Google Cloud Free VPS, and others
- Create a Free Tier Windows/Linux Azure VPS VM
- [Free VPS] GCP (Google Cloud Platform) Tips and Tricks (Free 16G RAM, 4 vCPU VPS)
- System: Cloud Vendor Ubuntu, Debian, or DD an original version
- SWAP size increase: wget https://raw.githubusercontent.com/51sec/swap/main/swap.sh && bash swap.sh
- Enable Password ssh login
- Enable BBR
- systemctl restart docker
- Domain: (Optional) EU.ORG to get a free one, free Cloudflare account to manage your domain
- Confirm port has not been used (you might need to install lsof using command : apt install lsof):
- lsof -i:8088
Pre-installed services:
- Docker,
- apt update
- apt install docker.io
- apt install docker-compose
- apt upgrade docker.io
- mkdir /root/data/docker_data/<docker_name>
- Docker-Compose (Using Ubuntu OS for the commands)
- Docker-compose down
- Optional command : use following command to backup your Docker data. You might need to change your folder name based on your docker configuraiton
- cp -r /root/data/docker_data/<docker_name> /root/data/docker_data_backup/<docker_name>
- docker-compose pull
- docker-compose up -d
- docker image prune
- Portainer (Optional)
- docker volume create portainer_data
- docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
- Install some applications: apt install wget curl sudo vim git (Optional)
- aapanel with Nginx (Optional)
- Nginx Proxy Manager (Optional)
- Install screen (Optional)
- Install screen (Depends on the Linux Distribution if it came pre installed or not) : yum install screen
- Initiate a Screen : screen or screen -S <screen name> <command to execute>
- Detach from the screen : "CTRL+A,D" not "CTRL+A+D"
- List all the screen currently working : screen -ls
- Reattach to a screen : screen -r <session number> or screen -r <screen name>
- Kill specific screen: screen -X -S <screen name> quit
- Kill all screens : pkill screen
Deploy to Own VPS
Not recommended to deploy it to other application platform such as fly.io, since those platforms are having limitation for the outbound/inbound througputs. It will be better for you to know the speed limitation on your VPS before deploying to it.Make Docker Support ipv6
/etc/docker/daemon.json
,add following content into file, or create this new file if it doesn't exist.Deploy Docker to Koyeb Platform
URL: https://www.koyeb.com/ | NANO | MICRO | SMALL | MEDIUM | LARGE | XLARGE |
CPU | 1 | 1 | 1 | 2 | 4 | 8 |
RAM | 256MB | 512MB | 1GB | 2GB | 4GB | 8GB |
DISK | 2.5GB SSD | 5GB SSD | 10GB SSD | 20GB SSD | 40GB SSD | 80GB SSD |
PRICE | $2.7/mo | $5.4/mo | $10.7/mo | $21.4/mo | $42.9/mo | $85.7/mo |
Demo site: fast.51sec.org
No comments:
Post a Comment