Skip to main content
This example starts Redis 7 with password authentication, a persistent named volume, and a localhost-only forwarded port.

Run Redis

1

Start Redis

Set a temporary password in the host shell:
Start Redis:
2

Verify reads and writes

Write a test value:
Read it back:
Finally, check that the server responds:
The three commands should return OK, ready, and PONG. Host applications connect to 127.0.0.1:56379.
--requirepass places the demo password in the guest process arguments. For production, use an ACL file delivered through the secrets workflow and do not expose the forwarded port beyond loopback.
3

Clean up or keep the data

Remove the sandbox while retaining the append-only database:
Delete all persisted Redis data:
Clear the password from the host shell: