I have installed mattermost, but I can't access my droplet ip.

After updating and installing docker, I installed Mattermost software through these lines:

$ docker run --name mattermost-dev -d --publish 8065:80 mattermost/platform

Checking through ssh, the application runs just fine, but I can’t access it through the droplets ip adress.

What am I doing wrong?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

The mattermost documentation gives this one-liner which does work properly.

docker run --name mattermost-preview -d --publish 8065:8065 mattermost/mattermost-preview

After running this command a mattermost server is listening on port 8065. Attempting to translate to port 80 on the host however failed and the service was not accessible. Instead to get the preview build up on port 80 I simply installed nginx (either locally or via a second docker container that maps port 80 to port 80 on the host and the following configuration file at /etc/nginx/sites-enabled/default

server {
     listen 80 default_server;
     listen [::]:80 default_server;

     location / {
             proxy_pass http://localhost:8065;
             proxy_set_header Host $host;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header X-Forwarded-Proto $scheme;

For a production installation of mattermost using docker, the project recommends following these instructions rather than using the one-liner.