> For the complete documentation index, see [llms.txt](https://docs.pteroca.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pteroca.com/installation/installation/docker-installation/manual-docker-installation.md).

# Manual Docker Installation

{% hint style="warning" %}
Please note, this project is currently in an early version (0.x.x) and may contain bugs. Use it at your own risk.
{% endhint %}

## Overview

PteroCA can be quickly deployed using Docker Compose, which automates the setup of all required services (web server, database, and optional tools) in isolated containers. This method is ideal for both development and production environments, ensuring consistent configuration and easy management.

***

## 1. Prerequisites

Before you begin, ensure you have the following installed on your server:

* Docker (with Docker Compose plugin) - [Install Docker](https://docs.docker.com/engine/install/)
* Git - [Install Git](https://git-scm.com/downloads)

***

## 2. Quick Start

Clone the PteroCA repository and run the initialization script:

```bash
git clone https://github.com/PteroCA-Org/panel.git
cd panel
bash docker-init.sh
```

The script will:

* Check for Docker and Docker Compose installation
* Verify that the Docker daemon is running
* Guide you through environment selection (development or production)
* Configure database credentials and environment variables
* Build and start all required containers

***

## 3. Environment Selection

During initialization, you will be prompted to choose:

* Development (`dev`)
  * Runs on port `8000`
  * Includes PHPMyAdmin for database management (port `8080`)
  * Uses default credentials for easier local testing
* Production (`prod`)
  * Runs on port `80`
  * Generates secure, random database passwords
  * Disables PHPMyAdmin for security

***

## 4. Configuration Steps

The script will automatically:

* Detect existing database volumes and environment files
* Generate or update the `.env` configuration file
* Set up database credentials and application secrets
* Build Docker containers for the selected environment
* Start the database and web server, running migrations automatically
* Set proper file permissions for uploads and cache

{% hint style="info" %}
If your PteroCA instance is running behind Cloudflare, you need to adjust your configuration to avoid CSRF and host validation issues. Please follow the instructions here: [Trusted Proxies & Cloudflare Configuration](/advanced-topics/security-hardening/trusted-proxies.md).
{% endhint %}

***

## 5. Accessing PteroCA

After installation, you can access the panel at:

* Development: [http://localhost:8080](http://localhost:8080/)
* Production: [http://localhost](http://localhost/)

Database credentials and other important information will be displayed at the end of the installation.

***

## 6. Managing Containers

Common Docker Compose commands:

```bash
# Stop all containers
docker-compose -f docker-compose.yml down

# View logs
docker-compose -f docker-compose.yml logs -f

# Restart containers
docker-compose -f docker-compose.yml restart
```

Replace `docker-compose.yml` with `docker-compose.prod.yml` for production.

***

## 7. First-Time Configuration

After containers are running, complete the setup using one of two methods:

* Web Wizard:\
  Visit `/first-configuration` in your browser for a guided setup.
* CLI Wizard:\
  Run the following command inside the web container:\
  `docker-compose -f exec web php bin/console pteroca:system:configure`\
  (Old command `app:configure-system` is deprecated but still works until v1.0.0)

***

## 8. Post-Installation Steps

After completing the Docker installation, configure the following to ensure full functionality:

### 8.1 Install PteroCA Plugin for Pterodactyl

{% hint style="warning" %}
**Required for full integration**

The PteroCA Plugin must be installed in your Pterodactyl panel to enable features like:

* Server console access
* Real-time statistics
* Server variable management
* SSO authentication
  {% endhint %}

👉 [**Install PteroCA Plugin for Pterodactyl**](/core-configuration/pterodactyl-integration/addon-installation.md)

[Read more about Pterodactyl Configuration and PteroCA Plugin here.](/core-configuration/pterodactyl-integration.md)

### 8.2 Configure Allowed Origins (Console Access)

For the server console to work properly, you need to configure `allowed_origins` in your Pterodactyl Wings configuration.

This allows PteroCA to communicate with Pterodactyl Wings for console access and real-time server management.

👉 [**Configure Allowed Origins**](/core-configuration/pterodactyl-integration/allowed-origins.md)

{% hint style="info" %}
You can configure allowed origins at any time - it doesn't need to be done immediately during installation.
{% endhint %}

### 8.3 Complete System Configuration

Configure your panel settings through the CLI wizard or Admin Panel:

* [**General Settings**](/core-configuration/core-configuration/general-settings.md) - Site title, logo, locale
* [**Email Settings**](/core-configuration/core-configuration/email-configuration.md) - SMTP configuration for notifications
* [**Payment Settings**](/core-configuration/core-configuration/payment-configuration.md) - Stripe integration for payments
* [**Pterodactyl Settings**](/core-configuration/core-configuration/pterodactyl-settings.md) - API connection and SSO setup

👉 [**View all configuration options**](/core-configuration/core-configuration.md)

***

## 9. Troubleshooting

If you encounter issues:

* Ensure Docker and Docker Compose are installed and running
* Check that ports `80` or `8000` are not blocked by other services
* Review logs using `docker-compose logs -f`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pteroca.com/installation/installation/docker-installation/manual-docker-installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
