Skip to content
Fred Chien edited this page Sep 30, 2015 · 1 revision

The Basic Installation Guide is showing how to start the service quickly with default configuration. You have to know that is run for testing purpose, it is not secure and safe with no real-world configuration.

Create a Own Configuration for Real World

You can see the default configuration in the ./configs, which is called general.json.default. Making own configuration is quite easy that just copy the default config file with a new name general.json in the directory.

cd configs
cp general.json.default general.json

Server and Service Settings

The First thing you have to do is give the service a name, set up external URL and server port.

Service

  • name - Service Name
  • external_url - the URL used for accessing from outside.
"service": {
    "name": "YOUR SERVICE NAME",
    "external_url": "http://<YOUR DOMAIN>"
}

Server

  • port - port number
"server": {
    "port": 3001
}

Session Settings

Session is used to preserve login state and store user data. For safety, a secret key was needed to encrypt session data in the cookie. Multiple key was supported, writing all in the array is good.

"session": {
    "keys": [
        "YOUR SECRET KEY 1",
        "YOUR SECRET KEY 2"
    ]
}

Note that people can hack your service if they get your secret key.

Database Settings

  • uri - Database URI
"database": {
    "uri": "mongodb://<HOST>:<PORT>/<DATABASE>"
}

Note that Lantern only supports MongoDB to store all of data.