Skip to content

Installation

Ken Williamson edited this page Mar 15, 2020 · 38 revisions

Installing GoAuth2

Install Database

The default database for GoAuth2 is MySql.

  1. Download the go_auth2.sql file here
  2. Run the go_auth2.sql file on a MySql Server

Docker Installation

If you want to run GoAuth2 on Docker:

https://hub.docker.com/r/ulboralabs/goauth2

docker pull ulboralabs/goauth2

OR

Compile GoAuth2

  1. Run build.sh if you are on a Linux compile on other systems
  2. Copy the following to where you want to run GoAuth2
    • main file
    • static folder

Set Environment Variables

Database Variables

  • GOAUTH2_HOST (database host URL)
    • when not set, defaults to: localhost:3306
  • GOAUTH2_USER (database username)
    • when not set, defaults to: admin
  • GOAUTH2_PASSWORD (database password)
    • when not set, defaults to: admin
  • GOAUTH2_DATABASE (database name)
    • when not set, defaults to: go_auth2

Authentication Server Variable

Logging Level Access Key

  • LOGGING_KEY (key for access to log lever REST service)
    • when not set, defaults to: 45sdbb2345

Token Parameters

  • ACCESS_TOKEN_KEY (secret key for access token)
    • when not set, defaults value in database table
  • REFRESH_TOKEN_KEY (secret key for refresh token)
    • when not set, defaults value in database table
  • TOKEN_ISSUER (token issuer)
    • when not set, defaults to: GoAuth2
  • TOKEN_AUDIENCE (token audience)
    • when not set, defaults to: GoAuth2.com

Start Authentication Service (GoAuth2Users)

  1. Run the GoAuth2Users Service
    • Username = admin
    • Password = admin

Run GoAuth2 (not Docker)

  1. Run ./start.sh to start GoAuth2 on a Linux platform
    • On other platforms, copy the content of start.sh and modify it for your platform

OR

Docker Installation

  • On Docker, ./start will automatically run