Installation

Automated Installation

This method provides a streamlined installation process with automatic updates, ideal for Ubuntu Server users.

For the automated installation, we recommend using DigitalOcean or Hetzner as they provide reliable, affordable VPS hosting with public IP addresses.

Requirements:

  • Public IP Address: Both providers offer VPS instances with public IP addresses, which are required for the installer to work properly
  • Ubuntu Server: The automated installer is optimized for Ubuntu Server (20.04 LTS or newer)
  • Server Hardening: After creating your server, you should harden it for security

Important Security Considerations:

Before installing InfinityMetrics, ensure your server is properly hardened. Here are essential security guides:

Key hardening steps include:

  • Setting up a non-root user with sudo privileges
  • Configuring SSH key authentication and disabling password authentication
  • Setting up a firewall (UFW recommended) - Note: The installer will automatically configure UFW to allow ports 80 and 443 for HTTPS
  • Keeping the system updated with security patches

Before installation, configure your DNS records to point to your server. This is optional but highly recommended for automatic SSL certificate setup.

Required DNS Records:

  • A Record: Point your domain to your server’s IPv4 address
  • AAAA Record (if available): Point your domain to your server’s IPv6 address

Example:

yourdomain.com.     A       203.0.113.1
yourdomain.com.     AAAA    2001:db8::1

The installer will automatically detect these records and configure SSL certificates for your domain using Let’s Encrypt.

1. Get your license

Purchase your Infinity Metrics license from our pricing section to get started.

2. InfinityMetrics Installer and Updater

The installer automatically configures SSL certificates and uses Caddy as a proxy. The installer also includes an automatic updater that will keep your InfinityMetrics installation up to date with the latest features and security patches.

Automated Backup System

The automated installer includes comprehensive backup functionality:

  • Daily backups: Full database backups created every night (retained for 30 days)
  • Weekly backups: Additional weekly snapshots for extended recovery options
  • Monthly backups: Long-term monthly archives for historical data preservation

While InfinityMetrics provides application-level backups, we strongly recommend implementing server-level backups as well:

Why Two Backup Strategies:

  • Application backups (InfinityMetrics): Protect your analytics data and configuration
  • Server backups (VPS snapshots): Protect the entire system, including OS, dependencies, and configuration files

Server Backup Options:

  • DigitalOcean: Use automated snapshots or backups service
  • Hetzner: Enable automatic snapshots in the Hetzner Cloud Console
  • Other providers: Configure automated server snapshots through your hosting provider

This dual approach ensures complete protection - if your server fails completely, you can restore the entire system from a server snapshot. If only the application data is corrupted, you can use the faster application-level backups.

For more details, see the Infinity Metrics Installer on GitHub.

Install with a single command

Run the installer and follow its instructions.

curl -fsSL https://getinfinitymetrics.com/install | sh

Self-Managed Installation

This method is for users who prefer manual setup or are using a non-Ubuntu Linux distribution, deploying Infinity Metrics via a Docker image.

1. Get your license

Purchase your Infinity Metrics license from our pricing section to get started.

2. Docker Installation

Infinity Metrics consists of a single Docker image that automatically manages its internal database, making it compatible with any Linux distribution.

It is actively tested on Ubuntu Server (20.04 LTS or newer), but theoretically, it can be used on any Linux distribution.

Note: We recommend putting Infinity Metrics behind a proxy for enhanced security and performance. With this method, all updates are in your hands.

Required Environment Variables

The following environment variables are required to run the Infinity Metrics Docker image:

  • INFINITY_METRICS_LOG_LEVEL: Logging level (e.g., debug)
  • INFINITY_METRICS_APP_PORT: Port for the app (e.g., 8080)
  • INFINITY_METRICS_LICENSE_KEY: Your license key obtained in step 1
  • INFINITY_METRICS_DOMAIN: Your domain (e.g., your-domain.com)
  • INFINITY_METRICS_PRIVATE_KEY: Private key for internal functioning of the app. (32 random characters)

Docker Run Command

Use the following command to run the Infinity Metrics Docker image. Replace the placeholder values with your own:

docker run -d \
  --name infinity-metrics \
  -v /path/to/storage:/app/storage \
  -v /path/to/logs:/app/logs \
  -e INFINITY_METRICS_LOG_LEVEL=debug \
  -e INFINITY_METRICS_APP_PORT=8080 \
  -e INFINITY_METRICS_LICENSE_KEY=your-license-key \
  -e INFINITY_METRICS_DOMAIN=your-domain.com \
  -e INFINITY_METRICS_PRIVATE_KEY=your-private-key \
  --restart unless-stopped \
  infinitymetrics/app:latest

Integrating the Tracking Script

Copy the lightweight tracking script below to your website(s) to start collecting data. This step applies to both installation methods.

<script defer src="https://your-domain.com/api/v1/sdk.js"></script>

Accessing the Dashboard

Once installed, access the analytics dashboard at https://your-domain.com/. This step applies to both installation methods.