Skip to main content

Introduction

Laravel Forge automatically installs both Memcached and Redis™ when provisioning App Servers or 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:
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 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: Connecting to Redis with TablePlus
I