Skip to main content
Betadocs
DocsStatusSupportPricing
  • Introduction
    • Introduction to Webgune
    • How Webgune works
    • Creating an account
    • Creating your first project
    • Exploring the dashboard
  • Deployment

    • Deploying from GitHub
    • Deploying a Docker image
    • How builds work
    • Deployments and rollback
    • Environment variables
    • Custom start command
    • Health check
    • Database migrations

    Web apps

    • Web applications
      • Supported frameworks
      • Next.js
      • React / Vite
      • Node.js
      • Python
      • PHP
      • Go

    Bots & workers

    • Discord bots
    • Workers

    Docker

    • Docker
      • Writing a Dockerfile
      • Public Docker images

    Databases

    • Databases
      • PostgreSQL
      • MySQL
      • MariaDB
      • MongoDB
      • Redis

    Observability

    • Logs and monitoring
    • Web terminal

    Scaling

    • Availability and scaling
    • Persistent volumes
    • Backups and restore
    • Sleep mode

    Platform

    • One microVM per service
    • Network and isolation
    • Platform security
    • Deploying a template
      • Template catalog
    • Free subdomains
    • Custom domains
    • Buying a domain
    • Hosting DNS for a domain bought elsewhere
    • Managing your DNS records
    • SSL certificates
    • Redirects
    • Shared projects
      • Roles and permissions
    • Real-time collaboration
    • Continuous deployment
      • The kx712.yml file
    • VS Code extension
    • Plans and pricing
    • Payments and invoices
    • Account or per-project subscription
    • API reference
    • API keys
    • Webgune CLI
    • MCP server
    • JavaScript / TypeScript SDK
    • Support tickets
    • Status page
    • AI assistant
    • FAQ
    • Limits and resources
    • Account security
    • Best practices
    • Troubleshooting

Services / Databases

Redis

Open as Markdown

Redis keeps its data in memory. It serves as a cache, session storage, a job queue and a pub/sub channel. On Webgune, Redis 7 exists only as a project database, a service in your project with its volume.

Value
VersionRedis 7
Port6379
Authenticationpassword only (requirepass), no username
Persistencewrite-ahead log turned on (appendonly yes), plus a snapshot every 60 seconds if there was at least one write
Storage5 GB volume
Resourcesat most 1 vCPU and 1 GB of memory, taken from your plan
Instancesone only, no sleep mode

Create a Redis instance

  1. In the project, New service, then Deploy Redis.
  2. Fill in a name. The Password is generated if the field is left empty (at least 8 characters otherwise).
  3. Click Create.

The service's Database tab shows the internal host, the port, the masked password and the connection string.

Connection string

REDIS_URL=redis://:MOT_DE_PASSE@cache.kx-app-1a2b3c4d.svc.cluster.local:6379

The colon before the password is required: the username is empty. The internal address answers only the services of the same project (Network and isolation).

ioredis (Node.js)

import Redis from "ioredis";

const redis = new Redis(process.env.REDIS_URL!);

await redis.set("session:abc", JSON.stringify({ userId: 42 }), "EX", 3600);
const session = await redis.get("session:abc");

redis-py (Python)

import os, redis

r = redis.Redis.from_url(os.environ["REDIS_URL"], decode_responses=True)
r.set("compteur", 0)
r.incr("compteur")

Application cache

async function getUser(id: string) {
  const cached = await redis.get(`user:${id}`);
  if (cached) return JSON.parse(cached);

  const user = await db.user.findUnique({ where: { id } });
  await redis.set(`user:${id}`, JSON.stringify(user), "EX", 300);
  return user;
}

Give every cache key a time to live (EX). Webgune sets no eviction policy on Redis: without a time to live, the cache grows to the 1 GB limit, then the instance is stopped and restarted.

Job queue

A Redis list with LPUSH and BRPOP hands each job to a single consumer, and the job stays in the list until someone takes it:

// producer (web service)
await redis.lpush("jobs:emails", JSON.stringify({ to, subject }));

// consumer (worker)
const job = await redis.brpop("jobs:emails", 5);

The full example, with graceful shutdown, is on Workers. BullMQ relies on the same Redis instance and adds retries and delayed jobs.

Pub/sub

// publisher
await redis.publish("evenements", JSON.stringify({ type: "commande", id }));

// subscriber: a dedicated connection, used for nothing else
const sub = new Redis(process.env.REDIS_URL!);
await sub.subscribe("evenements");
sub.on("message", (_canal, payload) => handle(JSON.parse(payload)));

A message published when no subscriber is listening is lost. For jobs that must be processed, use a list, not pub/sub.

What survives a restart

EventData
Restart, update, server failurekept: the write-ahead log is on the volume
Hard stopat most the last second of writes may be missing
Service deletionlost along with the volume

Redis remains in-memory storage limited to 1 GB. Data you cannot recreate elsewhere must not live there alone: a session can be regenerated, an account balance cannot.

Access from your machine

Turn on Public access in the Database tab, then:

redis-cli -h HOTE_PUBLIC -p PORT_PUBLIC -a MOT_DE_PASSE

The public port is open to the whole Internet, with no address list and no TLS: only the password protects the instance. Turn the access off after the intervention.

Commands from the panel

The console in the Database tab runs the command with redis-cli and stops it after 30 seconds. It suggests INFO server by default. The command is split on spaces: a value that contains spaces does not go through the console.

INFO memory
DBSIZE
SCAN 0 MATCH session:* COUNT 100
TTL session:abc

Avoid KEYS * on a busy instance: the command blocks Redis while it walks through all the keys.

Common errors

MessageCauseWhat to do
NOAUTH Authentication requiredpassword missing from the URLuse redis://:MOT_DE_PASSE@...
WRONGPASS invalid username-password pairusername added, or wrong passwordleave the username empty
ECONNREFUSED or ENOTFOUNDinternal address used outside the project, or instance startingcheck the project, read the Logs tab
Stop with code 137memory exceeds 1 GBadd times to live, reduce the data stored

Updated on November 20, 2026

MongoDBPreviousLogs and monitoringNext

On this page

Create a Redis instanceConnection stringioredis (Node.js)redis-py (Python)Application cacheJob queuePub/subWhat survives a restartAccess from your machineCommands from the panelCommon errors
© 2026 WebguneBack to the site