how to set up collabora Office with portainer and Nginx

My goal to make my Nextcloud to become Google Workspace because my goal is our data most important to privacy with our data sensitive. And I would like to purchase free instead of paid Google Workspace because we have our server, and we use it for IT documents and resources.

So, you need to make sure nginx proxy manger and Portainer Up running before we start this.

We do not need to create a network because we already did created with nginx proxy manager (nginx)

Portainer sites → login admin account → stacks → add stacks

version: '2'
services:
   applegateoffice:
     container_name: collabora
     image: collabora/code:latest
     restart: always
     expose:
       - 9980
     cap_add: 
       - MKNOD
     networks:
       - nginx
     environment:
       - username=yourusername
       - password=yourpassword
       - aliasgroup1=https://yoursubdomain.yourdomain.io
       - aliasgroup2=https://yoursubdomain.yourdomain.io
       - extra_params=--o:net.proto=IPv4


networks:
  nginx:
    external: true

Start the deploy and go to nginx proxy manager to add proxy host detail.

Advanced Custom Nginx Configuration

# static files
location ^~ /loleaflet {
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
}

# WOPI discovery URL
location ^~ /hosting/discovery {
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
}

# main websocket
location ~ ^/lool/(.*)/ws$ {
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  proxy_http_version 1.1;
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
  proxy_read_timeout 36000s;
}

# download, presentation and image upload
location ~ ^/lool {
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
}

# Admin Console websocket
location ^~ /lool/adminws {
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  proxy_http_version 1.1;
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
  proxy_read_timeout 36000s;
}

Now save the configured and open the domain you just created.

Now we go over the nextcloud

then save then your sites is now have collabora office.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *