strongSwan can be installed from pre-built packages available in most major Linux distributions, or compiled from source for full control over enabled features.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/strongswan/strongswan/llms.txt
Use this file to discover all available pages before exploring further.
Install from packages
- Ubuntu/Debian
- RHEL/CentOS/Fedora
- Arch Linux
The Alternatively, install the full Enable and start the systemd service:
strongswan-swanctl package provides the modern swanctl interface and the charon-systemd daemon:strongswan meta-package which includes the legacy ipsec command as well:Package names and included plugins vary by distribution and release. Check your distribution’s documentation for the exact packages available. Distributions that package plugins separately may require installing additional packages for features like EAP-RADIUS or TPM 2.0.
Build from source
Building from source gives you full control over which plugins and features are compiled in.Requirements
At least one cryptographic library is required:libcrypto(OpenSSL) — recommendedlibwolfssl(wolfSSL)libbotan(Botan)libgmp(GNU MP) — used by default if no other library is specifiedlibgcrypt(GNU Crypto)
Build steps
Generate the build system (git checkouts only)
If you cloned the repository from git rather than downloading a release tarball, generate the Release tarballs already include a pre-generated
configure script first:configure script; skip this step.Configure the build
Run See important configure options below for a list of commonly used flags.
./configure with the features you need. The following example enables swanctl, systemd integration, and installs to standard system paths:Compile and install
sudo make install if not running as root.Important configure options
Run./configure --help for the full list. The most commonly used options are:
| Option | Description |
|---|---|
--enable-swanctl | Build the swanctl tool and VICI plugin (recommended) |
--enable-systemd | Build charon-systemd, a systemd-native IKE daemon |
--enable-eap-radius | EAP-RADIUS plugin for RADIUS-based authentication |
--enable-ha | High-availability clustering for active-passive failover |
--enable-tpm | TPM 2.0 plugin for hardware-backed private key storage |
--enable-curl | Enable CRL/OCSP fetching via libcurl |
--enable-ldap | Enable CRL fetching from LDAP servers |
--enable-sqlite | SQLite database backend for credential storage |
--enable-chapoly | ChaCha20/Poly1305 AEAD cipher plugin |
--enable-aesni | Intel AES-NI hardware acceleration plugin |
--sysconfdir=/etc | Set the system configuration directory |
--prefix=/usr | Set the installation prefix |
Kernel requirements
strongSwan requires the following Linux kernel modules to be available (built-in or loadable):Linux kernel 4.5 or later is recommended. Older kernels may also require
xfrm4_tunnel and xfrm4_mode_tunnel.Directory structure after install
After installation, strongSwan uses the following directories:strongswan.conf file controls daemon behavior such as logging, plugin loading, and charon tuning. The swanctl.conf file defines VPN connections, credentials, and IP pools.
Next steps
Quickstart
Set up your first site-to-site VPN tunnel
swanctl configuration
Learn the swanctl.conf format for connections, secrets, and pools