Linux System User Elasticsearch

I’m pretty sure I installed v9.0.2 from a tarball on an ubuntu fork, so I didn’t automatically get a no-login user created to run a systemd unit. Are there any elasticsearch specific things I need to know about creating a no-login user to run elasticsearch as? Just created a systemd unit for elasticsearch.

If you use ES from tarball no Linux user will be created. Only installation packages create Linux users.

In the service mode - systemd, user(manually create) which starts ES, must have permissions to:

  • create/modify files where are data and logs.
    path.data: /path/data
    path.logs: /path/log/
  • read certificates for network and https communication
  • create/modify files where is repository for snapshot/backup:
    path.repo: /path2/backups

The production environment needs additional configuration. In general to start ES it's enough to extract, set elasticsearch.yml and run it.

You can also just look at the pre and post install steps that a RPM/deb installation does. e.g. under ubuntu

$ apt install elasticsearch --download-only
$ mkdir /tmp/test
$ cd /tmp/test
$ dpkg-deb -e  /var/cache/apt/archives/elasticsearch_9.2.3_amd64.deb
$ find . -type f
./DEBIAN/postrm
./DEBIAN/prerm
./DEBIAN/md5sums
./DEBIAN/conffiles
./DEBIAN/preinst
./DEBIAN/postinst
./DEBIAN/control