> ## Documentation Index
> Fetch the complete documentation index at: https://docs.instapods.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Services Overview

> Add databases to your pods — MySQL, PostgreSQL, and Redis.

InstaPods lets you install database services directly inside your pods. Each service runs alongside your application in the same container, accessible via `localhost`.

## Available Services

| Service                            | Port | Version | Use Case                                    |
| ---------------------------------- | ---- | ------- | ------------------------------------------- |
| [MySQL](/services/mysql)           | 3306 | 8.0     | Relational database, WordPress, Laravel     |
| [PostgreSQL](/services/postgresql) | 5432 | 14      | Advanced relational database, Django, Rails |
| [Redis](/services/redis)           | 6379 | 7       | Caching, sessions, queues, real-time data   |

## Plan Requirements

<Warning>
  Services require the **Build** plan (\$7/mo) or higher. Pods on the Launch plan cannot install services — upgrade your plan first.
</Warning>

## Installation

<Tabs>
  <Tab title="Dashboard">
    1. Go to your pod's **Services** tab
    2. Click **Install** next to the service you want
    3. Wait for installation to complete (8–15 seconds)
    4. View credentials by clicking the service
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    instapods services add my-app -s mysql -w
    instapods services creds my-app -s mysql
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X POST https://app.instapods.com/api/pods/my-app/services \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"service_type": "mysql"}'
    ```
  </Tab>
</Tabs>

## Default Credentials

All services are configured with:

* **Host**: `localhost` (services run inside the pod)
* **Username**: `instapod`
* **Password**: Auto-generated (unique per installation)
* **Database**: `instapod` (MySQL and PostgreSQL only)

## How It Works

Services are installed using pre-downloaded packages for fast installation (\~8–15 seconds). The install process:

1. Creates a DB record with status `installing`
2. Installs the service package inside the container
3. Configures the service with secure defaults
4. Creates the `instapod` user and database
5. Updates status to `running`

Installation is asynchronous — the API returns immediately and you can poll the status or use `--wait` in the CLI.

## Removing a Service

<Tabs>
  <Tab title="Dashboard">
    Go to the pod's Services tab and click the delete button next to the service.
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    # With confirmation prompt
    instapods services remove my-app -s mysql

    # Skip confirmation
    instapods services remove my-app -s mysql -f
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X DELETE https://app.instapods.com/api/pods/my-app/services/mysql \
      -H "Authorization: Bearer YOUR_TOKEN"
    ```
  </Tab>
</Tabs>

<Warning>
  Removing a service deletes all its data (databases, users, configurations). This cannot be undone.
</Warning>
