Mattermost container is still restarting

I’ve installed mattermost on ubuntu via docker-compose as mentioned in the instructions but after deploying the mattermost container is still restarting.

This is the error: failed to load configuration : failed to create store : unable to load on store creation : invalid config: Config.IsValid : Site URL must be valid URL http …

I fixed this error by deleting the last line from the env file but now am getting this error:
Failed to ping DB

Hi @Sbouaram and welcome to the Mattermost forums!

You should not delete the last line in the .env file, the MM_SERVICESETTINGS_SITEURL variable is important.
I assume that the real problem with your installation is, that the docker-compose version is too old. The first working version is 1.26.0, but you can pick any recent version, just not an older one.

Updating docker-compose is easy, just download the matching binary for your operating system and use this one instead of the installed one. Here’s a link to the release page: