2018-07-18 21:15:28 +00:00
# Pterodactyl Panel - Docker Image
This is a ready to use docker image for the panel.
## Requirements
2021-03-27 04:27:18 +00:00
This docker image requires some additional software to function. The software can either be provided in other containers (see the [docker-compose.yml ](https://github.com/pterodactyl/panel/blob/develop/docker-compose.example.yml ) as an example) or as existing instances.
2018-07-18 21:15:28 +00:00
2018-09-16 01:22:13 +00:00
A mysql database is required. We recommend the stock [MariaDB Image ](https://hub.docker.com/_/mariadb/ ) image if you prefer to run it in a docker container. As a non-containerized option we recommend mariadb.
2018-07-18 21:15:28 +00:00
2018-09-16 01:22:13 +00:00
A caching software is required as well. We recommend the stock [Redis Image ](https://hub.docker.com/_/redis/ ) image. You can choose any of the [supported options ](#cache-drivers ).
2018-07-18 21:15:28 +00:00
2018-09-16 01:22:13 +00:00
You can provide additional settings using a custom `.env` file or by setting the appropriate environment variables in the docker-compose file.
2018-07-18 21:15:28 +00:00
## Setup
2022-01-18 03:05:04 +00:00
Start the docker container and the required dependencies (either provide existing ones or start containers as well, see the [docker-compose.yml ](https://github.com/pterodactyl/panel/blob/develop/docker-compose.example.yml ) file as an example.
2018-07-18 21:15:28 +00:00
After the startup is complete you'll need to create a user.
If you are running the docker container without docker-compose, use:
```
2018-08-14 04:01:25 +00:00
docker exec -it < container id > php artisan p:user:make
2018-07-18 21:15:28 +00:00
```
If you are using docker compose use
```
2018-08-14 04:01:25 +00:00
docker-compose exec panel php artisan p:user:make
2018-07-18 21:15:28 +00:00
```
## Environment Variables
There are multiple environment variables to configure the panel when not providing your own `.env` file, see the following table for details on each available option.
2022-09-25 19:11:45 +00:00
Note: If your `APP_URL` starts with `https://` you need to provide an `LE_EMAIL` as well so Certificates can be generated.
2018-07-18 21:15:28 +00:00
| Variable | Description | Required |
| ------------------- | ------------------------------------------------------------------------------ | -------- |
| `APP_URL` | The URL the panel will be reachable with (including protocol) | yes |
2018-09-16 01:22:13 +00:00
| `APP_TIMEZONE` | The timezone to use for the panel | yes |
2021-12-04 18:51:15 +00:00
| `LE_EMAIL` | The email used for letsencrypt certificate generation | yes |
2018-07-18 21:15:28 +00:00
| `DB_HOST` | The host of the mysql instance | yes |
| `DB_PORT` | The port of the mysql instance | yes |
| `DB_DATABASE` | The name of the mysql database | yes |
| `DB_USERNAME` | The mysql user | yes |
| `DB_PASSWORD` | The mysql password for the specified user | yes |
| `CACHE_DRIVER` | The cache driver (see [Cache drivers ](#cache-drivers ) for detais) | yes |
2018-09-16 01:22:13 +00:00
| `SESSION_DRIVER` | | yes |
| `QUEUE_DRIVER` | | yes |
| `REDIS_HOST` | The hostname or IP address of the redis database | yes |
| `REDIS_PASSWORD` | The password used to secure the redis database | maybe |
| `REDIS_PORT` | The port the redis database is using on the host | maybe |
2018-07-18 21:15:28 +00:00
| `MAIL_DRIVER` | The email driver (see [Mail drivers ](#mail-drivers ) for details) | yes |
| `MAIL_FROM` | The email that should be used as the sender email | yes |
| `MAIL_HOST` | The host of your mail driver instance | maybe |
| `MAIL_PORT` | The port of your mail driver instance | maybe |
| `MAIL_USERNAME` | The username for your mail driver | maybe |
| `MAIL_PASSWORD` | The password for your mail driver | maybe |
### Cache drivers
You can choose between different cache drivers depending on what you prefer.
We recommend redis when using docker as it can be started in a container easily.
| Driver | Description | Required variables |
| -------- | ------------------------------------ | ------------------------------------------------------ |
2018-09-16 01:22:13 +00:00
| redis | host where redis is running | `REDIS_HOST` |
| redis | port redis is running on | `REDIS_PORT` |
| redis | redis database password | `REDIS_PASSWORD` |
2018-07-18 21:15:28 +00:00
### Mail drivers
You can choose between different mail drivers according to your needs.
Every driver requires `MAIL_FROM` to be set.
| Driver | Description | Required variables |
| -------- | ------------------------------------ | ------------------------------------------------------------- |
| mail | uses the installed php mail | |
| mandrill | [Mandrill ](http://www.mandrill.com/ ) | `MAIL_USERNAME` |
| postmark | [Postmark ](https://postmarkapp.com/ ) | `MAIL_USERNAME` |
| mailgun | [Mailgun ](https://www.mailgun.com/ ) | `MAIL_USERNAME` , `MAIL_HOST` |
2021-03-27 04:27:18 +00:00
| smtp | Any SMTP server can be configured | `MAIL_USERNAME` , `MAIL_HOST` , `MAIL_PASSWORD` , `MAIL_PORT` |