[{"data":1,"prerenderedAt":128},["ShallowReactive",2],{"seo-verification":3,"blog-setting-up-a-wireguard-vpn-on-your-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":76,"ctaBody":77,"ctaButton":78,"ctaUrl":79,"relatedPosts":80},110,"setting-up-a-wireguard-vpn-on-your-vps",{"fr":10,"en":8,"ar":11},"vpn-wireguard-vps","إعداد-شبكة-vpn-باستخدام-wireguard-على-خادمك-vps","Setting up a WireGuard VPN on your VPS","Deploy a WireGuard VPN on your Cloud VPS: encrypted tunnel, Docker configuration and clients in a few minutes. Step-by-step guide.",3,0,false,"2026-03-02T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},8,"Security & Monitoring","securite-monitoring","bg-rose-500\u002F10 text-rose-400","security",[25],{"id":19,"name":20,"slug":21,"color":22,"icon":23},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fvpn-wireguard-vps-poster.svg",{"categorySlug":30,"appSlug":31},"networking-vpn","wireguard-server","WireGuard has redefined the modern VPN: a few hundred lines of code, state-of-the-art encryption and throughput close to native. Self-hosted on a VPS, it offers you a private tunnel that you control end to end, without depending on a third-party provider.",[34,38,48,51,73],{"type":35,"title":36,"body":37},"h2","Why self-host WireGuard on a VPS","Commercial VPNs pool thousands of users on the same IP addresses, often keep logs and throttle bandwidth. By deploying WireGuard on your own VPS, you get a dedicated egress IP address, throughput guaranteed by your plan and a logging policy you define yourself. WireGuard works over UDP on a single port, integrates directly into the Linux kernel and negotiates a connection in a fraction of OpenVPN's time. For a developer or an agency, it's also the cleanest way to access internal services (database, admin panel, monitoring) without exposing them publicly: you bind them to the VPN interface only.",{"type":39,"title":40,"items":41},"ul","Concrete benefits of a self-hosted WireGuard",[42,43,44,45,46,47],"Dedicated and stable egress IP, ideal for whitelisting API access or back-offices.","Modern ChaCha20-Poly1305 encryption with a minimal attack surface (4,000 lines of code).","Throughput close to native and near-instant reconnection after a network drop (roaming).","Private access to your internal services by binding them to the VPN subnet (10.0.0.0\u002F24) rather than to 0.0.0.0.","No third-party activity logs: you fully control data retention.","Fixed and predictable cost, independent of the number of connected devices.",{"type":35,"title":49,"body":50},"Requirements for this deployment","WireGuard is extremely lightweight: a VPS with 1 vCPU and 1 GB of RAM is more than enough for a dozen clients, the limiting factor being bandwidth rather than CPU. Plan for Docker and Docker Compose installed (or the native `wireguard-tools` package), a recent Linux kernel (5.6+ integrates WireGuard natively) and the opening of a UDP port, by convention `51820`. A domain name pointing to your VPS (an A record `vpn.mydomain.com`) is recommended to distribute client configurations, but the public IP alone works too.",{"type":52,"title":53,"steps":54},"steps","Deploy WireGuard in a container",[55,58,61,64,67,70],{"title":56,"body":57},"Enable IP forwarding on the VPS","The server must route the tunnel traffic to the Internet. Add `net.ipv4.ip_forward=1` in `\u002Fetc\u002Fsysctl.conf` then apply with `sudo sysctl -p`. Without this, clients connect but have no outbound access.",{"title":59,"body":60},"Start the wg-easy container","The `wg-easy` project provides WireGuard plus a web interface for peer management. In a `docker-compose.yml`, define `WG_HOST=vpn.mydomain.com`, an admin password and expose `51820\u002Fudp` as well as `51821\u002Ftcp` for the UI. Start with `docker compose up -d`.",{"title":62,"body":63},"Open the UDP port at the firewall","Allow inbound traffic on the tunnel port: `sudo ufw allow 51820\u002Fudp`. However, restrict access to the admin UI (`51821`) to your IP only or place it behind the VPN once the first client is connected.",{"title":65,"body":66},"Protect the administration interface with SSL","Place a reverse proxy (Caddy or Traefik) in front of port `51821` to serve the UI over HTTPS on `vpn.mydomain.com` with an automatic Let's Encrypt certificate. Never leave the admin panel accessible over plain HTTP on the Internet.",{"title":68,"body":69},"Create a peer and import the configuration","From the UI, add a client: wg-easy generates a key pair and a QR code. Scan it with the WireGuard mobile app, or download the `.conf` file for `wg-quick up`. The client is operational immediately.",{"title":71,"body":72},"Verify the tunnel","Once connected, check your public egress IP (it should be that of the VPS) and the handshake state on the server side with `docker exec wg-easy wg show`. A recent `latest handshake` value confirms that the tunnel is active.",{"type":74,"body":75},"tip","To turn your VPN into a gateway for accessing internal services without exposing everything, only allow the VPN subnet (for example `10.8.0.0\u002F24`) in the client's `AllowedIPs` instead of `0.0.0.0\u002F0`. You thus get a \"split\" tunnel: only traffic to your private services goes through the VPS, the rest of your browsing exits via your local connection. Combine it with a kill-switch via `PostUp`\u002F`PostDown` to prevent any leak if the tunnel goes down.","Launch your VPN in a few minutes","A ServOrbit Cloud VPS with a preconfigured Docker template lets you deploy WireGuard without friction: a recent kernel, an available UDP port and generous bandwidth for your tunnels.","Deploy my WireGuard VPS","\u002Fvps-cloud",[81,97,113],{"id":82,"slug":83,"slugs":84,"title":87,"excerpt":88,"readTime":14,"views":15,"isPinned":16,"publishedAt":89,"category":90,"categories":91,"featuredImage":26,"bgImage":27,"posterImage":93,"relatedSolution":94},105,"monitoring-your-vps-with-uptime-kuma",{"fr":85,"en":83,"ar":86},"superviser-vps-uptime-kuma","مراقبة-خادمك-الافتراضي-vps-باستخدام-uptime-kuma","Monitoring your VPS with Uptime Kuma","Deploy Uptime Kuma on your VPS to monitor your sites and services self-hosted, with alerts and a public status page.","2026-03-07T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[92],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fsuperviser-vps-uptime-kuma-poster.svg",{"categorySlug":95,"appSlug":96},"monitoring-observability","uptime-kuma",{"id":98,"slug":99,"slugs":100,"title":103,"excerpt":104,"readTime":105,"views":15,"isPinned":16,"publishedAt":106,"category":107,"categories":108,"featuredImage":26,"bgImage":27,"posterImage":110,"relatedSolution":111},106,"vps-monitoring-with-grafana-and-prometheus",{"fr":101,"en":99,"ar":102},"monitoring-vps-grafana-prometheus","مراقبة-الخادم-الافتراضي-vps-باستخدام-grafana-و-prometheus","VPS Monitoring with Grafana and Prometheus","Set up a Grafana + Prometheus stack on your VPS to collect, store and visualize your system and application metrics.",4,"2026-03-06T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[109],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fmonitoring-vps-grafana-prometheus-poster.svg",{"categorySlug":95,"appSlug":112},"grafana",{"id":114,"slug":115,"slugs":116,"title":119,"excerpt":120,"readTime":14,"views":15,"isPinned":16,"publishedAt":121,"category":122,"categories":123,"featuredImage":26,"bgImage":27,"posterImage":125,"relatedSolution":126},107,"monitor-your-vps-in-real-time-with-netdata",{"fr":117,"en":115,"ar":118},"monitorer-vps-netdata","راقب-خادمك-الافتراضي-vps-في-الوقت-الفعلي-باستخدام-netdata","Monitor your VPS in real time with Netdata","Install Netdata on your VPS for per-second real-time monitoring: thousands of metrics, zero configuration, alerts included.","2026-03-05T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[124],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fmonitorer-vps-netdata-poster.svg",{"categorySlug":95,"appSlug":127},"netdata",1787581015416]