Fresh docker production install without SiteURL

I’m installing docker for production using this, but I’m doing in a internal LAN VM so I don’t have a SiteURL (skipping TLS and Gitlab)

Install Mattermost via Docker — Mattermost documentation

I plan to use caddy so I don’t need to expose the VM publicily. The docker install is fine , containers running fine but I can’t connect to web interface locally.

When I install using docker preview, that works so I presume there’s something missing for production steps?

1 Like

Hi @overmat ,

the SiteURL does not depend on the installation being publicly available or on the fact if you’re using TLS or not. Its value should be exactly what your users will put into their clients and browsers then when they try to access your Mattermost installation, so if your Mattermost container is running on host 192.168.0.1 on port 8065 but you want to proxy it through caddy and caddy is running on 192.168.0.2 on port 80 and you do not use internal hostnames, your SiteURL should be set to http://192.168.0.2.

What error are you seeing when you try to access the web interface locally and what does local mean?

These are my install steps. Then I tried accessin from a webbrowser 192.168.2.204, no access. I see only ssh port 22 accessible.

cd /home
git clone GitHub - mattermost/docker: Install Mattermost server via Docker
cd docker
mkdir -p ./volumes/app/mattermost/{config,data,logs,plugins,client/plugins,bleve-indexes}
sudo chown -R 2000:2000 ./volumes/app/mattermost
nano .env (Changed DOMAIN=192.168.2.204)
docker --version

Docker version 23.0.5, build bc4487a
docker compose version
Docker Compose version v2.18.1

sudo docker compose -f docker-compose.yml -f docker-compose.nginx.yml up -d

docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1196bb7b7cb4 nginx:alpine “/docker-entrypoint.…” About an hour ago Restarting (1) 28 seconds ago nginx_mattermost
6471ae71734d mattermost/mattermost-enterprise-edition:7.1 “/entrypoint.sh matt…” About an hour ago Up About an hour (healthy) 8065/tcp, 8067/tcp, 8074-8075/tcp, 0.0.0.0:8443->8443/udp, :::8443->8443/udp docker-mattermost-1
db4cd7c74f38 postgres:13-alpine “docker-entrypoint.s…” About an hour ago Up About an hour 5432/tcp docker-postgres-1

systemctl stop firewalld (for testing)

netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1086/sshd: /usr/sbi
tcp6 0 0 :::22 :::* LISTEN 1086/sshd: /usr/sbi

Your nginx container is restarting all the time, I assume this is because you did not create the SSL certificates as mentioned in the documentation.

https://docs.mattermost.com/install/install-docker.html#deploy-mattermost-on-docker-for-production-use

You will need to either manually provide the certificates or run the certbot container to generate them for you, otherwise you can use the without-nginx yaml file. The Mattermost application server’s port (8065) is not exposed to the host when the nginx container is also running.

oh I see. I reinstalled using the without ngnx, and it works! Thanks!.

Awesome, thanks for letting us know. Marking this topic as resolved now.