[{"data":1,"prerenderedAt":129},["ShallowReactive",2],{"seo-verification":3,"blog-hosting-redis-on-a-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"slugs":9,"title":12,"excerpt":13,"readTime":14,"views":15,"isPinned":16,"publishedAt":17,"category":18,"categories":24,"featuredImage":26,"bgImage":27,"posterImage":28,"relatedSolution":29,"intro":32,"sections":33,"ctaTitle":82,"ctaBody":83,"ctaButton":84,"ctaUrl":85,"relatedPosts":86},58,"hosting-redis-on-a-vps",{"fr":10,"en":8,"ar":11},"heberger-redis-vps","استضافة-redis-على-خادم-vps","Hosting Redis on a VPS","Deploy Redis on your Cloud VPS: in-memory cache, sessions, and queues, with persistence, security, and tuning.",4,0,false,"2026-04-23T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},6,"Databases","bases-de-donnees","bg-teal-500\u002F10 text-teal-400","database",[25],{"id":19,"name":20,"slug":21,"color":22,"icon":23},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-redis-vps-poster.svg",{"categorySlug":30,"appSlug":31},"databases","redis-stack","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 full control over memory and over the network between it and your app, without paying the premium of managed Redis offerings.",[34,38,48,51,76,79],{"type":35,"title":36,"body":37},"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":39,"title":40,"items":41},"ul","The concrete benefits of a self-hosted Redis",[42,43,44,45,46,47],"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":35,"title":49,"body":50},"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":52,"title":53,"steps":54},"steps","Deploying Redis with Docker in production",[55,58,61,64,67,70,73],{"title":56,"body":57},"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":59,"body":60},"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":62,"body":63},"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":65,"body":66},"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":68,"body":69},"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":71,"body":72},"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`.",{"title":74,"body":75},"Logging in for the first time","Open the URL: RedisInsight appears straight away, WITHOUT asking for any credentials at all (you only accept the terms of use on the first screen), and your local Redis database is already accessible there for reading and writing. Do not attach a public domain to this interface without protection in front of it.",{"type":77,"body":78},"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":77,"title":80,"body":81},"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",[87,102,116],{"id":88,"slug":89,"slugs":90,"title":93,"excerpt":94,"readTime":14,"views":15,"isPinned":16,"publishedAt":95,"category":96,"categories":97,"featuredImage":26,"bgImage":27,"posterImage":99,"relatedSolution":100},56,"postgresql-on-a-vps-a-reliable-and-controlled-database",{"fr":91,"en":89,"ar":92},"heberger-postgresql-vps","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.","2026-04-25T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[98],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-postgresql-vps-poster.svg",{"categorySlug":30,"appSlug":101},"postgresql-stack",{"id":103,"slug":104,"slugs":105,"title":108,"excerpt":109,"readTime":110,"views":15,"isPinned":16,"publishedAt":111,"category":112,"categories":113,"featuredImage":26,"bgImage":27,"posterImage":115,"relatedSolution":26},57,"hosting-mysql-on-a-vps",{"fr":106,"en":104,"ar":107},"heberger-mysql-vps","استضافة-mysql-على-خادم-vps","Hosting MySQL on a VPS","Host MySQL on your Cloud VPS: Docker deployment, hardening, InnoDB tuning, and automated backups, step by step.",3,"2026-04-24T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[114],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-mysql-vps-poster.svg",{"id":117,"slug":118,"slugs":119,"title":122,"excerpt":123,"readTime":110,"views":15,"isPinned":16,"publishedAt":124,"category":125,"categories":126,"featuredImage":26,"bgImage":27,"posterImage":128,"relatedSolution":26},59,"hosting-mongodb-on-a-vps",{"fr":120,"en":118,"ar":121},"heberger-mongodb-vps","استضافة-mongodb-على-خادم-vps","Hosting MongoDB on a VPS","Host MongoDB on your Cloud VPS: Docker deployment, replica set, authentication, indexing, and controlled backups.","2026-04-22T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[127],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-mongodb-vps-poster.svg",1787581002516]