Redis
Redis is a fast in-memory key-value store — good for caches, sessions, counters and simple queues. On this platform it is shared: you get a user with its own password and your own slice of the key space, not a whole server.
1. Create a user
- Go to Services and click Manage on Redis.
- Click Add User (or Create User if you have none yet).
- Fill in Username, Password and Confirm Password, then confirm.
| Field | Rules |
|---|---|
| Username | 5–16 characters: letters, digits and underscores. Not only digits, and not a reserved name. |
| Password | At least 8 characters. Single quotes (') are not allowed. |
There are no databases to create. A Redis user is credentials only, which is why the Redis page has just the Dashboard tab.
2. Use your own key prefix
Your user can only read and write keys that start with your service username followed by an underscore. Name every key that way:
alice_dev_session:42
alice_dev_cache:homepage
A key without your prefix is refused with a permissions error. Administrative and dangerous commands are also blocked, since the server is shared.
3. Connect from your lab
Copy the Hostname and Port from Connection Information on the Dashboard tab, then:
sudo apt-get install -y redis-tools
redis-cli -h <host> -p <port> --user <user> --pass <password>
> SET <user>_greeting "hello"
OK
> GET <user>_greeting
"hello"
From code, most clients accept a URL:
redis://<user>:<password>@<host>:<port>
Always pass both the user name and the password. Password-only authentication logs in as a different, default user and your keys will be refused.
If your platform offers Redis outside the labs, the service page shows a Public endpoint (and possibly Public TLS) row. The same user and password work there. See public endpoints.
If it does not work
| Symptom | Check |
|---|---|
| WRONGPASS or invalid username-password pair | You passed both --user and --pass, copied from the user's card |
| NOPERM / No permissions to access a key | The key starts with <user>_ |
| NOPERM on a command | That command is blocked on the shared server |