[{"data":1,"prerenderedAt":120},["ShallowReactive",2],{"seo-verification":3,"blog-heberger-redis-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"title":9,"excerpt":10,"readTime":11,"views":12,"isPinned":13,"publishedAt":14,"category":15,"categories":21,"featuredImage":23,"bgImage":24,"posterImage":25,"relatedSolution":26,"intro":28,"sections":29,"ctaTitle":75,"ctaBody":76,"ctaButton":77,"ctaUrl":78,"relatedPosts":79},58,"heberger-redis-vps","Hosting Redis on a VPS","Deploy Redis on your Cloud VPS: ultra-fast cache, sessions, and queues, with persistence, security, and memory tuning.",7,546,false,"2026-04-23T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},6,"Databases","bases-de-donnees","bg-teal-500\u002F10 text-teal-400","database",[22],{"id":16,"name":17,"slug":18,"color":19,"icon":20},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-redis-vps-poster.svg",{"categorySlug":18,"appSlug":27},"redis","Redis is the Swiss Army knife of performance: cache, sessions, job queues, real-time counters, and pub\u002Fsub. Self-hosting it on a VPS gives you sub-millisecond latency and full control over memory, without paying the premium of managed Redis offerings.",[30,34,44,47,69,72],{"type":31,"title":32,"body":33},"h2","Why self-host Redis on a VPS","Redis lives in memory: its performance depends directly on RAM and network latency. Managed offerings charge a high price for each GB of RAM and impose connection caps. On a VPS, you size the RAM according to your real needs, you freely configure `maxmemory` and the eviction policy (`allkeys-lru`, `volatile-ttl`...), and you enable RDB and\u002For AOF persistence depending on your tolerance for data loss. For an application cache, a job broker (Sidekiq, BullMQ, Celery), or a session store, a Redis placed right next to your application on the same private network eliminates inter-datacenter latency and drastically reduces cost.",{"type":35,"title":36,"items":37},"ul","The concrete benefits of a self-hosted Redis",[38,39,40,41,42,43],"Sub-millisecond latency if Redis runs on the same VPS or the same private network as your app.","Control of `maxmemory` and the eviction policy according to your cache or job-queue use case.","Persistence of your choice: RDB (snapshots), AOF (journal), or both for durability.","RAM cost without overcharging: you pay the VPS plan, not premium memory by the GB.","Free modules: RediSearch, RedisJSON, RedisBloom as needed.","No arbitrary cap on the number of simultaneous client connections.",{"type":31,"title":45,"body":46},"Hardware and software prerequisites","Since Redis is in-memory, it's the RAM that matters, not the CPU. For a modest cache or a session store, 1 vCPU and 1 to 2 GB of RAM are enough. If Redis serves as a broker for thousands of queued jobs or stores multi-GB in-memory datasets, size the RAM to at least twice your target `maxmemory` to absorb the copy-on-write during RDB snapshots. On the software side: Ubuntu 22.04\u002F24.04 LTS, Docker and Compose v2, a persistent volume for AOF\u002FRDB if you enable persistence, and the `vm.overcommit_memory=1` setting on the host to avoid fork failures during backups.",{"type":48,"title":49,"steps":50},"steps","Deploying Redis with Docker in production",[51,54,57,60,63,66],{"title":52,"body":53},"Prepare the host","Install Docker, then set `vm.overcommit_memory=1` via `sysctl` to make snapshots reliable, and disable Transparent Huge Pages. Close port 6379 to the outside: a Redis exposed without a password is a classic target for cryptominers.",{"title":55,"body":56},"Write the docker-compose.yml","Declare a `redis:7-alpine` service with a custom command pointing to a `redis.conf` mounted as read-only. Enable `requirepass`, set `maxmemory` and `maxmemory-policy`, and mount a volume for `\u002Fdata` if you want persistence.",{"title":58,"body":59},"Configure security","In `redis.conf`, set a strong password via `requirepass`, rename or disable dangerous commands (`FLUSHALL`, `CONFIG`) with `rename-command`, and restrict listening to the internal network. For remote access, enable Redis's native TLS (`tls-port`) or go through a tunnel.",{"title":61,"body":62},"Choose the persistence strategy","For a pure cache, disable persistence to gain performance. For a job broker where loss is unacceptable, enable AOF with `appendfsync everysec`: a good trade-off between durability and throughput. Combine RDB + AOF for fast restarts and reliable journaling.",{"title":64,"body":65},"Connect your application","Launch with `docker compose up -d` and test with `docker compose exec redis redis-cli -a VOTRE_PASS ping`. Point your application to the internal Docker network rather than a public IP, for both latency and security.",{"title":67,"body":68},"Monitor memory","Monitor `used_memory` and `evicted_keys` via `redis-cli INFO`. If evictions rise, increase the RAM or refine the policy. Set up an alert when memory usage exceeds 80% of `maxmemory`.",{"type":70,"body":71},"tip","Monitor the `keyspace_hits` \u002F `keyspace_misses` ratio via `INFO stats`: a low hit rate means your cache is undersized or your TTLs are too short. For critical workloads, deploy Redis Sentinel across three VPSs to obtain automatic failover: if the master goes down, a replica is promoted without intervention, and your applications are redirected via the Sentinel service.",{"type":70,"title":73,"body":74},"The official documentation","For advanced configuration and tool-specific options, refer to the \u003Ca href=\"https:\u002F\u002Fredis.io\u002Fdocs\" target=\"_blank\" rel=\"noopener noreferrer\">official Redis documentation\u003C\u002Fa>. This guide covers going live on a VPS; the vendor's documentation remains the reference for fine-tuning, major upgrades, and specific use cases.","Run Redis at full speed","The ServOrbit Cloud VPS with a Docker template and dedicated RAM gives you the latency and memory needed for a high-performance Redis, whether cache or job broker.","Deploy my Cloud VPS","\u002Fvps-cloud",[80,94,107],{"id":81,"slug":82,"title":83,"excerpt":84,"readTime":85,"views":86,"isPinned":13,"publishedAt":87,"category":88,"categories":89,"featuredImage":23,"bgImage":24,"posterImage":91,"relatedSolution":92},56,"heberger-postgresql-vps","PostgreSQL on a VPS: a reliable and controlled database","Host PostgreSQL on a VPS: volumes, backups, restricted network access and sound configuration for your applications.",8,2240,"2026-04-25T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[90],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-postgresql-vps-poster.svg",{"categorySlug":18,"appSlug":93},"postgresql",{"id":95,"slug":96,"title":97,"excerpt":98,"readTime":11,"views":99,"isPinned":13,"publishedAt":100,"category":101,"categories":102,"featuredImage":23,"bgImage":24,"posterImage":104,"relatedSolution":105},57,"heberger-mysql-vps","Hosting MySQL on a VPS","Host MySQL on your Cloud VPS: Docker deployment, hardening, InnoDB tuning, and automated backups, step by step.",509,"2026-04-24T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[103],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-mysql-vps-poster.svg",{"categorySlug":18,"appSlug":106},"mysql",{"id":108,"slug":109,"title":110,"excerpt":111,"readTime":85,"views":112,"isPinned":13,"publishedAt":113,"category":114,"categories":115,"featuredImage":23,"bgImage":24,"posterImage":117,"relatedSolution":118},59,"heberger-mongodb-vps","Hosting MongoDB on a VPS","Host MongoDB on your Cloud VPS: Docker deployment, replica set, authentication, indexing, and controlled backups.",583,"2026-04-22T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[116],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-mongodb-vps-poster.svg",{"categorySlug":18,"appSlug":119},"mongodb",1785628446803]