About IPsec VPN Server
This project provides a Docker image for running your own IPsec VPN server. It supports IPsec/L2TP, Cisco IPsec and IKEv2 modes, is built on Alpine or Debian, and uses Libreswan as the IPsec software and xl2tpd as the L2TP daemon. A VPN like this encrypts traffic between a device and the server, which helps on untrusted networks such as cafes, airports and hotels.
On first start it automatically generates VPN credentials and the IKEv2 configuration. It supports IKEv2 with modern ciphers such as AES-GCM, creates profiles that configure iOS, macOS and Android devices, and works with Windows, macOS, iOS, Android, Chrome OS and Linux clients. A helper script manages IKEv2 users and certificates, data persists in a Docker volume, and images are built for amd64, arm64 and arm/v7 through GitHub Actions.
Setup is a single docker run command, or the IPsec VPN can be installed without Docker. The author also publishes related projects for WireGuard, OpenVPN and Headscale. The repository lists the license as Other, so check the licence file. It suits individuals and small teams running a personal or private VPN on a VPS, home server or Raspberry Pi.
Key features
- IPsec/L2TP, Cisco IPsec and IKEv2 modes
- Auto-generated credentials on first start
- Client profiles for iOS, macOS and Android
- Helper script for IKEv2 users and certificates
- Persistent data in a Docker volume
- Images for amd64, arm64 and arm/v7
Good fit for
- →A personal VPN on a VPS or Raspberry Pi
- →Encrypting traffic on public Wi-Fi
- →Private remote access for a small team
- Tags
- vpn
- ipsec
- ikev2
- docker
- l2tp
- self-hosted
- security
- privacy
- raspberry-pi
IPsec VPN Server: questions and answers
- What is IPsec VPN Server used for?
- IPsec VPN Server is a Docker image that runs an IPsec VPN server supporting IPsec/L2TP, Cisco IPsec and IKEv2, with auto-generated credentials and client setup profiles. It is a good fit for a personal VPN on a VPS or Raspberry Pi, encrypting traffic on public Wi-Fi and private remote access for a small team.
- Is IPsec VPN Server open source?
- Yes. IPsec VPN Server is open source under a custom licence. Its source code is on GitHub at hwdsl2/docker-ipsec-vpn-server and is written mainly in Shell.
- Is IPsec VPN Server free?
- Yes. IPsec VPN Server is open source, so the software itself is free to use under the terms of its own licence.
- Can I self-host IPsec VPN Server?
- Yes. IPsec VPN Server can be self-hosted on your own server or infrastructure; there is no official hosted version.
- What is IPsec VPN Server an alternative to?
- IPsec VPN Server is an open-source alternative to ExpressVPN, Surfshark, NordVPN and Proton VPN. Other open-source alternatives to ExpressVPN include wg-easy, Headscale and OpenVPN.
- Is IPsec VPN Server actively maintained?
- Yes. The most recent commit to IPsec VPN Server was on 21 September 2026. The project has 7.1k stars on GitHub.
Open-source alternatives to IPsec VPN Server
See all
wg-easy
Networking & VPN
The easiest way to run WireGuard VPN + Web-based Admin UI.
AGPL-3.0vs NordVPN★ 27kHeadscale
Networking & VPN
An open source, self-hosted implementation of the Tailscale control server
BSD-3-Clausevs Tailscale★ 44k
OpenVPN
Networking & VPN
OpenVPN is an open source VPN daemon
OSSvs NordLayer★ 15k
NetBird
Networking & VPN
Connect your devices, users, and agents into a secure WireGuard®-based overlay network wit
OSSvs Tailscale★ 30k
Pi-hole
Networking & VPN
A black hole for Internet advertisements
OSSvs Cisco Umbrella★ 61k
AdGuard Home
Networking & VPN
Network-wide ads & trackers blocking DNS server
GPL-3.0vs Cisco Umbrella★ 37k
SaaS alternatives to IPsec VPN Server
See all
ExpressVPN
Networking & VPN
Consumer VPN service with apps for desktop, mobile, routers and browsers
SaaS
Surfshark
Networking & VPN
Consumer VPN with unlimited device connections plus antivirus and data alert add-ons
SaaS
NordVPN
Networking & VPN
Consumer VPN service with threat protection, double VPN and meshnet
SaaS
Proton VPN
Networking & VPN
VPN service from Proton with a no-logs policy and a free tier
SaaS
Private Internet Access
Networking & VPN
Consumer VPN service with a large server network and configurable privacy settings
SaaS
CyberGhost
Networking & VPN
Consumer VPN service with streaming-optimized servers and a no-logs policy
SaaS

