This guide will help you install, configure, and run the Server Manager application on your Ubuntu server. Please follow the steps below to ensure a smooth setup process. This manager is currently under development, I am currently rewriting the whole backend to use docker-compose in stead of normal docker. View the different branches to see my status. Please create an issue if you find any bugs or ideas for new features.
Before proceeding, ensure the following are installed on your system:
- OS: Ubuntu or Linux Manjaro
- Python: 3.9 or newer
- pip (Python's package installer)
- Docker (if you're using containerized deployment)
- NPM (Only if you want to use nodejs servers.)
You will also need access to the MariaDB server for database setup and configuration.
Option 1 (RECOMMENDED), install it trough my CDN: When using this option, you can normally jump to step 5 immediately, except for the database setup in the .env file and starting the process!
curl -O https://tijnn.dev/assets/server-manager/run.sh && chmod +x run.sh && sudo ./run.sh
Option 2, a non-automatic setup:
git clone https://github.com/tijnndev/server-manager.git
cd server-manager
To isolate your dependencies, create a virtual environment:
python3.12 -m venv venv
source venv/bin/activate # For Linux/macOS
venv\Scripts\activate # For Windows
Once inside the virtual environment, you can proceed to install the necessary Python dependencies.
Install all the required Python packages listed in the requirements.txt
file:
pip install -r requirements.txt
Ensure the following key packages are installed:
flask
flask-migrate
flask-sqlalchemy
You will need to create and configure a MariaDB database for the application.
Log in to the MariaDB server:
mysql -u root -p
Run the following SQL commands to create the database and assign privileges to a user:
CREATE DATABASE `server-monitor`;
GRANT ALL PRIVILEGES ON *.* TO 'youruser'@'localhost' IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
EXIT;
Replace 'your_password'
with a password of your choice. If you prefer no password for the youruser
user, omit the password.
Ensure the DATABASE_URI
in .env
points to your MariaDB server with the correct credentials:
DATABASE_URI=mysql+pymysql://myuser:mypassword@localhost:3306/server-monitor
SECRET_KEY=your_secret_key_here
DISCORD_CLIENT_ID=your_discord_client_id
DISCORD_CLIENT_SECRET=your_discord_client_secret
DISCORD_REDIRECT_URI=http://localhost:7001/discord_login/callback
After initializing the database connection, run the migrations to create the necessary tables:
flask db migrate
flask db upgrade
This will create the necessary tables and schema in the server-monitor
database.
Once everything is set up and running, you should be able to access the server manager at the following URL:
- For deployment:
http://localhost:7001
(if you are not using Docker)
If you encounter the error:
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'root'@'localhost' (using password: NO)")
Make sure that the MariaDB user root
has the appropriate privileges and password. You may need to adjust the credentials in .env
to match the user you've created. Also make sure the database is already created!
If you receive an error when trying to start Docker, you may need to install Docker properly by following Docker's official installation instructions.