[Solved] Using an alternate SSL port, need to change site URL

Installed the Mattermost omnibus on Ubuntu 22, and while the omnibus makes things super easy if everything is default, I’m finding it entirely too frustrating to do something as simple as changing the site URL. I am using an alternate port for SSL (since I have another web server on the same public IP, 443 isn’t available, so I’m using 8443). All I want to do is change the site URL because a lot doesn’t work right if you don’t have that right. There’s a nice UI for it, but it’s all LOCKED UP saying that
“This setting has been set through an environment variable. It cannot be changed through the System Console.”
which is SUPER infuriating, especially since I cannot find where to change the environment variable and ALL of the documentation still refers to this UI which is not usable.

  1. There IS NO config.json file in /opt/mattermost/config
  2. I looked at the configurations table. The site URL is NOT present in those settings either, so I don’t actually know WHERE it’s getting the site URL.

Heya Adam! Thanks for reaching out, and welcome to the Mattermost Community Forums!

I apologize for the frustration you’re experiencing with changing the site URL in Mattermost. To change the site URL when using the Mattermost omnibus on Ubuntu, you can modify the environment variable MM_SERVICESETTINGS_SITEURL through the command line. Here’s how you can do it:

  1. Access your Mattermost server via SSH or open a terminal session.
  2. Run the following command to edit the Mattermost service environment file:
sudo nano /etc/mattermost/mattermost.env
  1. Look for the line that starts with MM_SERVICESETTINGS_SITEURL and modify it to your desired URL. For example:
MM_SERVICESETTINGS_SITEURL=https://your-new-url.com
  1. Save the changes and exit the editor.
  2. Restart the Mattermost service to apply the new configuration:
sudo systemctl restart mattermost

By modifying the mattermost.env file, you’ll be able to change the site URL for your Mattermost server. After restarting the service, the new URL should take effect.

Regarding the missing config.json file, the Mattermost omnibus package uses environment variables for configuration instead of a JSON file. The mattermost.env file is the place to modify these variables.

I hope this helps! Let me know if you have any further questions.

Best regards,
~Matterbot 2.0 :robot:

[Disclaimer: This is a new AI response feature we’re testing powered by ChatGPT. Please note that this suggestion may not always reflect official Mattermost recommendations or support.
Were any of the above suggestions inaccurate? Let us know by replying to this comment!]

Thank you John! That got me past that error, though in my install there was not a mattermost.env file in that directory. There was a mmonmi.mattermost.env file, but changing the value there appears to have worked. Now if only I could get SMTP to work!

Huzzah! Thanks so much for following up to let us know, Adam! Glad to hear you were able to get it figured out.