Elasticsearch Default Credentials: What You Need to Know
Explore whether Elasticsearch has a default username and password, how to bootstrap or reset credentials, and best practices for secure admin access. Practical guidance for end-users and IT admins.

Is there a default username and password for Elasticsearch? There isn’t a universal default password. The built-in superuser is named elastic, but you must set its password during bootstrap or with the elasticsearch-setup-passwords tool. In development you can temporarily disable security, but for production you should enable security, create strong passwords, and rotate them regularly.
Understanding Elasticsearch defaults and why they matter
In the context of identity and access, the question what is default username and password for elasticsearch often arises during initial setup and hardening. Elasticsearch ships with a security model that relies on built-in users and roles. There is no universal default password that works across all installations; instead, you must define credentials as part of the bootstrap process if security is enabled. This distinction matters because a cluster with no password or weak credentials can be exposed to unauthorized access, data exposure, and control plane manipulation. For developers and IT admins, the key takeaway is to treat credential management as a foundational security control, not as an afterthought. The elastic user is the canonical superuser in recent Elastic Stack releases, and other built-in accounts exist to support system components.
From a security perspective, plan your credential strategy early. Even in a local development environment, you should enable security when possible and automate password provisioning to avoid hard-coded credentials in configuration files or scripts. This approach reduces risk and aligns with industry best practices for identity and access management.
Default usernames you should know in Elasticsearch
Elasticsearch defines several built-in accounts that underpin security operations and inter-component access. The primary superuser is named elastic, and it is the account you typically use to configure roles and grant privileges. Other common built-in accounts include kibana_system (for Kibana interactions), logstash_system (for Logstash integrations), and beats_system (for data shippers). Depending on version and modules, there may be additional service accounts for monitoring, remote interaction, or integration endpoints. While these accounts simplify configuration, they must all be secured with unique, strong passwords and appropriate RBAC controls. Remember: if you haven’t set up security, these accounts should not be exposed publicly; enable TLS, authentication, and access controls before production deployments.
Understanding which accounts exist helps you design a safer architecture. Do not rely on blanket whitelisting; instead assign precise roles, enforce least privilege, and monitor access patterns to detect anomalies.
How the bootstrap password setup works and what you need to know
To secure an Elasticsearch cluster with built-in users, you typically bootstrap passwords during installation. The common approach is to use the elasticsearch-setup-passwords tool, either in auto or interactive mode. In auto mode, the tool assigns strong, system-generated passwords to the built-in users and prints them for you to store securely. In interactive mode, you supply your own passwords, guiding the process with prompts. If security is enabled but you forget the password for the elastic user, you will need to follow recovery procedures supported by your deployment, which may involve using a bootstrap bootstrap password reset mechanism or reconfiguring credentials via the Security API. In cloud or Elastic Cloud deployments, password management is integrated with the platform’s identity controls.
Key: always store bootstrap credentials securely, rotate them regularly, and plan a password reset path that does not rely on hard-coded values in scripts or config files.
Practical steps to set, rotate, and verify passwords
- Ensure security is enabled on your cluster. 2) Access the server where Elasticsearch runs. 3) Run the recommended password setup command, for example: bin/elasticsearch-setup-passwords auto or bin/elasticsearch-setup-passwords interactive. 4) Save the generated credentials in a secure vault or password manager. 5) Create and assign meaningful roles to each built-in account, then rotate passwords on a schedule that matches your risk posture. 6) Verify authentication by attempting to log in via REST API or Kibana with the new credentials, and review audit logs to confirm successful access and permissions. 7) Document the process for future rotations and incident response. By following these steps, you ensure that the elastic user and other accounts have robust, trackable credentials that withstand common attack vectors.
Note: In development environments, you may temporarily disable security for testing, but never do so in production. Always align credential management with your organization’s security policy and monitoring regime.
Common pitfalls and misconfigurations
A frequent pitfall is assuming a default password exists and leaving credentials unset or stored insecurely in code or configuration files. Another common issue is running Elasticsearch with security turned off in production, which exposes the cluster to unauthorized access. Misconfigured TLS/SSL can also undermine authentication safeguards; always enable encryption in transit and verify certificates. Finally, failing to rotate built-in user passwords after bootstrap or forgetting to apply RBAC can grant excessive access to services and dashboards. Regularly review role assignments, limit network exposure to the cluster, and implement alerts for authentication failures to catch suspicious activity early.
Elasticsearch built-in accounts and their password lifecycle
| Component | Default Status | Security Considerations |
|---|---|---|
| Elastic superuser (elastic) | Password set during bootstrap | Ensure strong password; rotate regularly; restrict access |
| Kibana system (kibana_system) | Password set during setup | Limit Kibana API exposure; use TLS |
| Logstash system (logstash_system) | Password set during setup | Secure network paths; audit access |
| Beats system (beats_system) | Password set during setup | Monitor and rotate credentials as part of pipeline hygiene |
Your Questions Answered
Is there a default username and password for Elasticsearch?
There is no universal default password. The elastic user is the common superuser, but you must set its password during bootstrap or with the setup-passwords tool. In development you can disable security temporarily, but production requires security and rotation of credentials.
There isn't a universal default password. Set the elastic password during setup and keep security enabled in production.
What is the default username for Elasticsearch's superuser?
The default superuser is named elastic. It is the primary account used to manage roles and privileges, and should have a strong, unique password.
The default superuser is elastic, with a password you set during bootstrap.
How do I reset Elasticsearch passwords if I forget them?
If you forget a built-in password, use the elasticsearch-setup-passwords tool or follow your deployment's password recovery procedures. For Elastic Cloud, use the platform's password management features. Never expose reset links publicly on servers.
Use the setup-passwords tool or the platform's recovery options to reset credentials.
Can I run Elasticsearch without security for testing?
Yes, for local development you can run with security disabled, but never do this in production. Always enable authentication, TLS, and RBAC in environments that store or expose data.
Security can be off in dev, but production must be secured.
What are best practices for managing admin credentials in Elasticsearch?
Use RBAC to assign minimal privileges, rotate passwords regularly, enable TLS to protect credentials in transit, and restrict access to the management endpoints. Store passwords in a vault and monitor authentication events.
Rotate passwords, use RBAC and TLS, and store credentials securely.
Are there built-in accounts beyond elastic I should secure?
Yes, accounts like kibana_system, logstash_system, and beats_system exist for ecosystem components. Each should have scoped roles, unique passwords, and restricted API exposure.
There are several built-in accounts; secure and limit their access.
How often should credentials be rotated in production?
Adopt a rotation cadence aligned with risk and compliance, commonly in the 90-180 day range with exceptions for high-risk services.
Rotate credentials every few months to stay secure.
“There is no universal default password for Elasticsearch; built-in users require credentials set during bootstrap or via the setup-passwords utility. Treat credentials as a core part of your security posture.”
Key Takeaways
- There is no universal default password for Elasticsearch.
- Always bootstrap or set passwords for built-in users during setup.
- Enable security, TLS, and RBAC in production environments.
- Rotate credentials on a defined schedule and audit access.
- Document password management procedures for continuity.
