Cloudron LAMP App


Overview

This page is a placeholder showing information on how to use the LAMP stack. 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:

MYSQL_HOST
MYSQL_PORT
MYSQL_USERNAME
MYSQL_PASSWORD
MYSQL_DATABASE

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:

MAIL_SMTP_SERVER
MAIL_SMTP_PORT
MAIL_SMTPS_PORT
MAIL_SMTP_USERNAME
MAIL_SMTP_PASSWORD
MAIL_FROM
MAIL_DOMAIN

Redis Credentials

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

REDIS_URL
REDIS_HOST
REDIS_PORT
REDIS_PASSWORD