Skip to content
Runbook

Install Memcached on Arch

High-performance, distributed in-memory cache for key-value data.

Cachecachein-memorykey-valuedistributed

Installation

Memcached (Arch repositories) · pacman
sudo pacman -S memcached

Verify the installation

Verify
memcached -V

Service

Start
sudo systemctl start memcached
Stop
sudo systemctl stop memcached
Status
sudo systemctl status memcached
Restart
sudo systemctl restart memcached
On boot
sudo systemctl enable memcached

Default ports

11211

Command-line tools

  • memcachedThe cache server daemon.

Uninstall

Uninstall
sudo systemctl stop memcached
sudo pacman -Rs memcached

Good to know

  • Arch's memcached service runs with default flags; override them with a systemd drop-in (sudo systemctl edit memcached) to set -m, -l, or -U 0.
  • Bind to 127.0.0.1 and disable UDP (-U 0) unless you specifically need remote or UDP access; Memcached has no authentication.
  • Test connectivity with: printf 'stats\r\nquit\r\n' | nc localhost 11211.

Installation on Arch Linux

sudo pacman -S memcached installs the server from the official repositories. Enable and start it with sudo systemctl enable --now memcached. Verify the binary with memcached -V.

Configuration

Arch's unit starts Memcached with default flags. To customize memory or the listen address, create a systemd drop-in with sudo systemctl edit memcached and override ExecStart to add flags such as -m 256 -l 127.0.0.1 -U 0, then sudo systemctl restart memcached.

Security

Memcached has no authentication and binds broadly on some setups. Keep it on 127.0.0.1 and disable UDP (-U 0) unless you explicitly need otherwise, to avoid being abused in amplification attacks.