This is an old revision of the document!


Install StrongSwan on Ubuntu 24.04

  • When installing StrongSwan on a server, the item that takes the most preparation is the setup of the PKI.
  • Although it is easy once you figured it out, because StrongSwan has been around for such a long time there are lots of outdated or over complicated documentation out there.
  • Even when I asked one of the AI engines for instructions it provided me with old outdated instructions.
  • The following instructions should work well on any of the recent versions of StrongSwan
  • As stated on the StrongSwan Primer wiki page, StrongSwan has gone through an aggressive redesign and you should take care when installing it not to install the older legacy version.
  • The natural behavior would be to install the StrongSwan meta package. This should not be done
  • Instead we install charon-systemd and strongswan-swanctl
#Make sure the old StrongSwan versions are not installed or running
sudo systemctl stop strongswan
sudo apt-get remove strongswan-starter
sudo apt-get remove strongswan-charon
#Install the new style StrongSwan
sudo apt-get install charon-systemd strongswan-swanctl
#Enable its startup
sudo systemctl enable strongswan-swanctl.service
#Start it up
sudo systemctl start strongswan-swanctl.service
#Check Its status
sudo systemctl status strongswan-swanctl.service

  • install_24_4_strongswan.1768126316.txt.gz
  • Last modified: 2026/01/11 12:11
  • by system