SoftEther is not starting after reboot

Posted October 24, 2021 143 views
Ubuntu 20.04

I’ve followed this guide three times, each time I’ve destroyed the droplet and created it again.

Everything is fine unless SoftEther (vpnserver) is not automatically starting after reboot.

Manual start works fine.

How to troubleshoot it?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @omidshojaee,

Have you checked the following sectioN:

If you like SoftEther to start as a service on startup create a file named vpnserver in /etc/init.d directory and change it to the following:

First, create and open the file using vi or nano:

vi /etc/init.d/vpnserver

And paste the following into the file:

# chkconfig: 2345 99 01
# description: SoftEther VPN Server
test -x $DAEMON || exit 0
case "$1" in
$DAEMON start
touch $LOCK
$DAEMON stop
rm $LOCK
$DAEMON stop
sleep 3
$DAEMON start
echo "Usage: $0 {start|stop|restart}"
exit 1
exit 0

Finally, save and close the file by pressing ESC and typing :wq to close vim.

We have to make a directory at /var/lock/subsys if one does not exist:

mkdir /var/lock/subsys

Now change the permission for the startup script and start vpnserver using command below:

chmod 755 /etc/init.d/vpnserver && /etc/init.d/vpnserver start

Use the command below make it to run at startup:

Debian / Ubuntu:

update-rc.d vpnserver defaults
  • As I mentioed, I followed the tutorial 3 times, until I realized the problem is exactly in the code you mentioned.

    For those who have similar issue, to create the service this file should be created:

    nano /lib/systemd/system/vpnserver.service
    Description=SoftEther VPN Server
    ExecStart=/usr/local/vpnserver/vpnserver start
    ExecStop=/usr/local/vpnserver/vpnserver stop

    The tutorial I followed is outdated.