Skip to content
Cnone-Tech Documentation

Redis

Cnone-Tech DocsVeldriq

Veldriq

Redis is an in-memory scratchpad next to MySQL — not a second place to store customers. Veldriq 1.0.0 does not require it. Most buyers should leave it alone and go live on the database drivers.

It is not Docker. It is not included in backend/docker-compose.yml (that file is MySQL + phpMyAdmin only). Horizon is not required. Turning Redis on does not replace cron or queue:work.

Stay there for V1 go-live. The production template comments Redis out on purpose:

  • SESSION_DRIVER=database
  • CACHE_STORE=database
  • QUEUE_CONNECTION=database

Those values are enough for a correct V1 install, including Field PWA and PDF generation (with a worker).

.env.production.example comments REDIS_CLIENT, REDIS_HOST, REDIS_PASSWORD, and REDIS_PORT. The local .env.example lists Redis values for developers; do not copy them onto the internet without a real server and a password.

Only after Redis is installed and you can reach it from the same machine that runs PHP.

Pattern Typical host How you connect
TCP Redis VPS you control REDIS_HOST is an IP or hostname (often 127.0.0.1), REDIS_PORT usually 6379
Unix socket Redis Sometimes on shared hosting REDIS_HOST is the socket path the provider gives you, and REDIS_PORT=0
  1. Install and secure Redis. Bind TCP Redis to localhost unless you know how to firewall it. Do not publish port 6379 on the public internet.
  2. Uncomment connection settings in .env. The PHP redis extension must be installed if you choose phpredis.
  3. Point only the stores you intend (CACHE_STORE=redis and/or QUEUE_CONNECTION=redis and/or SESSION_DRIVER=redis). You can move cache first and leave the queue on database.
  4. From backend/: php artisan config:clear then php artisan config:cache. If a queue worker is already running, also php artisan queue:restart.

TCP example (placeholders only):

Terminal window
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=<password if required>
REDIS_PORT=6379
REDIS_DB=0
REDIS_CACHE_DB=1

Unix socket: REDIS_PORT=0 and REDIS_HOST = the path your host documents. Wrong socket paths (author laptop paths) will fail.

See Troubleshooting Redis. If Redis vanishes, cache can be rebuilt, but a Redis-backed queue can lose in-flight jobs. Redis does not replace backups.