Access
Open your browser and visit: http://<SERVER_IP> (HTTP)
Follow the Drupal installation wizard in your browser immediately.
Use the following database configuration:
- Database type:
MySQL, MariaDB, Percona Server, or quivalent - Database name:
drupal - Database username:
drupal - Database password: stored in
/root/drupal/.env - Advanced options > Host:
mariadb - Advanced options > Port:
3306
Then set up your site name and admin account.
Important Files and Directories
- App directory:
/root/drupal - Docker Compose file:
/root/drupal/docker-compose.yml - Environment file:
/root/drupal/.env - Nginx config file:
/etc/nginx/sites-available/drupal.conf - Nginx enabled config:
/etc/nginx/sites-enabled/drupal.conf - Drupal sites volume:
/var/lib/docker/volumes/drupal_drupal-sites/ - Drupal modules volume:
/var/lib/docker/volumes/drupal_drupal-modules/ - Drupal profiles volume:
/var/lib/docker/volumes/drupal_drupal-profiles/ - Drupal themes volume:
/var/lib/docker/volumes/drupal_drupal-themes/ - MariaDB data volume:
/var/lib/docker/volumes/drupal_mariadb-data/
Docker Management
Go to install directory:
cd /root/drupal
Start stack:
docker compose up -d
Stop stack:
docker compose down
Restart stack:
docker compose restart
View running containers:
docker compose ps
View logs:
docker compose logs -f
Enabling SSL with a Domain
1. Point your domain to the server IP.
2. Edit Nginx config and replace server_name <IP>; with your domain (server_name <your-domain>):
vim /etc/nginx/sites-available/drupal.conf
3. Install Certbot:
apt install -y certbot python3-certbot-nginx
4. Run the following command to generate a valid Let's Encrypt certificate:
certbot --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Restart Nginx to apply the changes:
systemctl restart nginx
6. Open your browser and visit: https://yourdomain.com