Serverhub

User Guide

ServerHub Setup Guide

Monitor and manage your servers with ease

Getting Started

  1. 1

    Download the ServerHub App

    Install the app from the official source to get started with your monitoring setup.

  2. 2

    Create Your Connect Key

    Generate your unique Connect Key in the app to link your servers securely.

  3. 3

    Connect to Your Server

    Connect to the server you want to monitor via SSH to prepare for agent installation.

  4. 4

    Install the ServerHub Agent

    Choose one of the installation methods below to complete your setup.

    Interactive Installation (Recommended)

    This method will prompt you for your User Key during installation.

    # Download the script
    curl -sSL https://raw.githubusercontent.com/7Stockapp/serverhub_dev/main/install.sh -o install.sh
    # Make it executable
    chmod +x install.sh
    # Run it (will prompt for your User Key)
    sudo ./install.sh

    Note: The installation process may take a few minutes to complete.

    Environment Variable Method

    Provide your User Key as an environment variable for a streamlined installation.

    # Replace "your-key-here" with your actual User Key
    USER_KEY=your-key-here sudo -E bash -c "$(curl -sSL https://raw.githubusercontent.com/7Stockapp/serverhub_dev/main/install.sh)"

    Note: If this method appears to hang, consider using the manual installation method described in the troubleshooting section.

    APT Repository Installation

    Install the agent using our APT repository for easier updates.

    # Add the repository
    echo "deb [trusted=yes] https://raw.githubusercontent.com/7Stockapp/serverhub_dev/main stable main" | sudo tee /etc/apt/sources.list.d/serverhub.list
    # Update and install
    sudo apt update --allow-insecure-repositories
    sudo apt install -y serverhub-agent --allow-unauthenticated
    # Set your User Key
    sudo mkdir -p /etc/serverhub
    echo "USER_KEY=your-key-here" | sudo tee /etc/serverhub/config
    sudo systemctl restart serverhub.service

    Note: Replace your-key-here with your actual User Key generated in step 2.

Configuration Settings

Your agent configuration file is located at:

Linux: /etc/serverhub/config
Windows: C:\ProgramData\ServerHub\config.ini

Required Configuration

USER_KEY=your-key-here

Replace your-key-here with the Connect Key generated in step 2.

Verify Your Installation

Check if ServerHub agent is running properly:

systemctl status serverhub.service

You should see active (running) in the output if everything is working correctly.

Tip

After installation, it may take a few minutes for the first data points to appear in your ServerHub dashboard.

Troubleshooting

Diagnostic Commands

View Service Status
systemctl status serverhub.service
Check Service Logs
journalctl -u serverhub.service
Verify Configuration
cat /etc/serverhub/config

Common Issues

APT Lock Errors

If you encounter APT lock errors during installation, run these commands:

sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/apt/lists/lock
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a
Connection Issues

If your server isn't connecting to ServerHub:

  • Verify your User Key is correctly entered in the configuration file
  • Check for firewalls blocking outgoing connections
  • Restart the service after configuration changes

Manual Installation Method

If the standard installation methods fail, try this step-by-step manual approach:

# Download the .deb package directly
wget https://raw.githubusercontent.com/7Stockapp/serverhub_dev/main/pool/serverhub-agent.deb
# Install dependencies and the package
sudo apt install -y python3 python3-pip systemd
sudo dpkg -i serverhub-agent.deb
sudo apt install -f -y
# Create configuration with your user key
sudo mkdir -p /etc/serverhub
echo "USER_KEY=your-key-here" | sudo tee /etc/serverhub/config
# Start the service
sudo systemctl daemon-reload
sudo systemctl restart serverhub.service

Uninstalling ServerHub

If you need to remove the ServerHub agent from your system, follow these steps:

# Stop the service
sudo systemctl stop serverhub.service
# Remove the package
sudo apt remove serverhub-agent
# Delete configuration
sudo rm -rf /etc/serverhub

Note:

Uninstalling the agent will stop all monitoring for this server. Your historical data will remain available in the ServerHub dashboard.

Need Help?

Our support team is ready to assist you with any questions or issues you may encounter.

Contact Support

You're All Set!

Your server is now connected and ready to be monitored with ServerHub. Start tracking your server's performance metrics and services in real-time.

© 2023 ServerHub. All rights reserved.

For more information, visit our GitHub repository.