Skip to content

About

Self-hosted latency and bandwidth testing tool for measuring connections to your server and comparing results from friends or clients.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

66 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ServerPulse Banner

πŸ“‘ ServerPulse

Self-hosted latency and bandwidth testing for your server

Node.js JavaScript SQLite License: MIT

A lightweight self-hosted network tester for measuring connections to your server, with a shared results leaderboard for friends and clients.


✨ Features

  • πŸ“Ά Latency testing β€” 40 requests with individual results, median, average, minimum, maximum, jitter, packet loss, and a quality rating.
  • πŸš€ Bandwidth testing β€” 2 MB download and upload speed tests.
  • πŸ† Shared Results β€” friends and clients can test the same ServerPulse server and compare their latest results in one place.
  • πŸ‘€ Anonymous participant ID β€” a generated client ID identifies your results without requiring an account or password.
  • ⏱️ Rate limiting β€” latency and bandwidth submissions are independently limited to once every 20 seconds.
  • ✏️ Username editing β€” usernames can be changed once per hour.
  • πŸ’Ύ Persistent results β€” leaderboard data is stored in SQLite on the hosting server.
  • πŸ“ Server location β€” displays the approximate location of the server hosting ServerPulse.
  • πŸ”’ Privacy-friendly β€” no accounts, analytics, advertising, or stored user IP addresses.
  • πŸ“± Responsive UI β€” designed to work on desktop and mobile browsers.
  • πŸŒ™ Dark-first design β€” clean interface for comfortable use across devices.

πŸš€ Quick Start

1. Clone the repository

Clone the repository to your hosting server or deployment environment.

git clone https://github.com/MinecadeXD/ServerPulse.git
cd ServerPulse

2. Install dependencies

npm install

3. Configure the required port

ServerPulse requires a PORT environment variable. Your hosting provider will normally provide the port that the application must use.

For example:

PORT=3000

The value above is only an example. Use the port required by your hosting provider.

4. Start ServerPulse

npm start

Open the hosting address provided by your hosting provider.

5. Share the ServerPulse address

Give the ServerPulse address to your friends or clients. Everyone can open the same address from their own device, run the latency or bandwidth tests, and view the shared Results leaderboard.

Local development

For local development only, you can provide your own PORT value and access ServerPulse through localhost, for example:

PORT=3000

Then open:

http://localhost:3000

βš™οΈ Configuration

ServerPulse intentionally keeps configuration small.

PORT

Controls the HTTP port used by the Node.js server.

PORT=3000

The value is normally supplied by your hosting provider. ServerPulse does not use a fallback port; startup fails if PORT is missing or invalid.

.env.example

The repository includes a sample configuration:

PORT=3000

This is only an example value. Set PORT to the port required by your hosting provider.

Important: Never commit your real .env file. It is ignored by Git.


πŸ“Š How It Works

ServerPulse is deployed on a server you control or have access to. You share its address with friends or clients, and each person measures the connection from their own browser to that same ServerPulse host.

Latency

The latency test performs 40 requests to the ServerPulse server and records each response time.

It then calculates:

  • Median latency
  • Average latency
  • Minimum latency
  • Maximum latency
  • Jitter
  • Packet loss
  • Overall quality rating

The final latency result submitted to the Results leaderboard is the test's median latency.

Bandwidth

The bandwidth test measures:

  • Download speed
  • Upload speed

Both tests use a fixed 2 MB payload. The measured values are submitted independently to the Results leaderboard.

Results

The Results system is intended for shared testing. One person deploys ServerPulse, shares its address with friends or clients, and everyone can submit results to the same leaderboard.

Participants choose a username and receive a locally generated client ID.

The server stores:

  • Username
  • Anonymous client ID
  • Latest latency result
  • Latest download speed
  • Latest upload speed
  • Test timestamps

The leaderboard keeps the latest submitted result, rather than a user's best historical result.


πŸ† Results & Rate Limits

The Results system is designed to remain simple and lightweight.

  • Users can register with only a username.
  • Users who have not tested yet can still appear as Not tested.
  • Latency and bandwidth results are stored independently.
  • Latency submissions are limited to once every 20 seconds.
  • Bandwidth submissions are limited to once every 20 seconds.
  • Username changes are limited to once every 60 minutes.
  • The shared Results leaderboard displays up to 100 participants.
  • Results are loaded when the Results tab is opened.
  • No account, password, email address, or public IP address is required.

The database is created automatically at:

data/serverpulse.db

SQLite database files are intentionally ignored by Git.


πŸ—‚οΈ Repository Structure

ServerPulse/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ style.css
β”‚   └── app.js
β”œβ”€β”€ server.js
β”œβ”€β”€ package.json
β”œβ”€β”€ .env.example
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
└── README.md

The SQLite database is generated automatically in the data/ directory when the server starts. It is not part of the repository.


🌐 Server Location

ServerPulse performs a lightweight IP geolocation lookup at server startup to determine the approximate location of the hosting server.

The detected location is cached in memory and displayed by the website.

ServerPulse currently uses ipwho.is for this lookup.

No visitor IP address is stored in the ServerPulse database.


πŸš€ Deployment

ServerPulse can run on any Node.js-compatible hosting service that supports:

  • Node.js 22 or newer
  • npm install
  • npm start
  • A writable filesystem for SQLite
  • The hosting provider's PORT environment variable

Important for production hosting

The data/ directory must be persistent if you want the shared Results leaderboard to survive server restarts, redeployments, or application replacements.

If the hosting provider deletes the SQLite database, the saved Results data will also be lost.


πŸ”’ Security & Privacy

ServerPulse is intentionally designed without user accounts or unnecessary tracking.

  • No passwords are collected.
  • No email addresses are collected.
  • No analytics are included.
  • No advertising is included.
  • Visitor IP addresses are not stored in the Results database.
  • Client IDs are generated locally and are not authentication credentials.
  • Usernames are validated on both the client and server.
  • Result submissions are rate-limited server-side.
  • Database files are excluded from Git.
  • Environment files are excluded from Git.

Important: A ServerPulse client ID is only an anonymous participant identifier. It must not be treated as a secure authentication token.


⚠️ Important Limitations

ServerPulse measures the connection from the visitor's browser to the server hosting ServerPulse.

It does not:

  • Test every region or data center.
  • Measure the connection between two arbitrary servers.
  • Provide continuous uptime monitoring.
  • Store historical performance graphs.
  • Guarantee ISP-wide or nationwide internet speed measurements.
  • Replace dedicated network diagnostic tools.

Results can vary depending on the visitor's device, browser, Wi-Fi/mobile connection, ISP, network congestion, and server load.


πŸ§ͺ Troubleshooting

The website does not load

Check that:

  • The Node.js server is running.
  • The hosting provider has started the application with npm start.
  • The configured PORT matches the port expected by the hosting provider.
  • The server is reachable from your device.

The tests appear stuck

Check:

  • The browser console for JavaScript errors.
  • That the browser can reach the ServerPulse server.
  • That the hosting provider is not blocking the required requests.
  • That the Node.js process is still running.

Results are not being saved

Check:

  • The server has a writable data/ directory.
  • SQLite dependencies installed successfully.
  • The Node.js process has not restarted with a fresh or temporary filesystem.
  • The server logs for database or API errors.

The Results leaderboard disappeared

The Results database is stored on the hosting server.

If the hosting provider resets or replaces the application's persistent storage, data/serverpulse.db may be lost. Use persistent storage if your host provides it.


🀝 Contributing

Contributions are welcome.

Before opening a pull request:

  1. Keep the project focused on latency, bandwidth, and shared result testing.
  2. Avoid adding unnecessary external services or tracking.
  3. Keep the project lightweight and maintainable.
  4. Update the README when user-facing behavior changes.
  5. Do not commit .env files, database files, credentials, or generated build output.
  6. Test both the frontend and Node.js server when changing application logic.

⭐ Support the Project

If ServerPulse is useful to you:

  • ⭐ Star the repository.
  • πŸ› Report reproducible bugs through GitHub Issues.
  • πŸ’‘ Suggest improvements through GitHub Issues.
  • πŸ”§ Submit pull requests for useful, tested improvements.

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for the full license text.


Made with β™₯️ by Minecade

About

Self-hosted latency and bandwidth testing tool for measuring connections to your server and comparing results from friends or clients.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages