Create Root User with Environment Variables
Creating the root user during installation is optional but recommended as it prevents the registration page from ever being exposed.
Validation Requirements
The following requirements must be met for the root user credentials in a production environment.
Email
- Must be a valid email address
- Must have a valid DNS record
- Maximum length: 255 characters
Username
- Minimum length: 3 characters
- Maximum length: 255 characters
- Can only contain letters, numbers, spaces, underscores, and hyphens
Password
- Minimum length: 8 characters
- Must contain both uppercase and lowercase letters
- Must contain at least one number
- Must contain at least one special symbol
- Must not be a commonly used or compromised password
Automated Installation Method
Prepare Your Credentials
Create your root user credentials according to the validation requirements above.
Run Installation Command
Execute the automated installation script with your prepared credentials:
bashenv ROOT_USERNAME=RootUser [email protected] ROOT_USER_PASSWORD=Password bash -c 'curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash'
View the Scripts Source Code
INFO
The installation script must be run as root
. If you're not logged in as root
, the script will use sudo
to elevate privileges.
sudo -E env ROOT_USERNAME=RootUser [email protected] ROOT_USER_PASSWORD=Password bash -c 'curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash'
WARNING
If any of the environment variables values contain a space, wrap the values in double quotes, for example ROOT_USERNAME="Root User"
.
- Complete Setup After configuring the root user credentials, continue with the installation steps to complete your Coolify setup.
Manual Installation Method
Prepare Your Credentials
Create your root user credentials according to the validation requirements above.
Configure Environment Variables
Edit the environment variables file:
bashnano /data/coolify/source/.env
Add the following variables with your prepared credentials:
bashROOT_USERNAME=RootUser ROOT_USER_EMAIL=[email protected] ROOT_USER_PASSWORD=Password
WARNING
If any of the environment variables values contain a space, wrap the values in double quotes, for example ROOT_USERNAME="Root User"
- Complete Setup After configuring the root user credentials, continue with the installation steps to complete your Coolify setup.