ncmpcpp setup with mpd per user installation - Arch/Artix Linux

Firstly, install mpd and ncmpcpp:

pacman -S mpd ncmpcpp

Then, setup the mpd config for your user:

mkdir -p ~/.config/mpd
cp /usr/share/example/mpdconf.example ~/.config/mpd/mpd.conf
echo "pid_file \"~/.config/mpd/pid\"" >> ~/.config/mpd/mpd.conf

Now, add this to your .bashrc or .profile

[ ! -s ~/.config/mpd/pid ] && mpd

If your music is in a different directory than ~/Music, change the line in mpd.conf. Source .bashrc and then run

mpc update

Now you can use ncmpcpp.

Note: If you're on Artix, you'll need to install mpc manually by compiling it:

  mkdir -p ~/app
  cd ~/app
  wget https://www.musicpd.org/download/mpc/0/mpc-0.35.tar.xz
  tar xvf mpc-0.35.tar.xz && cd mpc-0.35
  meson build
  cd build
  ninja
  sudo ninja install