# How to connect my internal apps to my self-hosted Redis app

**URL:** <https://community.fly.io/t/how-to-connect-my-internal-apps-to-my-self-hosted-redis-app/25429>\
**Category:** General\
**Tags:** redis, login-only\
**Created:** [July 17, 2025, 7:06pm UTC](https://community.fly.io/t/how-to-connect-my-internal-apps-to-my-self-hosted-redis-app/25429 "2025-07-17T19:06:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankiflow](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/ankiflow/32/42045_2.png) [@Ankiflow](https://community.fly.io/u/Ankiflow)\
**Post date:** [July 17, 2025, 7:06pm UTC](https://community.fly.io/t/how-to-connect-my-internal-apps-to-my-self-hosted-redis-app/25429/1 "2025-07-17T19:06:46Z")

</div>

I am getting completely crazy. It has been 1 week since I try to connect my django app and my celery app to my redis app internally.

I have this error:  
ERROR/MainProcess] consumer: Cannot connect to redis://ankiflow-redis.internal:6379/0: Error 111 connecting to ankiflow-redis.internal:6379. Connection refused..

Here is my fly.toml:  
app = “ankiflow-redis”  
primary\_region = “cdg”

[build]  
image = “redis:7”

[mounts]  
source = “redis\_data”  
destination = “/data”

[env]  
REDIS\_APPENDONLY = “yes”  
REDIS\_DIR = “/data”

[processes]  
app = “redis-server --appendonly yes --dir /data --protected-mode no --bind 0.0.0.0”

[[vm]]  
memory = “256mb”  
cpu\_kind = “shared”  
cpus = 1

[[services]]  
internal\_port = 6379  
protocol = “tcp”  
processes = [“app”]

[services.concurrency]  
type = “connections”  
hard\_limit = 1000  
soft\_limit = 800

[scale]  
min\_machines = 1  
max\_machines = 1

[experimental]  
private\_network = true  
autostop = false  
allowed\_public\_ports =   
auto\_rollback = true

[deploy]  
strategy = “rolling”

I really do not understand. The name of my app is ankiflow-redis this is why I try to connect to the host : ankiflow-redis.internal.  
It could be a problem of ip adress.

You are my last hope I am deeply sad about the situation I am completely blocked.

---

<div class="post-metadata">

**Author:** ![mayailurus](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/mayailurus/32/17593_2.png) [@mayailurus](https://community.fly.io/u/mayailurus)\
**Post date:** [July 17, 2025, 7:34pm UTC](https://community.fly.io/t/how-to-connect-my-internal-apps-to-my-self-hosted-redis-app/25429/2 "2025-07-17T19:34:27Z")

</div>

> [@Ankiflow](#):
>
> ```TOML
> [processes]
> app = "redis-server --appendonly yes --dir /data --protected-mode no --bind 0.0.0.0"
> 
> ```

Hi, @Ankiflow… Sorry to hear you’re having trouble, 🩹. The bind setting [should really be `[::]`](https://fly.io/docs/networking/app-services/#get-the-service-listening-on-the-right-address-within-the-vm-2) to allow things to be reached via the `.internal` address. Packets go straight from Machine → Machine in this case, everything over IPv6 wires. (With `.flycast` and `.fly.dev` it [is a little different,](https://fly.io/docs/networking/app-services/#tl-dr) due to the Fly Proxy sitting in the middle.)

Hope this helps!

* * *

Aside: I would also suggest removing the `[[services]]`, `[scale]`, and `[experimental]` sections; those don’t play a role in `.internal` traffic—and what you have there at present is not really valid…

---

<div class="post-metadata">

**Author:** ![Ankiflow](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/ankiflow/32/42045_2.png) [@Ankiflow](https://community.fly.io/u/Ankiflow)\
**Post date:** [July 17, 2025, 8:28pm UTC](https://community.fly.io/t/how-to-connect-my-internal-apps-to-my-self-hosted-redis-app/25429/5 "2025-07-17T20:28:24Z")

</div>

Thank you very much for your answer,

[processes]  
app = “redis-server --bind :: --appendonly yes --dir /data --protected-mode no”

it finally worked using this command up here.

---

<div class="post-metadata">

**Author:** ![halfer](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@halfer](https://community.fly.io/u/halfer)\
**Post date:** [July 17, 2025, 8:43pm UTC](https://community.fly.io/t/how-to-connect-my-internal-apps-to-my-self-hosted-redis-app/25429/6 "2025-07-17T20:43:03Z")

</div>

I am pleased you’ve gotten an answer @Ankiflow.

When posting here, please consider using Markdown. There’s a number of formatting systems in this platform that make posts rather easier to read. In particular, code formatting, which looks like this:

```auto
[processes]
app = "redis-server --bind :: --appendonly yes --dir /data --protected-mode no"

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [July 24, 2025, 8:43pm UTC](https://community.fly.io/t/how-to-connect-my-internal-apps-to-my-self-hosted-redis-app/25429/7 "2025-07-24T20:43:57Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
