LibreOffice is a free office suite with a word processor (Writer), spreadsheet (Calc), presentation software (Impress), drawing program (Draw), formula editor (Math), and database program (Base). It can also open and save Microsoft Office files such as .docx, .xlsx, and .pptx. Normally, you install LibreOffice on your own PC.
The LibreOffice One-Click App brings this exact desktop version to your VPS. It runs there in a container with a small Linux desktop that you control remotely in your browser. Open a website and work with the real LibreOffice, from any computer and without installing anything. Your documents stay on your server.
Important distinction: the app is not an online office for multiple people like Google Docs, Collabora Online, or Nextcloud Office. There are no user accounts and no collaborative editing of a document. If you want to work on the same files with others, see the section “LibreOffice in your browser or online office?” for the right option.
If you only need the program for your own PC, you don’t need a server: LibreOffice for Windows, macOS, and Linux is free at libreoffice.org.
In this guide, we’ll show you two ways to get started: the easy way, as a One-Click App that makes LibreOffice available in just a few minutes over HTTPS with password protection, and a manual installation with Docker Compose. Then you’ll learn how to edit and save documents and transfer them between your computer and the server.
LibreOffice in your browser on a VPS is a good fit if:
- You work on computers where you can’t or aren’t allowed to install anything, such as a work laptop, tablet, or someone else’s PC. A current browser is all you need.
- You want your documents to stay in one place. They’re stored on your server instead of being spread across USB drives and multiple devices.
- You need a full office suite, for example, for macros, mail merges, pivot tables, or Base databases that online editors often don’t support.
- Your own device has limited performance. The server does the processing; your device only displays the screen.
The One-Click App is less suitable if several people need to work on documents at the same time or if you want to write offline. Without an internet connection to the server, the browser window stays blank.
People looking for “LibreOffice on a server” often mean different things. Here’s how the options compare:
| LibreOffice in your browser (this guide) | Online office in Nextcloud | LibreOffice on your own PC | |
|---|---|---|---|
| What it is | the desktop version, controlled remotely in a browser | web editor in your cloud (e.g. Nextcloud Office) | standard installation |
| Multiple people | one shared session, no accounts | individual accounts, collaborative editing | no |
| Features | full LibreOffice feature set | limited to editing in a browser | full LibreOffice feature set |
| Works offline | no | no | yes |
If you want to share and collaboratively edit documents with others, your own cloud is a better option. Find out how to set one up in Set Up Nextcloud on a Linux Server. The LibreOffice One-Click App, on the other hand, is your personal office workspace in a browser.
The quickest way to get LibreOffice is through your VPS’s One-Click Apps. With a domain, the app is directly accessible over HTTPS and protected by a login. You don’t need a reverse proxy, certificate, or firewall rules.
- A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set Up One-Click Apps to learn how.
- Enough storage: The image includes a complete Linux desktop, LibreOffice, and more than 100 language packs, and is around 3.7 GB in size. Allow for at least 10 GB of free storage, including your documents.
- Enough memory: On our test VPS, the container used around 250 MB of RAM with a session open; large spreadsheets and presentations require more. You’ll be on the safe side with 2 GB of free RAM.
- Open your VPS in the ZapX dashboard and switch to the One-Click Apps tab.
- Search the app catalog for LibreOffice and click Install app.
- Use a custom subdomain or zap.cloud is already selected, with a randomly generated name. Leave the option enabled or enter your own name, for example,
office. - Under App configuration, you’ll see
PUID,PGID, andTZ. You don’t need to change anything. To set the time zone to Germany, enterEurope/BerlinforTZ. The installation generates a username and password for the login automatically; you’ll find them under Automatically generated values. - Click Queue installation.
The first startup takes a few minutes because of the large image. After that, the app card shows Online.
LibreOffice is protected by a username and password. The installation generates both automatically:
- Click the gear icon on the app card and open App environment.
- Under Automatically generated values, you’ll find
SERVICE_USER_LIBREOFFICE(username) andSERVICE_PASSWORD_LIBREOFFICE(password). Click the eye icon to show them, or the adjacent icon to copy them. - Open LibreOffice using the Access link on the app card. Your browser will ask for a username and password. Enter both values.
The app can’t be accessed without logging in; every request returns a 401 error. After logging in, you’ll see a desktop with icons for LibreOffice, LibreOffice Writer, LibreOffice Calc, LibreOffice Impress, LibreOffice Draw, LibreOffice Math, and LibreOffice Base. Double-click an icon to start the program.
Anyone who can log in can do more than view and edit your documents. According to the image project, the desktop also includes a terminal with sudo and no password, which gives root privileges inside the container. Only share the login credentials with people you trust, and store them in a password manager.
The image includes the German language pack, but the interface starts in English. Here’s how to switch it:
- Open a program, such as LibreOffice Writer.
- Go to Tools > Options > Language Settings > Languages.
- Under User interface, select German, and under Locale setting, select German (Germany). This also sets the date and number formats correctly.
- Click OK and restart LibreOffice if prompted.
The setting is stored in the /config folder and is retained across restarts and updates. Your keyboard input is sent directly by the browser, so you can type umlauts and special characters as usual with your German keyboard layout.
Update LibreOffice in the app settings (gear icon), under App update. Click Check for updates and install a new version with Apply update. If the app is up to date, there isn’t a newer version in the app catalog yet. The update replaces the image, while your documents and settings in /config remain intact.
Back up the entire VPS under Backups in the dashboard. It’s also worth keeping a separate copy of your documents, as described in the section “Transfer files between your computer and the server.”
The rest of this guide covers the manual installation of LibreOffice with Docker Compose on your VPS. This is useful, for example, if you don’t use One-Click Apps on your server or want to run LibreOffice behind your own reverse proxy. We’ll use the image from linuxserver.io, which is also used by the One-Click App.
- A Linux VPS running Debian or Ubuntu with SSH access. See First Connection over SSH.
- Docker and Docker Compose (Compose v2). See Install Docker. Check the installation with
docker --versionanddocker compose version. - A domain or subdomain with an A record pointing to your VPS’s IP address (e.g.
office.example.com).
The container runs a Linux desktop, LibreOffice, and a streaming service that sends the screen to your browser. This requires more resources than a typical web app. The figures below are guidelines based on our test:
| Hardware | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU core | 2 vCPU cores |
| RAM | 1 GB | 2 GB |
| Storage | 10 GB | 20 GB |
LibreOffice listens in the container on port 3000 (HTTP) and 3001 (HTTPS with a self-signed certificate). In this guide, you’ll access LibreOffice only through a reverse proxy, so you don’t need to open either port. With ufw, allow only SSH and the ports for the reverse proxy:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Ports published by Docker with ports: can still be accessed externally even if they’re blocked by ufw. So, bind LibreOffice to 127.0.0.1 as shown below. For more on the firewall, see Open Ports and Manage the Firewall.
Create a directory for LibreOffice:
mkdir -p /opt/libreoffice
cd /opt/libreoffice
First, save your login credentials in a .env file. Generate a random password with openssl rand -base64 24:
LO_USER=office
LO_PASSWORD=CHANGE_ME
Replace CHANGE_ME with your password and protect the file with chmod 600 .env. Then create the docker-compose.yml file, for example, with nano docker-compose.yml:
services:
libreoffice:
image: lscr.io/linuxserver/libreoffice:25.8.7
container_name: libreoffice
restart: unless-stopped
shm_size: "1gb"
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
- LC_ALL=de_DE.UTF-8
- CUSTOM_USER=${LO_USER}
- PASSWORD=${LO_PASSWORD}
volumes:
- ./config:/config
ports:
- "127.0.0.1:3000:3000"
Here’s what the important lines do:
image: the LibreOffice image from linuxserver.io at a fixed version. This lets you decide when to update.CUSTOM_USERandPASSWORD: the username and password for logging in through the browser (HTTP Basic Auth). Without these two lines, the desktop is accessible without any login, and anyone with the address could read your documents and gain root privileges in the container through the terminal. The image project considers Basic Auth alone sufficient only on a trusted network. So, always use HTTPS and a long, random password for external access.LC_ALL: according to the image documentation, this starts the session directly in German. If you leave this line out, you can change the language in LibreOffice as described above.shm_size: gives the desktop 1 GB of shared memory. The image documentation recommends this for all desktop images; the Docker default of 64 MB can cause crashes../config:/config: your documents, LibreOffice settings and extensions, and uploaded files are stored here. You’ll back up this folder later.127.0.0.1:3000:3000: LibreOffice is accessible only from the server itself, and externally only through the reverse proxy.
Pull the image and start LibreOffice:
docker compose pull
docker compose up -d
docker compose logs -f libreoffice
LibreOffice is ready when the line [ls.io-init] done. appears in the log. Exit the log view with Strg+C.
Until the reverse proxy is set up, access LibreOffice through an SSH tunnel. Run this on your own PC:
ssh -L 3000:127.0.0.1:3000 root@SERVER_IP
Then open http://localhost:3000 in your browser and log in with the values from .env. You’ll see the same desktop with the LibreOffice programs as with the One-Click App.
To access LibreOffice externally, set up a reverse proxy with a valid certificate in front of it. For the basics, see Set Up a Reverse Proxy with nginx and Create an SSL Certificate (Let's Encrypt). Here’s a server block for nginx:
server {
listen 80;
server_name office.example.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_read_timeout 86400;
client_max_body_size 100M;
}
}
Then obtain the certificate with certbot --nginx -d office.example.com. Certbot adds HTTPS and the HTTP redirect to the block. The Upgrade and Connection lines are important: the screen and input are sent over a WebSocket connection. Without them, the connection won’t be established after login. proxy_read_timeout prevents nginx from disconnecting an idle session after a minute, and client_max_body_size allows larger file uploads.
Only run LibreOffice externally over HTTPS. With plain HTTP, the username and password would be sent unencrypted, and the browser blocks features such as the clipboard.
For more tips on securing your server, see Linux Security Tips.
Everything LibreOffice saves is stored in /opt/libreoffice/config: your documents, LibreOffice settings and extensions, and uploaded files in the Desktop subfolder. Briefly stop the container to create a consistent backup:
cd /opt/libreoffice
docker compose stop
tar czf libreoffice-backup-$(date +%F).tar.gz config docker-compose.yml .env
docker compose start
The file also contains your password from .env. Store it securely and don’t keep it only on the VPS itself.
Back up the config folder first. Then enter the new image version in docker-compose.yml and restart the container:
cd /opt/libreoffice
docker compose pull
docker compose up -d
docker image prune
Available versions are listed on the image release page. Your data in the config folder is retained during the update. docker image prune then removes the old image and frees up a few GB of storage.
Once set up, you can work in LibreOffice just as you would on your own PC. A few things work differently on the server.
LibreOffice saves everything in the container, not on your computer. So, the Save dialog shows the container’s folders. It’s best to create a separate folder for your documents under /config, such as /config/Documents. Everything under /config is retained across restarts and updates; files outside this folder are lost during the next update.
When saving, choose a format as usual. The open OpenDocument format (.odt, .ods, .odp) is LibreOffice’s default. If you’re sharing files with people using Microsoft Office, go to File > Save As and choose the Word format (.docx) or Excel format (.xlsx) as the file type. To create a PDF, choose File > Export as PDF.
The browser interface is provided by Selkies, a tool for remote desktops in a browser. You’ll see a narrow tab along the left edge of the screen. Click it to open a sidebar:
- FILES > Upload Files uploads files from your computer to the container. They’re placed in
/config/Desktopand appear as icons on the desktop. Open them with a double-click or through File > Open in LibreOffice. - FILES > Download Files downloads files from the container to your computer, such as a finished PDF.
- CLIPBOARD is useful if copying and pasting between your computer and LibreOffice doesn’t work directly.
- Under SCREEN SETTINGS and VIDEO SETTINGS, you can adjust the resolution and image quality, for example, if your connection is slow.
For transferring many files at once, SFTP is more convenient:
- One-Click App: The data is stored in the app’s Docker volume. Connect over SFTP as
rootand find it under/var/lib/docker/volumes/, in the folder ending in_libreoffice-config, and then in_data. - Manual installation: The files are in
/opt/libreoffice/config.
Files you upload as root initially belong to root. If LibreOffice can only open one of these files as read-only, restart the app once. When it starts, the container sets the permissions in /config for its own user.
- One session for everyone: Anyone who logs in with the same credentials sees and controls the same desktop. There are no separate accounts or collaborative editing. For that, a cloud service such as Nextcloud with an online office is a better fit.
- A screen, not a web page: The server streams the screen as video. Depending on your connection, input may respond with a slight delay, and the image may become blurry on a weak network. A data center near you and a stable connection can help.
- Online only: You can’t access your documents without an internet connection to the server.
- Browser keyboard shortcuts: Your browser intercepts some shortcuts, such as
Strg+W,Strg+T, orStrg+N, before they reach LibreOffice. Use the menus instead. - Printing: LibreOffice runs on the server and doesn’t directly use the printer connected to your computer. The most reliable option is to export the document as a PDF, download it, and print it locally.
With LibreOffice on a VPS, you have a full office suite ready to use in any browser without installing anything on your device. Your documents stay on your server, protected by a username and password. For a team that needs to collaborate on documents, a cloud service such as Nextcloud with an online office is a better option.
Prefer to avoid the manual Docker setup? Choose the easy One-Click App option described above in “Easy option: LibreOffice as a One-Click App.”
