NATVPS.id – LibreOffice is office software (office) which is free, modern, and open source. LibreOffice can be an alternative to Microsoft Office and WPS Office.
This article discusses the steps to install LibreOffice via picture Docker on the NAT VPS, so you can access it via web browser. This article uses Ubuntu 22.04 as a reference, but you can use other distributions such as Debian and CentOS.
Port Forwarding Configuration
Considering we are using NAT, we need to add 2 port forwarding configurations on the Virtualizor panel (or other VPS panel according to provider), ie HTTP and HTTPS port forwarding for LibreOffice domains.
For example, this article will use domains libreoffice.tutorial.mdinata.my.id for LibreOffice. You are free to change the domain according to your choice. Note this domain, because we will use it again in the installation process.

Don’t forget to add a DNS record that goes to your VPS’ NAT public IP, like this:

If you are confused, please read our article regarding domain forwarding here: Explanation of Domain Forwarding in NAT VPS.
Install Docker
We will use Docker and Docker Compose for spread LibreOffice.
First, Install curly using the command:
apt update && apt install curl -y

Then, run it script automatic installation of Docker by entering:
curl -fsSL get.docker.com | sh
Wait until the installation process is complete.

Install LibreOffice
First, create a new directory for LibreOffice:
mkdir /opt/libreoffice cd /opt/libreoffice

Then, create a Docker Compose file:
apt install nano -y # Jika belum nano docker-compose.yml
Fill in the following configuration:
#
services:
libreoffice:
image: lscr.io/linuxserver/libreoffice:latest
container_name: libreoffice
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Jakarta
volumes:
- ./config:/config
ports:
- 3000:3000
- 3001:3001
shm_size: "1gb"
restart: unless-stopped

Save the file with Ctrl-X, yThen Enter.
Finally, run LibreOffice:
docker compose up -d
Wait for the process spread finished. The first deployment may take a few minutes due to downloading picture LibreOffice.

NGINX (Reverse Proxy) Configuration
LibreOffice requires an encrypted connection using HTTPS for security. So that we can access URLs with HTTPS via domains such as https://libreoffice.tutorial.mdinata.my.idwe can use reverse proxy like NGINX.
First, install NGINX via command:
# Hapus Apache2 dan pendukungnya (biasanya terpasang secara bawaan di VPS OpenVZ) apt purge apache2* -y # Install NGINX apt install nginx -y

Create a new host configuration specifically for LibreOffice:
nano /etc/nginx/sites-available/libreoffice
Then paste the following configuration:
#
server {
listen 80;
server_name libreoffice.tutorial.mdinata.my.id;
location / {
proxy_pass
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_redirect off;
proxy_buffers 8 32k;
proxy_buffer_size 64k;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
}
}
Change libreoffice.tutorial.mdinata.my.id with your domain.

Activate the configuration by:
ln -sf /etc/nginx/sites-available/libreoffice /etc/nginx/sites-enabled/ # Restart NGINX systemctl restart nginx
Generate SSL Certificate (Let’s Encrypt)
In order for our domain to be accessible via HTTPS, we need to create an SSL certificate. We can use a free SSL certificate from Let’s Encrypt via Certbot.
Install Certbot and its NGINX plugin use the command:
apt install python3-certbot python3-certbot-nginx

So, produce certificate via Certbot with command
certbot --nginx -d libreoffice.tutorial.mdinata.my.id
Change libreoffice.tutorial.mdinata.my.id with your domain.

Happy! LibreOffice can currently be accessed via a secure HTTPS connection.
Access LibreOffice
LibreOffice can be accessed through your previous domain. Example: https://libreoffice.tutorial.mdinata.my.id.

Cover
That’s it for this article about the steps to install LibreOffice on a NAT VPS.
If you are confused or in doubt, don’t hesitate to ask in the Telegram group @IPv6Indonesia. Thank You!
News
Berita
News Flash
Blog
Technology
Sports
Sport
Football
Tips
Finance
Berita Terkini
Berita Terbaru
Berita Kekinian
News
Berita Terkini
Olahraga
Pasang Internet Myrepublic
Jasa Import China
Jasa Import Door to Door