localhost:6379: Redis connection fixes
Port 6379 is Redis’s default port. Check it with redis-cli ping and fix connection refused, NOAUTH and protected mode errors.
Not a web pagePort 6379 belongs to Redis. Use redis-cli or your app, not a browser.
localhost:6379 is where Redis listens by default. A reply of PONG to the ping command means it is working.
What runs on localhost:6379
- Redis servers (default port 6379)
- Docker containers started with
-p 6379:6379 - Used for caches, queues and sessions
Commands to start and test port 6379
redis-cli -h 127.0.0.1 -p 6379 pingsudo systemctl start redisredis-serverdocker run -p 6379:6379 redis:7Find what is using port 6379
Run these in a terminal on your computer. Nothing is sent to this site.
If localhost:6379 will not open
- Redis is reachable from the network without a password
- Redis’s security docs: since 3.2.0, Redis runs in protected mode when it uses the default configuration without a password, and then answers only loopback clients. Passwords can be set with ACLs (Redis 6 and newer, recommended) or
requirepass. Redis warns that an exposed port lets an attacker runFLUSHALLand delete all data, so firewall it. - Could not connect to Redis: Connection refused
- Redis is not running. Start it, then run ping again.
- NOAUTH Authentication required
- The server has a password. Use
redis-cli -a yourpasswordor set it in your app’s connection string. - DENIED Redis is running in protected mode
- Redis refuses outside connections without a password. Keep it on localhost, or set a password and bind carefully.
- Windows
- Redis has no official Windows build. Use WSL or Docker.
Other ports like 6379
| Port | Usually used by |
|---|---|
| localhost:3306 | MySQL, MariaDB |
| localhost:5432 | PostgreSQL |
| localhost:27017 | MongoDB |
| localhost:11211 | Memcached |
| localhost:1433 | Microsoft SQL Server |
| localhost:5984 | CouchDB |
| localhost:8983 | Apache Solr |
Questions about localhost:6379
- What does PONG mean?
- Redis is running and answered your ping.
- Is it safe to expose port 6379?
- No. Keep Redis private. An open Redis server without a password can be abused.
- Is localhost:6379 safe?
- Yes while it listens only on 127.0.0.1. If you open this port to a network, use a strong password, allow only trusted addresses in the firewall, and encrypt the connection. Do not expose a database port to the internet.