# Dragonfly keeps asking for authentication

**URL:** <https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151>\
**Category:** Dragonfly Technical\
**Created:** [April 11, 2024, 4:11pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151 "2024-04-11T16:11:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![observant-newt](https://avatars.discourse-cdn.com/v4/letter/o/a87d85/32.png) [@observant-newt](https://dragonfly.discourse.group/u/observant-newt)\
**Post date:** [April 11, 2024, 4:11pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/1 "2024-04-11T16:11:42Z")

</div>

I’m trying to migrate from Redis to Dragonfly. Plan is on only using it for caching.

I never used any authentication for Redis, and that worked perfectly.  
But Dragonfly keeps asking for authentication.

---

<div class="post-metadata">

**Author:** ![observant-newt](https://avatars.discourse-cdn.com/v4/letter/o/a87d85/32.png) [@observant-newt](https://dragonfly.discourse.group/u/observant-newt)\
**Post date:** [April 11, 2024, 4:12pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/2 "2024-04-11T16:12:23Z")

</div>

```auto
redis-cli -s /run/dragonfly/dragonfly.sock
redis /run/dragonfly/dragonfly.sock> keys *
(error) NOAUTH Authentication required.

```

---

<div class="post-metadata">

**Author:** ![inclusive-numbat](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@inclusive-numbat](https://dragonfly.discourse.group/u/inclusive-numbat)\
**Post date:** [April 11, 2024, 4:13pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/3 "2024-04-11T16:13:05Z")

</div>

how did you run dragonfly?

---

<div class="post-metadata">

**Author:** ![inclusive-numbat](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@inclusive-numbat](https://dragonfly.discourse.group/u/inclusive-numbat)\
**Post date:** [April 11, 2024, 4:13pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/4 "2024-04-11T16:13:16Z")

</div>

what are the command arguments?

---

<div class="post-metadata">

**Author:** ![observant-newt](https://avatars.discourse-cdn.com/v4/letter/o/a87d85/32.png) [@observant-newt](https://dragonfly.discourse.group/u/observant-newt)\
**Post date:** [April 11, 2024, 4:14pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/5 "2024-04-11T16:14:25Z")

</div>

This is my flags file:

```auto
--pidfile=/run/dragonfly/dragonfly.pid
--log_dir=/var/www/travelsquare/dragonfly/logs/
--dir=/var/www/travelsquare/dragonfly/data/
--max_log_size=20
--unixsocket=/run/dragonfly/dragonfly.sock
--unixsocketperm=777
--cache_mode=true
--port=0
--maxmemory=4gb
--dbfilename=data

```

---

<div class="post-metadata">

**Author:** ![observant-newt](https://avatars.discourse-cdn.com/v4/letter/o/a87d85/32.png) [@observant-newt](https://dragonfly.discourse.group/u/observant-newt)\
**Post date:** [April 11, 2024, 4:16pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/6 "2024-04-11T16:16:15Z")

</div>

I’m using the binary release from Github. I tried v1.16.1 and v1.16.0, but on my server it keeps asking for authentication.

On my dev environment I installed dragonfly from the AUR, which is also v1.16.1 but built from source. I don’t have any authentication issues here 🤷

---

<div class="post-metadata">

**Author:** ![inclusive-numbat](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@inclusive-numbat](https://dragonfly.discourse.group/u/inclusive-numbat)\
**Post date:** [April 11, 2024, 11:26pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/7 "2024-04-11T23:26:00Z")

</div>

I can confirm that there is a bug with auth when `--port=0`

---

<div class="post-metadata">

**Author:** ![inclusive-numbat](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@inclusive-numbat](https://dragonfly.discourse.group/u/inclusive-numbat)\
**Post date:** [April 11, 2024, 11:48pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/8 "2024-04-11T23:48:59Z")

</div>

opened [https://github.com/dragonflydb/dragonfly/issues/2891](https://github.com/dragonflydb/dragonfly/issues/2891)

---

<div class="post-metadata">

**Author:** ![inclusive-numbat](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@inclusive-numbat](https://dragonfly.discourse.group/u/inclusive-numbat)\
**Post date:** [April 11, 2024, 11:49pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/9 "2024-04-11T23:49:08Z")

</div>

will be fixed in v1.17

---

<div class="post-metadata">

**Author:** ![observant-newt](https://avatars.discourse-cdn.com/v4/letter/o/a87d85/32.png) [@observant-newt](https://dragonfly.discourse.group/u/observant-newt)\
**Post date:** [April 12, 2024, 1:04pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/10 "2024-04-12T13:04:32Z")

</div>

Great, thanks! I’ll use a specific port for now then.

---

<div class="post-metadata">

**Author:** ![inclusive-numbat](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@inclusive-numbat](https://dragonfly.discourse.group/u/inclusive-numbat)\
**Post date:** [April 16, 2024, 2:44pm UTC](https://dragonfly.discourse.group/t/dragonfly-keeps-asking-for-authentication/151/11 "2024-04-16T14:44:05Z")

</div>

fixed in v1.17.0
