---
title: "Connect to a Managed Redis Instance over TLS with Stunnel and redis-cli"
url: https://daily.dev/posts/connect-to-a-managed-redis-instance-over-tls-with-stunnel-and-redis-cli-xsedj7sxl
source_url: https://www.digitalocean.com/community/tutorials/how-to-connect-to-managed-redis-over-tls-with-stunnel-and-redis-cli
type: article
source: "DigitalOcean Community"
published: 2026-06-04T18:47:57.407Z
updated: 2026-06-04T18:48:24.410Z
tags: ["redis"]
reading_time: 20
upvotes: 0
comments: 0
language: en
---

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

# Connect to a Managed Redis Instance over TLS with Stunnel and redis-cli

**[DigitalOcean Community](https://daily.dev/sources/do_community)** · 20 min read · 0 upvotes · 0 comments

## Summary

A practical guide to connecting to a managed Redis instance over TLS on Ubuntu 24.04. Covers three approaches: native redis-cli TLS using the --tls flag (recommended for Redis 6+), stunnel as a local plaintext-to-TLS proxy for older clients, and SSH port forwarding as an alternative. Includes step-by-step stunnel configuration with privilege dropping, CA certificate verification, and a troubleshooting section covering common errors like connection refused, authentication failures, stunnel exiting immediately, and DNS resolution issues.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.digitalocean.com/community/tutorials/how-to-connect-to-managed-redis-over-tls-with-stunnel-and-redis-cli>

## Similar posts on daily.dev

- [How To Install and Secure Redis on Ubuntu](https://daily.dev/posts/how-to-install-and-secure-redis-on-ubuntu-cdmcotoeq) · DigitalOcean Community · 4 upvotes · 0 comments
- [How To Install and Secure Redis on Ubuntu](https://daily.dev/posts/how-to-install-and-secure-redis-on-ubuntu-skhiwrww3) · DigitalOcean Community · 1 upvotes · 0 comments
- [How To Install and Secure Redis on Ubuntu](https://daily.dev/posts/how-to-install-and-secure-redis-on-ubuntu-syfjke74v) · DigitalOcean Community · 0 upvotes · 0 comments

---

Tags: [#redis](https://daily.dev/tags/redis)

[View this post on daily.dev](https://daily.dev/posts/connect-to-a-managed-redis-instance-over-tls-with-stunnel-and-redis-cli-xsedj7sxl)
