localhost:11211: Memcached connection fixes
Port 11211 is Memcached’s default. Start it, test it with stats and fix connection refused errors.
Not a web pagePort 11211 belongs to Memcached. Use your app or the nc command, not a browser.
localhost:11211 is where Memcached listens. It speaks its own protocol, so a browser shows nothing useful.
What runs on localhost:11211
- Memcached cache servers (default port 11211)
- Used by PHP, Python and Ruby apps
- Not a web page
Commands to start and test port 11211
memcached -p 11211 -m 64 -l 127.0.0.1printf "stats\r\n" | nc localhost 11211docker run -p 11211:11211 memcachedFind what is using port 11211
Run these in a terminal on your computer. Nothing is sent to this site.
If localhost:11211 will not open
- Connection refused
- Memcached is not running. Start the service or the container.
- Do not expose it
- Bind it to 127.0.0.1. An open Memcached server can be abused from the internet.
- Port 11211 is in use
- Another instance is running. Find it with the tool below.
Other ports like 11211
| Port | Usually used by |
|---|---|
| localhost:3306 | MySQL, MariaDB |
| localhost:5432 | PostgreSQL |
| localhost:27017 | MongoDB |
| localhost:6379 | Redis |
| localhost:1433 | Microsoft SQL Server |
| localhost:5984 | CouchDB |
| localhost:8983 | Apache Solr |
Questions about localhost:11211
- What is port 11211?
- The default port of Memcached.
- Is it safe to open 11211 to the internet?
- No. Keep it on localhost or inside a private network.
- Is localhost:11211 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.
- Can I use a different port instead of 11211?
- Yes. Pick a free port above 1024, set it in the program, and open that number instead. If other programs connect to this port, change it there as well.
- How do I check what is using port 11211?
- Use the port checker on this page. It shows the command for Windows, macOS and Linux and does not send anything to this site.
Free tools that help
- Common ports listSearch a list of common TCP and UDP port numbers: SSH 22, HTTP 80, HTTPS 443, MySQL 3306, PostgreSQL 5432 and more, with dev server ports.