Octopus.Web.BaseUrl

Hi there,

The documentation list #{Octopus.Web.BaseUrl} as a valid variable in the docs

However this support post from 2015 explains that its deprecated and we should hard code the base url into the email template.

My preference would be to use the variable if its not deprecated but my problem is that the variable is substituted when I include it in an email with the hostname of the server and not the public domain name breaking the SSL chain.

It be great if this variable could resolve top the same baseUrl as the example commands for nuget on the packages page in the octopus server library.

Many thanks to advice.

Keep up the good work!

Mikael

Hi Mikael,

Thanks for getting in touch! Since that support post you linked to was written, the #{Octopus.Web.BaseUrl} variable was in fact deprecated, but we decided to add it back due to a few requests. As you saw in the support post you linked, the reason was mentioned why it was deprecated initially.

This variable is based on the ListenPrefixes (HTTP and HTTPS), and if it finds localhost, it replaces that with your Server machine name. If you’re SSL offloading, and have a load balancer or reverse proxy, this value will likely not be suitable for use in referring to the server from a client perspective. It works only in simple configuration scenarios. I have updated the same documentation page you linked to include this information.

If you’re wanting your emails to notify of events happening within Octopus, I would recommend you consider taking advantage of the Subscriptions feature. It was introduced in 3.5 (and wrote a blog post to introduce it), and it allows you to ‘Subscribe’ to audited events to get Email or Webhook notifications. You can also have the emails include a deep link to the Audit page by configuring the public URL in your Web Portal under the Configuration > Octopus Server Nodes > Configuration Settings page. Though it’s important to note you can’t edit the email template for Subscriptions.

Feel free to send us followup questions, or clarifications if my suggestions don’t help your scenario!

Best regards,

Kenny