Skip to main content
All CollectionsGetting Started
Self-Hosting your StatsDrone Data
Self-Hosting your StatsDrone Data

This guide provides a comprehensive walkthrough for setting up a self-hosted environment for your StatsDrone application.

Joe Hatch avatar
Written by Joe Hatch
Updated over a week ago

Introduction

Setting up a self-hosted server for StatsDrone involves several technical steps that require a basic understanding of server management and database configuration. This guide is designed to help you smoothly navigate the installation and setup process.

You Will Need:

  • Basic Linux Server Management: Familiarity with Linux commands and server setup, particularly Ubuntu.

  • Networking Knowledge: Understanding of network configurations, including firewall settings and IP configurations.

  • Database Management: Experience with MySQL, including how to create and manage databases and users.

  • Security Best Practices: Knowledge of secure server communication and data protection measures.

Self Hosting steps

If you encounter any issues during setup, support is available through the StatsDrone app.

1. Install an Ubuntu Server

  • Begin by setting up an Ubuntu server. Once installed, access the server via its terminal.

2. Install OpenSSH

  • Install the OpenSSH package to enable secure server access.

sudo apt-get install openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh

3. Install MySQL

  • Update your server’s package index and install MySQL.

sudo apt update
sudo apt install mysql-server
sudo systemctl start mysql.service

4. Create a New Database

  • Access MySQL and create a new database.

sudo mysql
CREATE DATABASE YourDatabaseName;
  • Verify that your database has been created.

SHOW DATABASES;

5. Configure MySQL User

  • Create a MySQL user that can access your database from the StatsDrone server.

CREATE USER 'YourUser'@'143.110.218.77' IDENTIFIED BY 'YourPassword';
GRANT ALL PRIVILEGES ON YourDatabaseName.* TO 'YourUser'@'143.110.218.77';
ALTER USER 'YourUser'@'143.110.218.77' IDENTIFIED WITH mysql_native_password BY 'YourPassword';
FLUSH PRIVILEGES;
\quit
  • Restart MySQL to apply the changes.

sudo systemctl restart mysql;
  • Check that your user has been successfully created with the necessary permissions.

sudo mysql
SELECT user,host,account_locked,password_expired FROM mysql.user;
SHOW GRANTS FOR 'YourUser'@'143.110.218.77';
\quit

6. Allow Remote Access

  • Edit the MySQL configuration to allow remote access.

sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
  • Change the bind-address from 127.0.0.1 to 0.0.0.0 and save the changes.

sudo ufw allow from 143.110.218.77 to any port 3306
sudo systemctl restart mysql;

7. Configure StatsDrone

  • Log in to the StatsDrone app, go to the Settings page, and navigate to the Self-hosting settings menu.

  • Enter your Ubuntu server’s IP address, MySQL database name, username, and password.

Need More Help?

If you need technical assistance, use the chat support feature within the StatsDrone app for real-time help.

Did this answer your question?