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

# Caches

> Learn how to connect to Redis™ and Memcached on your Laravel Forge server.

## Introduction

Laravel Forge automatically installs both [Memcached](https://www.memcached.org/) and [Redis™](https://redis.io/) when provisioning [App Servers](/servers/types#app-servers) or [Cache Servers](/servers/types#cache-servers). Both services are secured by default, remaining inaccessible from external networks and only available for local server connections.

## Connecting to Redis and Memcached

Both caching services are accessible via localhost using their standard ports:

```bash theme={null}
MEMCACHED_HOST=127.0.0.1
MEMCACHED_PORT=11211

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
```

## Managing cache services

Both Redis and Memcached run as system services and can be managed through standard service commands if needed. Laravel Forge handles the initial configuration and setup automatically, ensuring optimal performance for your applications.

### Configuring Redis password

To configure the Redis password, navigate to the server's settings page. Then, click "Recipes" in the sidebar. Click the "Set password" button under the Redis section. After entering and confirming your desired password, click the "Add password" button to apply the changes.

## Network connectivity

When connecting your applications to Redis or Memcached from another server within your infrastructure, you can utilize [Laravel Forge's server network feature](/resources/network#server-network) to establish secure internal connections between servers.

### External connections

Laravel Forge servers require SSH key authentication and don't support password-based access. When connecting to Redis through external clients, ensure you use your **private SSH key** for authentication.

For example, when connecting via [TablePlus](https://tableplus.com/):

<img src="https://mintcdn.com/forge-laravel/DhXK7kFkCTo-2V2J/images/redis-gui.png?fit=max&auto=format&n=DhXK7kFkCTo-2V2J&q=85&s=d6396671f62cabe59cedeed62491809b" alt="Connecting to Redis with TablePlus" height="727" width="612" data-path="images/redis-gui.png" />
