Documentation

Server 4.x

⚠️ Version 4.x of eduVPN is currently under development. Switch to "Server 3.x" Documentation for the production release!

Local#

Use a local user database, typically for running a small instance with a few users.

Portal Configuration#

File: /etc/vpn-mini-portal/config.json

You can explicitly set the File authentication method and point to the user database file. The configuration below is also the default. If you leave the configuration file empty, this is what you get.

{
    "File": {
        "UserFile": "/etc/vpn-mini-portal/users.json"
    },
    "authMethod": "File"
}

User Database#

File: /etc/vpn-mini-portal/users.json

In the example below we have two users, alice and bob. Alice is a member of the admins group, bob of the users groups.

{
    "userDb": {
        "alice": {
            "userAttributes": {
                "groups": [
                    "admins"
                ]
            },
            "userPassHash": "REPLACE_WITH_PASSWORD_HASH"
        },
        "bob": {
            "userAttributes": {
                "groups": [
                    "users"
                ]
            },
            "userPassHash": "REPLACE_WITH_PASSWORD_HASH"
        }
    }
}

In order to generate a password hash, you can use the following command. The example generates a hash for the password foo:

$ php -r 'echo password_hash("foo", PASSWORD_DEFAULT).PHP_EOL;'

Use the hash as the value for the userPassHash key in the file above.