Skip to main content

Database Configuration

Prerequisites

Make sure to have a working PostgreSQL database set up and running before configuring ServerRawler to connect to it.
If you haven't set up a PostgreSQL database yet, go to the Database Setup Guide.

Configuration System

ServerRawler uses a folder where all configuration files are stored. The folder is named config.

Config

If you run ServerRawler fist time, it will automatically create a database.toml file with default values in the root directory of your project. It should look like this:

database.toml
# ServerRawler configuration file
# Github: https://github.com/Cyberdolfi/ServerRawler
# Read the docs here: https://cyberdolfi.github.io/ServerRawler/docs/getting-started/configuration

host = "localhost"
port = 5432
user = "postgres" # Don't use superuser in production
password = "your_strong_password" # Change this to your actual password
database = "serverrawler"

Simply, fill in the correct connection details for your PostgreSQL database and save the file.
If you are using no password use password = "".

Using a Custom Configuration File Path

By default, ServerRawler looks for the database.toml file in the root directory of your project. If you want to use a custom path for your configuration file, you can specify it using the --config argument.

Weak Credentials Warning

ServerRawler will check automatically if there are default or weak credentials in the database.toml file and will warn you if it detects any. Make sure to use strong and unique credentials for your database connection to ensure the security of your data.