Skip to content
LogoTethys Platform Documentation
Tutorials SDK CLI Tethys Portal Migrate Apps GitHub
  • Features
    • Software Suite
    • Python Software Development Kit
    • Templating and Gizmos
    • Tethys Portal
    • Computing
    • Acknowledgements
  • What's New
    • Release 4.0
      • Python 3.10
      • Django 3.2
      • Bootstrap 5
      • Controller Decorators
      • WebSocket URLs
      • Tethys Map Layout
      • Comprehensive Tethys Manage Command
      • Tethys Docker Command
      • Static Dependencies
      • Custom Job Actions
      • Scheduler App Settings
      • Showcase Apps
      • Apps Library
      • App Settings
      • Proxy Apps
      • Tethys Portal
      • Documentation
      • Miscellaneous Changes
      • Bug Fixes
      • Security Fixes
    • Prior Release Notes
      • Prior Release Notes
  • Getting Started
    • Prerequisites
    • 1. Install the tethys-platform Conda Package
    • 2. Activate the Tethys Conda Environment
    • 3. Create a portal_config.yml File
    • 4. Configure the Tethys Database
    • 5. Start the Development Server
    • 6. Next Steps
    • Related Docs
      • System Requirements
      • Tethys Portal Configuration
      • Application Installation
      • Showcase Apps
      • Upgrade to 4.0
      • Production Installation Guide
      • Developer Installation
      • Using Docker
      • Web Admin Setup
  • Upgrade to 4.0
    • Upgrading 3.X to 4.X and 4.X Versions
      • Upgrading 3.X to 4.X Notes
      • Upgrading 4.X Notes
      • Upgrade Steps
      • Additional Upgrade Steps for Production Installations
  • Tutorials
    • Start Here
      • Key Concepts
    • Spatial Data
      • GeoServer
      • THREDDS
      • Google Earth Engine
    • Computing
      • Dask Tutorial
    • Other
      • WebSockets Concepts
      • Bokeh Integration Concepts
      • Quotas Concepts
  • Development Guides
    • Command Line Interface
      • Commands
      • version command
      • app_settings command
      • db command
      • docker command
      • gen command
      • install command
      • uninstall command
      • link command
      • list command
      • manage command
      • scaffold command
      • schedulers command
      • services command
      • settings command
      • site command
      • syncstores command
      • test command
    • Software Development Kit
      • App Base Class API
      • App Templating API
      • App Settings API
      • Handoff API
      • Jobs API
      • Layouts API
      • Permissions API
      • REST API
      • Routing API
      • Template Gizmos API
      • Testing API
      • Tethys Extensions API
      • Tethys Quotas API
      • Tethys Services APIs
      • Workspaces API
      • Experimental Static Resources
    • Tethys Portal
      • Tethys Portal Configuration
      • Administrator Pages
      • Tethys Users
      • Developer Tools
      • App Feedback
    • Software Suite
      • Spatial Database Storage
      • Map Publishing
      • Geoprocessing
      • Visualization
      • Distributed Computing
      • File Dataset Storage
      • WebSocket Communication
      • Docker Installation
      • SDK Relationships
      • References
  • Production Installation Guide
    • Production vs. Development
    • Production Installation Methods
      • Manual Installation
      • Cloud Virtual Machine Images
      • Docker Deployment
    • References
  • Source Code
  • Contribute
    • Development Installation
    • Resources
  • Supplemental
    • Key Concepts
      • What is an App?
      • Web Frameworks
      • URL Design and REST Paradigm
    • App Project Structure
      • Release Package
      • The App Package
      • Naming Conventions
    • Terminal Quick Guide
      • $
      • ~
      • sudo
      • cd
      • mkdir
      • chown
      • Copy and Paste
    • Ubuntu Installation
    • Test Docker Containers
    • PGAdmin III Tutorial
    • Glossary
    • References

Assign Domain Name (Recommended)

Last Updated: November 2021

A domain name is the text that users enter in a web browser to visit a website (e.g. google.com). Behind the scenes, this text is mapped to the IP address of the server, which is the unique numeric address that can be used to locate your website (e.g 20.109.16.186). VMs on Azure can be assigned a generic, Azure supplied, domain name (e.g.: my-first-tethys.westus2.cloudapp.azure.com) or a custom domain (e.g. myfirsttethys.org). With either option there are a few configuration steps that need to be performed in Tethys assigning the domain name.

Generic Domain Name

Create a generic, Azure supplied, domain name as follows:

  1. Navigate to the Overview page for the VM Resource.

  2. Locate the DNS name field in the Essentials section.

  3. Follow the link next to DNS name. It will either be "Not configured" or the domain name if previously configured.

  4. Enter a DNS name label. This is labeled as optional, but it is actually required to enable the generic domain.

  5. Press the Save button to enable the domain name.

Screenshot of the domain name configuration page for an Azure VM
Figure 1. Screenshot of the domain name configuration page for an Azure VM.

Custom Domain Name

Assigning a custom domain name is a little more involved and depends on how you obtain the domain name.

  1. Acquire a domain name if you don't have one to use already: Google: Domain Name

  2. Make sure the Public IP address assigned to the Azure VM is static:

    1. Navigate to the Overview page for the VM Resource.

    2. Locate the Public IP address field in the Essentials section.

    3. Click on the IP address link.

    4. Under IP address assignment select the Static radio option (see Figure 3).

    5. Click Save to save the changes.

  3. Create an A-name record that associates the domain name with the public IP address of the Azure VM. The company you bought the domain name from will usually provide a way to do this. If your domain name belongs to your organization, you will need to contact your IT department to find out how this is to be done.

For more information about creating a custom domain name for Azure VMs read the following article: Add Custom Domain to Azure VM or resource.

Tethys Configuration

After assigning a domain name to the Azure VM, generic or custom, add it to the configuration of Tethys Platform in two places:

NGINX Configuration

  1. Open $TETHYS_HOME/config/tethys_nginx.conf in your favorite command line text editor (e.g. vim or nano).

  2. Set the server_name parameter to the domain name:

    default
    # tethys_nginx.conf
    
    # the upstream component nginx needs to connect to
    upstream channels-backend {
        server 127.0.0.1:8000;
    }
    
    # configuration of the server
    server {
        # the port your site will be served on
        listen      80;
        # the domain name it will serve for
        server_name <domain_name>; # substitute your machine's IP address or FQDN
        ...
    
  3. Restart the NGINX service

    default
    sudo systemctl restart nginx.service
    

Tethys Portal Configuration

  1. Open $TETHYS_HOME\portal_config.yml using your favorite command line text editor (e.g. vim or nano).

  2. Add the domain name as another item under the ALLOWED_HOSTS setting.

  3. Remove the '*' entry if it is still listed in ALLOWED_HOSTS setting.

  4. Restart the Tethys service

    default
    sudo systemctl restart tethys.service
    
Previous Customize Tethys Portal (Recommended)
Next Configure HTTPS (Recommended)
© 2023, Tethys Platform Made with Sphinx 5.3.0