Last Updated: May 2020
portal_config.yml is the primary configuration file for Tethys Portal. As of version 3.0, you should not edit the
settings.py file directly. Instead add any Django settings that you need to the
settings section of the
portal_config.yml. This can be done by manually editing the file, or you can use the
tethys settings command to add settings to it.
This part of the installation guide will show you how to create the
portal_config.yml and highlights a few of the settings that you should configure when setting up Tethys Portal for production. The following sections of the production installation guide will walk you through other important settings as well.
1. Generate Tethys Configuration¶
Generate the portal configuration file with the following command:
2. Note the Location of
The directory where the
portal_config.yml is generated is the
TETHYS_HOME directory for your installation.
The default location of
/home/<username>/.tethys/ if your environment is named Tethys, otherwise it is
Note this location and use it anywhere you see
3. Set Required Production Settings¶
The following settings should be changed for a production installation of Tethys Portal.
The ALLOWED_HOSTS setting is used to specify a list of host/domain names that this Django site can serve. If a request comes in with a host/domain name that is not listed here, it will be rejected. You should set this to the domain(s) of your server. For example, you can set this setting using the
tethys settings command as follows:
tethys settings --set ALLOWED_HOSTS "['<SERVER_DOMAIN_NAME>']"
<SERVER_DOMAIN_NAME>with the domain name you identified during the Preparation step.
The first entry in
ALLOWED_HOSTSwill be used to set the server name in the NGINX configuration file in one of the following sections of this guide.