AlmaLinux 10 | Production-Ready | Auto-Tuning
Complete AMI guide for your Valkey 8.1 in-memory data store. Valkey is a high-performance, Redis-compatible key-value store backed by the Linux Foundation.
Follow these steps to access your Valkey instance and start using it.
Connect to your EC2 instance using SSH with your key pair.
ssh -i your-key.pem ec2-user@<your-instance-ip>
View the auto-generated Valkey password.
sudo cat /var/lib/valkey/credentials.txt
Use the Valkey CLI to connect locally.
valkey-cli -a <password>
Verify Valkey is working with a simple PING command.
# Inside valkey-cli:
PING
# Response: PONG
SET mykey "Hello Valkey"
GET mykey
All credentials are automatically generated on first boot and stored securely.
sudo cat /var/lib/valkey/credentials.txt
redis://<password>@<your-instance-ip>:6379
After saving your password, delete the credentials file for security: sudo rm /var/lib/valkey/credentials.txt
Common commands for managing your Valkey instance.
Control the Valkey service using systemctl.
# Check status
sudo systemctl status valkey
# Restart service
sudo systemctl restart valkey
# View logs
sudo journalctl -u valkey -f
Edit the Valkey configuration file.
sudo nano /etc/valkey/valkey.conf
# After changes, restart:
sudo systemctl restart valkey
View memory statistics and configuration.
# Inside valkey-cli:
INFO memory
CONFIG GET maxmemory
Connect from another machine.
valkey-cli -h <instance-ip> -a <password>
# Or use redis-cli (compatible)
redis-cli -h <instance-ip> -a <password>
Follow these recommendations to secure your Valkey instance.
Restrict port 6379 to only trusted IPs. Never expose Valkey to the public internet without proper security.
The auto-generated password is secure. If you change it, use a strong, unique password.
After saving your password securely, delete /var/lib/valkey/credentials.txt
Our team is here to assist you with any questions about your Valkey deployment.
info@flowopsconsulting.co.uk