Cloudron LAMP App (PHP 7.3)


Overview

This page is a placeholder showing information on how to use the LAMP stack (PHP 7.3.17-1+ubuntu18.04.1+deb.sury.org+1) This page will get overwritten, when an index.php or index.html is uploaded. You can always access the database credentials from the file credentials.txt with SFTP.

The credentials shown here can only be used from within your app. They will not work from outside the Cloudron.


MySQL Credentials

Use the following environment variables in the PHP code to access MySQL:

CLOUDRON_MYSQL_HOST mysql
CLOUDRON_MYSQL_PORT 3306
CLOUDRON_MYSQL_USERNAME adb67aa37604c4e1
CLOUDRON_MYSQL_PASSWORD c2ad81fb0e35c041744d59f240aac43581f50a8d3837105e
CLOUDRON_MYSQL_DATABASE adb67aa37604c4e1

phpMyAdmin Access

It is installed here. For login credentials see phpmyadmin_login.txt via SFTP.


Cron

Put a file called crontab into the directory /app/data and it will picked up at next app restart. It has to be in the cron syntax without username and must end with a newline. For example, the following crontab updates feeds every hour:

0 * * * * php /app/code/update.php --feeds

Commands are executed as the user www-data. Generate cron patterns via crontabgenerator.


Sendmail Credentials

Use the following environment variables in the PHP code to send email:

CLOUDRON_MAIL_SMTP_SERVER mail
CLOUDRON_MAIL_SMTP_PORT 2525
CLOUDRON_MAIL_SMTPS_PORT 2465
CLOUDRON_MAIL_SMTP_USERNAME dolibarr.app@lws.landsra.eu
CLOUDRON_MAIL_SMTP_PASSWORD 6322a11dff2ce81d4d6ff81b7bb5ae4680a3ef3b80a474ca
CLOUDRON_MAIL_FROM dolibarr.app@lws.landsra.eu
CLOUDRON_MAIL_DOMAIN lws.landsra.eu

Redis Credentials

Use the following environment variables in the PHP code to connect to Redis:

CLOUDRON_REDIS_URL redis://redisuser:c1f5e09e76f68170b59a11124a3c325bb4f703f2fc9617c5@redis-fe3ea8e9-bd18-4203-a671-727160f69e5c
CLOUDRON_REDIS_HOST redis-fe3ea8e9-bd18-4203-a671-727160f69e5c
CLOUDRON_REDIS_PORT 6379
CLOUDRON_REDIS_PASSWORD c1f5e09e76f68170b59a11124a3c325bb4f703f2fc9617c5