What port does Redis use?
Redis uses port 6379 over TCP.
| Port | Protocol | Name | What it is for |
|---|---|---|---|
| 6379 | TCP | Redis | The default Redis port. |
Exposing it
Redis historically had no authentication and binds to all interfaces if misconfigured. Exposed instances are routinely used to plant SSH keys and cryptominers. Bind to localhost and set a password.
Checking it is listening
sudo lsof -i :6379 # macOS, Linux
netstat -ano | findstr :6379 # Windows
nc -zv host 6379 # from elsewhere
An "address already in use" error on a port nothing appears to be holding usually means the socket is in TIME_WAIT rather than that a process has it — the ports reference covers that and the ephemeral range.
Frequently asked questions
What port does Redis use?
Redis uses port 6379 over TCP. The default Redis port.
Is port 6379 safe to expose to the internet?
Redis historically had no authentication and binds to all interfaces if misconfigured. Exposed instances are routinely used to plant SSH keys and cryptominers. Bind to localhost and set a password.
How do I check whether Redis is listening?
sudo lsof -i :6379 on macOS or Linux, netstat -ano | findstr :6379 on Windows. From another machine, nc -zv host 6379 says whether anything answers.
Other services
- What port does Memcached use?
- What port does Elasticsearch use?
- What port does DNS use?
- What port does NTP use?
- What port does SMB use?
- What port does NFS use?
- What port does SNMP use?
- What port does Syslog use?
- What port does RabbitMQ use?
- What port does Prometheus use?
- What port does SMTP use?
- What port does IMAP use?