You are here: Home » technologie » Create VPN server on VPS and Docker for your privacy

Create VPN server on VPS and Docker for your privacy

Featured Image

If you wan’t to have your own VPN server on inexpensive VPS server, to protect your communication this is tutorial for you.

What you will get:

VPS server with SoftEther VPN server on it, configured to allow VPN connections from your laptop.

  1. Get some cheap VPS Server like this can choose Ubuntu with Docker during install or use some bare ubuntu and install Docker later.
  2. Get Docker events on second SSH session. If you connect to your VPS using putty open second connection to your VPS. Run:

    docker events

    This way you will see on this second SSH session what is going on in docker.

  3. Follow instructions on pull frosquin/softetherI prefer to use external config file like this:

    docker run -d -v /etc/vpnserver/vpn_server.config:/usr/local/vpnserver/vpn_server.config –net host –name softether frosquin/softether

    Then run your container:docker start softetherCopy config file from docker container into your „local” directory:

    docker exec -t -i softether cat /usr/local/vpnserver/vpn_server.config >> /etc/vpnserver/vpn_server.config

    Restart your container:

    docker restart softether

    If you want you can get softether server bash session:

    docker exec -t -i softether /bin/bash

  4. Connect with vpn server command line interface (look at for reference).Run this:

    docker exec -t -i softether /usr/local/vpnserver/vpncmd

    It will connect you to vpn server command line interface.

    Choose option 1 „Management of VPN Server or VPN Bridge”

    When it asks „Hostname of IP Address of Destination” press ENTER

    When it asks „Specify Virtual Hub Name” type: DEFAULT

    Your prompt should look like:

    VPN Server/DEFAULT>

  5. Create new user:


It will ask you for username, full name, group (leave blank if you will not manage some groups of users) and password.

  • Download and install SoftEther VPN Client for windows (or follow some instructions for your operating system) from
  • Create new network interface and that configure connection. Type your VPS IP address as hostname. Type in user name and password.
  • Connect and it should work just fine.

Configure L2TP (not tested – work in progress)

If you wan’t to try to configure L2TP server type in


in vpncmd and follow „wizard”.

Then follow instructions on configuring windows connection

I don’t know why this configuration doesn’t work for me. Maybe you will have more luck. I will update on it, when I will be able to fix it.

Dodaj komentarz

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *