Skip to main content

Configuration

In this section, we will explore how to customize and configure Aetheria to suit your specific needs. Aetheria offers a flexible and straightforward configuration process, empowering you to tailor the CMS according to your requirements.

Initial setup and configuration options

Aetheria allows for most configuration options to be set via environment variables. This approach provides flexibility and simplifies the management of configuration settings. By defining environment variables, you can customize various aspects of Aetheria, such as database connection settings, security options, storage configurations, and more. Detailed guidance on the specific environment variables and their corresponding configuration options are defined in their own modules throughout the documentation.

Database setup and connection

Aetheria simplifies the initial database setup process by leveraging MongoDB as the default database. With MongoDB's ease of use and scalability, you can seamlessly integrate Aetheria with an existing MongoDB instance or set up a new one.

Since Aetheria utilizes MongoDB, you can bypass the hassle of additional database setup steps and get straight to building and managing your website's content.

To streamline the process of populating your Aetheria instance with initial content, we provide a convenient way to seed your database. By utilizing the customizable aetheria.seed.json file, you can define the structure and content of your initial database entries. This allows for efficient data seeding, whether you are starting a new project or migrating an existing website to Aetheria. We will guide you through the configuration and usage of the aetheria.seed.json file, enabling you to set up your desired initial content effortlessly.

Configuration options

Aetheria offers a wide range of configuration options, allowing you to customize the CMS to suit your specific needs. The following sections will provide an overview of the available configuration options and their corresponding use cases.

Use the tabs to switch between the backend and frontend configuration options.

Backend configuration options

Database configuration

Aetheria utilizes MongoDB as the default database. You can customize the database connection settings by defining the following environment variables:

Environment VariableDescriptionDefault ValueRequiredZod Rule
DB_HOSTHostname of the MongoDB instance.localhostz.string().min(1)
DB_PORTPort to use when connecting to the MongoDB instance.27017z.coerce.number().min(1024)
.max(65535).optional()
DB_USERNAMEUsername to use when connecting to the MongoDB instance.rootz.string().min(1)
DB_PASSWORDPassword to use when connecting to the MongoDB instance.rootz.string().min(1)
DB_NAMEName of the database to use.aetheriaz.string().min(1)

Security configuration

Aetheria provides a wide range of security options to ensure that your website is protected from malicious attacks. You can customize the security settings by defining the following environment variables:

Environment VariableDescriptionDefault ValueRequiredZod Rule
BCRYPT_HASHING_ITERATIONNumber of iterations to use when hashing passwords.10z.coerce.number().min(1).optional()
BCRYPT_ALGORITHM_VERSIONVersion of the bcrypt algorithm to use.bz.enum(["a", "b"]).optional()
JWT_ENCRYPTIONEncryption mode to use for JWTs.symmetricz.enum(["symmetric", "asymmetric"])
JWT_SECRETSecret to use for JWT encryption.example-secret-keyJWT_ENCRYPTION === "symmetric"z.string().optional()
JWT_PUBLIC_KEYPublic key to use for JWT encryption.undefinedJWT_ENCRYPTION === "asymmetric"z.string().optional()
JWT_PRIVATE_KEYPrivate key to use for JWT encryption.undefinedJWT_ENCRYPTION === "asymmetric"z.string().optional()
JWT_ALGORITHMAlgorithm to use for JWT encryption.HS512z.enum(["HS256","HS384","HS512","RS256","RS384","RS512",
"ES256","ES384","ES512","PS256","PS384","PS512"]).optional()
JWT_AUDIENCEAudience to use for JWT encryption.aetheriaz.string().optional()
JWT_ISSUERIssuer to use for JWT encryption.aetheriaz.string().optional()
JWT_EXPIRES_INExpiration time to use for JWT encryption.2hz.string().optional()