Self-hosted
Layers on your server
Disk with documents and spreadsheets edited in the browser, pages, forms, projects, chat, calls, mail and calendar on your own machine. One command, under 3 minutes to the first sign-in (measured on 2 cores and 4 GB).
The image is on Docker Hub, no registry sign-in.
14 days on your server for up to 5 people · no card · no call
€5 per user per month or €50 per user per year
Closed network: the licence check is offline, in every plan.
Install Full guide Buy a key Write to us
Version 3.0.1 · 14 Nov 2026 · Docker Hub
Updating is the same command: run it again.
60 seconds out of 4:17, sped up: clean Ubuntu 22.04, 2 CPU cores and 4 GB, the command from the email with a trial key, the owner signs in, two colleagues join by one link. From the command to “licence active”: 2 min 57 s.
What gets installed
Eight services, one file
Everything is in one docker-compose.yml, and you do not edit it. Your settings live next to it, in a file named .env, which step 3 writes for you.
Layers
hissih/layers:3.0.1
The application itself: workspaces, API, files. The same image also prepares the database on the first start.
PostgreSQL
pgvector/pgvector:pg16
The database. Its files stay in /opt/layers/data on your server.
Redis
redis:7-alpine
Fast storage for sessions and queues.
LiveKit
TCP 7881 · UDP 7882 · UDP 3478
Calls and screen sharing, with a built-in TURN server for office networks where only port 443 is open.
Caddy
TCP 80 · UDP 443
The web server. It obtains and renews the HTTPS certificates by itself.
entry443
TCP 443
The front door on port 443: it passes the site to the web server and calls from closed networks to the calls server, without decrypting anything.
a4 · docx
hissih/sumdoc-webhost
The .docx document editor in the browser: Drive opens files in it, two people edit together. No ports of its own — only through the web server.
f1 · xlsx
hissih/sumsheet-webhost
The .xlsx spreadsheet editor in the browser, also through Drive and the web server. It takes and saves the file through Layers with the rights of the person who opened it.
Linux x86-64 and Docker
Tested on Ubuntu 22.04 and 24.04; Ubuntu 22.04+ or Debian 12+ will do. Docker 24 or newer with docker compose; the installer or step 1 installs it.
Memory: 4 GB minimum, 8 GB recommended
With the document and spreadsheet editors 4 GB is the minimum: on 4 GB, two people editing together and 2–4 open files; for a team, 8 GB. Tested on 15 Nov on a clean 2-core, 4 GB machine: after two people edited a document and a spreadsheet, all services at rest take about 2.2 GB (Layers 1.4 GB, the spreadsheet editor 320 MB, the document editor 190 MB, the database 220 MB). How many documents are open in the editors at once is set by EDITOR_MAX_DOCS in .env (6 by default); on a machine with less than 4 GB the installer writes EDITOR_MAX_DOCS=2 itself. The Layers service itself needs at least 1.5 GB: with 1 GB it does not come up — the start command waits about seven minutes and answers “unhealthy”.
Disk: 25 GB, 2 cores
The first download is about 1.7 GB: eight images from Docker Hub, the editors included. On disk they take 4.3 GB, the editors 1.8 GB of it. Right after the start a clean Ubuntu 22.04 machine has about 6 GB of disk in use, the system included; the database and people’s files grow from there.
Two names and five ports
Two A records pointing at the server: layers.example.com and turn.layers.example.com. Open ports 80 and 443 (TCP and UDP); for calls also TCP 7881, UDP 7882 and UDP 3478. With only 80 and 443 open, calls still work through 443.
Way 1 — one command
The command from your key letter
The letter with your key (trial or paid) contains a ready install line with your key and installation ID. Run it on a server with Ubuntu 22.04+ or Debian 12+: the installer checks the machine, offers to install Docker, asks for the address, writes .env, puts the key in place and starts the server — about 3 minutes. You can check the key first without changing anything. Want to see every command? Way 2, the steps below.
curl -fsSL https://layers.md/self-hosted/install.sh | sh -s -- --key key-from-the-letter --instance ent-… curl -fsSL https://layers.md/self-hosted/install.sh | sh -s -- --check-key key-from-the-letter Installation
Way 2 — step by step, from an empty server to a working one
Every command is here; nothing needs to be invented. Passwords and keys are generated by step 3. Replace layers.example.com with your own name.
- 1
Install Docker
About a minute. If Docker 24 or newer with
docker composeis already there, skip this step.Terminalsudo apt-get update && sudo apt-get install -y docker.io docker-compose-v2 - 2
Download the compose file
Create the directory and download docker-compose.yml into it. You do not need to edit the file.
Check:
ls /opt/layersshowsdocker-compose.yml.Terminalsudo mkdir -p /opt/layers && cd /opt/layers sudo curl -fsSLO https://layers.md/self-hosted/docker-compose.yml - 3
Write the settings
Replace
layers.example.comon the second line with your own name and run the whole block. It creates.envwith your address and random passwords and answers with one line:Done: .env written for …. If.envalready exists, the block leaves it alone: those are the keys of a running server.If the key letter has arrived, add its two lines to
.env, as in the second box:LICENSE_KEY=— the key as one line,LAYERS_INSTANCE_ID=— the installation ID from the letter (likeent-…). Without the installation ID the server will not take the key as its own. No key yet — skip this; it can be added later (step 8). Keep a copy of.envsomewhere safe: without it the server cannot be restored from a backup.Terminalcd /opt/layers DOMAIN=layers.example.com if sudo test -e .env; then echo ".env already exists - the server is set up, skip this step"; else sudo tee .env >/dev/null <<EOF DOMAIN=$DOMAIN DB_PASSWORD=$(openssl rand -hex 16) REDIS_PASSWORD=$(openssl rand -hex 16) APP_JWTSECRET=$(openssl rand -hex 32) AUDIT_SECRET=$(openssl rand -hex 32) SECRETCHATS_SERVER_ID=$(cat /proc/sys/kernel/random/uuid) LIVEKIT_API_KEY=lk$(openssl rand -hex 6) LIVEKIT_API_SECRET=$(openssl rand -hex 24) ADMIN_PASSWORD=$(openssl rand -hex 16) EOF sudo chmod 600 .env; echo "Done: .env written for $DOMAIN"; fiTwo lines from the letter — if you have the keycd /opt/layers echo "LICENSE_KEY=key-from-the-letter" | sudo tee -a .env >/dev/null echo "LAYERS_INSTANCE_ID=ent-…" | sudo tee -a .env >/dev/null - 4
Start
The command pulls the images from Docker Hub (about 1.7 GB; 4.3 GB on disk, Layers itself,
hissih/layers:3.0.1, 1.5 GB of it), starts the database, Layers, the calls server, the document and spreadsheet editors and the web server, prepares the database and returns when everything is up. On a clean machine (2 cores, 4 GB) the installer with the editors took 160 seconds, download included.Terminalcd /opt/layers && sudo docker compose up -d - 5
Check
Expected:
layersishealthy,prepareandmigrateareExited (0). The last line is one of two, both mean “the database is ready”:migrate: the server keeps the database up to date itself …, nothing to doormigrate: mode=fresh, applied ….While
migrateis stillUp, wait a minute and check again. After a reboot of the machine Layers comes back by itself in a minute or two.Terminalsudo docker compose ps -a sudo docker compose logs migrate | tail -1 - 6
Sign in for the first time
Open
https://your-name/register, enter an e-mail and a password and press “Sign up”. You land in your own workspace as its owner. “Connect” → “Favorites” — you can send the first message right away.No e-mail confirmation is needed: until mail is set up, the server simply sends no letters.
Browserhttps://layers.example.com/register - 7
Invite colleagues
“Invite” → “Via link” → “One link for the whole team” — one link for the whole team: post it in a shared chat. It lets in as many people as there are free seats in the key (up to 5 during the trial); once they are used up, the link stops working; after buying seats, create a new one. Revoke the link with one click right there or in “Settings → Invitation links”. Need a link for one person? “Create link”: by default it lets in one person and is valid for 24 hours.
A colleague opens the link, enters an e-mail and a password, and is in your workspace right away. If a “Turn on notifications?” box sits in the bottom-left corner, close it first (“Not now”): the “Invite” button is under it.
Someone who registers at
/registeron their own does not join you: they get a separate empty workspace and take one of the seats on the server. - 8
The trial, and the key when you are ready
Without a key the server runs a trial: 14 days, up to 5 people. The server itself reports the rules and what is left — ask it, as on the right.
The key comes by e-mail as the file
license.jws; it is also the text after--keyin the command from the letter and in your account (the account link is in the same letter). Put the file into/opt/layers/license/under that name — the server picks it up within a minute, without a restart. You can also paste the key in God Mode → “Licence”. A server with internet access fetches renewed keys and added seats by itself.Check
node.regime, notmode:full— the key is in force, seats aremaxUsers; akeyProblemfield — the key is not for this installation, the text says what is wrong, and the trial is not lost;read-only— the key or the trial has expired: sign-in, viewing and export work, editing is closed, nothing is deleted. The screen shows “The key has expired” with a “Renew” button.Ask the servercurl -s https://layers.example.com/layers/license/status # {"mode":"MISSING", …, "node":{"regime":"trial","trialDaysLeft":…,"maxUsers":…,"activeUsers":…, # "rules":{"trialDays":…,"trialUsers":…,"renewWarningDays":…,"paymentGraceDays":…}}}Install the keycd /opt/layers sudo cp ~/license.jws license/license.jws # the file from the letter, named license.jws sleep 60 # picked up within a minute, no restart curl -s https://layers.example.com/layers/license/status | grep -o '"regime":"[a-z-]*"' # "regime":"full"
If you installed earlier
Change the administrator panel password
Since 15.11.2026 the installer sets a random password for the administrator panel (God Mode, /godmode) and writes it to /opt/layers/.env as ADMIN_PASSWORD (mode 600); the block in step 3 does the same. On servers installed earlier the panel accepts admin / admin. Close it in one of two ways: run the install command from the email again, or run the command below; the password goes to .env. Checked on a clean 3.0.1 install: afterwards admin / admin is refused, also after a restart; running it again changes nothing.
cd /opt/layers && P=$(openssl rand -hex 16) && T=$(sudo docker compose exec -T layers wget -qO- --post-data "username=admin&password=admin&bearer=true" http://localhost:8080/data/auth/admin/login | sed -n 's/.*"token":"\([^"]*\)".*/\1/p') && [ -n "$T" ] && sudo docker compose exec -T layers wget -qO- --header "Authorization: Bearer $T" --header "Content-Type: application/json" --post-data "{\"current\":\"admin\",\"next\":\"$P\"}" http://localhost:8080/data/auth/admin/password >/dev/null && echo "ADMIN_PASSWORD=$P" | sudo tee -a .env >/dev/null && echo "Done: God Mode password is in /opt/layers/.env (ADMIN_PASSWORD)" cd /opt/layers && sudo docker compose exec -T layers wget -qO- --post-data "username=admin&password=admin" http://localhost:8080/data/auth/admin/login >/dev/null 2>&1 && echo "NOT CLOSED: admin/admin still works" || echo "Closed: admin/admin is refused" Administrator panel
God Mode — only from your network
Since 15.11.2026 the administrator panel (God Mode, /godmode) and its API answer only local networks (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and the machine itself; everyone else gets 403. Pages for people are not affected. Need access from outside — list addresses or networks with --godmode-allow or the line GODMODE_ALLOW in .env; open to everyone — "0.0.0.0/0 ::/0". Keep private_ranges in the list: the list replaces the default, and without that word the local network and the machine itself are closed too. Checked on a clean 3.0.1 install: 403 from outside, the sign-in page from the local network, a second run keeps the list.
curl -fsSL https://layers.md/self-hosted/install.sh | sh -s -- --godmode-allow "private_ranges 203.0.113.7" cd /opt/layers && sudo sed -i '/^GODMODE_ALLOW=/d' .env && echo "GODMODE_ALLOW=private_ranges 203.0.113.7" | sudo tee -a .env >/dev/null && sudo docker compose up -d curl -s -o /dev/null -w "%{http_code}\n" https://layers.example.com/godmode
# 403 No domain yet
A look without your own domain
On a machine with Docker — the server itself or your own computer — write layers.localhost in the second line of step 3 and do the rest as written. Then open the address in a browser on the same machine: names ending in .localhost lead to the machine itself, no DNS records are needed. The certificate is issued by the server itself, so the browser will warn about it; other computers cannot open such a server. For real work you need a domain.
DOMAIN=layers.localhost https://layers.localhost/register Licence
€5 per user per month or €50 per user per year
Trial
14 days
14 days free, up to 5 people; the next person sees why they cannot join and where to buy the key. After the trial, without a key, the server becomes read-only: sign-in and viewing work, editing and sending are closed, data is untouched.
Licence
€5 per user per month
Or €50 per user per year. The key is one line; the number of seats is in the key.
Get the keyThe numbers of the trial come from the server: every server reports its rules at /layers/license/status. Installation, rollout, custom work and support are separate, by agreement, paid.
Comparison with Nextcloud, ONLYOFFICE, Mattermost and others →Memo for IT and security →
If something goes wrong
What the server says and what to do
Each of these answers was reproduced on a test machine. Logs: sudo docker compose logs layers (the server), caddy (HTTPS), livekit (calls), migrate (the database).
| What you see | Why | What to do |
|---|---|---|
required variable … is missing a value | There is no .env file, or a line is missing in it. | Run step 3 in /opt/layers. |
failed to bind host port 0.0.0.0:80/tcp: address already in use | Another web server already uses port 80 or 443. The other services are already running. | Stop it and run the start command again: only the missing service starts. Who holds the port: sudo ss -ltnp 'sport = :80' |
dial tcp …: i/o timeout | The server cannot reach Docker Hub. | Bring the network back and run the start command again: what is already downloaded is kept. If there will be no network, carry the images in as a file — see “Closed network”. |
container layers-layers-1 is unhealthy + java.lang.OutOfMemoryError | Not enough memory. The start command waits about seven minutes before it answers. | Add memory (with the editors 4 GB is the minimum, 8 GB recommended) and run the start command again. People and data stay. |
container … is unhealthy + No space left on device | The disk is full. | Free up space and run the start command again. |
password authentication failed for user "layers", 502 | The .env file was replaced with a new one: its database password is not the one the database was created with. | Put the previous .env back from your copy and start again. People and data stay. Without a copy the database password can be set anew — the command is in the full guide. |
"mode":"INVALID" | The key from the letter was copied with a mistake or not in full. The trial goes on as before. | Put the license.jws file from the letter into /opt/layers/license/ again (or fix the LICENSE_KEY= line in .env — one line, no spaces or line breaks). |
"regime":"read-only" | The key has expired (banner “The key has expired”) or was issued for another installation (banner “This key does not fit this server”, keyProblem in the answer). | “Renew” in your account (link in the letter): the new key is issued for the same installation and the server picks it up by itself. A key of another installation — take this installation’s key in your account. |
| The machine was rebooted or lost power, even in the middle of the installation | Nothing is broken: the services start by themselves. | Wait a minute or two. If the installation was interrupted, run the start command again — it finishes what is left. |
Reproduced on 13 November 2026. An expired key was checked by automated tests only.
Closed network
A server without internet access: images as a file
Download the images and the compose file on a machine with internet access and carry them in as one file. Then follow steps 3–8 as written: the start command uses the images already on the machine. The key is checked on your server, offline.
curl -fsSLO https://layers.md/self-hosted/docker-compose.yml
for i in hissih/layers:3.0.1 pgvector/pgvector:pg16 redis:7-alpine livekit/livekit-server:v1.11 caddy:2-alpine nginx:alpine hissih/sumdoc-webhost:2026.11.03-amd64 hissih/sumsheet-webhost:2026.10.22-amd64; do sudo docker pull $i; done
sudo docker save hissih/layers:3.0.1 pgvector/pgvector:pg16 redis:7-alpine livekit/livekit-server:v1.11 caddy:2-alpine nginx:alpine hissih/sumdoc-webhost:2026.11.03-amd64 hissih/sumsheet-webhost:2026.10.22-amd64 | gzip > layers-images.tar.gz sudo mkdir -p /opt/layers && sudo cp docker-compose.yml /opt/layers/
gunzip -c layers-images.tar.gz | sudo docker load Timed
The run on a clean machine
On 13 November 2026 we walked these steps on a new, empty Ubuntu 24.04, doing only what is written. From the first command to the administrator's first sign-in it took about four minutes.
| Step | Time from the first command |
|---|---|
| Install Docker | 00:00–00:52 |
| Download the compose file | 00:52 |
| Write the settings | 00:52–00:53 |
| Start | 01:14–03:29 |
| Check | 03:30 |
| Sign in for the first time | about 15 seconds more |
The images were already on the machine during this run; downloading them from Docker Hub adds the time your connection needs for 1.7 GB.
Install with AI
Install it together with an AI assistant
Copy the prompt into ChatGPT, Claude or any other assistant. It reads the full guide and walks you through the same eight steps.
The guide for AI and people: layers.md/self-hosted/llms.txt
Help me install Layers on my server. The guide: https://layers.md/self-hosted/llms.txt (full — https://layers.md/self-hosted/llms-full.txt). Walk me through it step by step and ask about my domain first.
Why this way
What you get with your own server
Data stays with you
The database, people's files and the keys live in /opt/layers on your machine.
The key is checked on the server
No licence server and no internet access are needed: the key is verified on the spot.
HTTPS by itself
Certificates are issued at the first start and renewed without you.
Calls from closed networks
A built-in TURN server takes calls on port 443, the same port as the site.
Closed network
The images can be carried in as one file; the server needs no way out.
Survives a reboot
After a reboot or a power loss the services come back by themselves.
Frequently asked questions
Does the server need internet access?
Only to download the images and to obtain the HTTPS certificate. In a closed network the images are carried in as a file, and the key is checked on the server itself.
How much hardware is needed?
Linux x86-64, 2 cores, at least 4 GB of memory (8 GB recommended) and 25 GB of disk. On 4 GB, two people editing together and 2–4 open files; for a team, 8 GB. The first download is about 1.7 GB. On 2 cores and 4 GB, after editing in the editors, the services at rest take about 2.2 GB of memory; right after the start about 6 GB of disk is in use, the system included.
How do I turn on e-mail?
Add your mailbox to .env — MAIL_PROVIDER=smtp, MAIL_HOST, MAIL_PORT, MAIL_USER, MAIL_PASSWORD, MAIL_FROM — and run sudo docker compose up -d. Without these lines Layers works but sends no letters.
How do I update?
With the same install command: run it again. It downloads the current docker-compose.yml and images and applies the new database changes; .env, the database and the files in /opt/layers stay. Make a copy of the database first. If .env pins a version with a LAYERS_IMAGE=… line, remove it or write the new one — otherwise the pinned version stays.
How do I make backups?
The database: sudo docker compose exec -T db pg_dump -U layers -d layersdb -Fc -Z6 | sudo tee backup.dump >/dev/null. People's files: the directory /opt/layers/data/layers. The keys: the .env file and the directory /opt/layers/license.
A call connects, but there is no sound or video
The calls server did not learn its public address. Add NODE_IP=203.0.113.10 (your public address) to .env and run sudo docker compose up -d.
What happens without a key after 14 days?
The server becomes read-only: sign-in, viewing and export work; creating, editing and sending do not. Data is untouched, nothing is deleted or slowed down. With a key everything works in full again.
What is not part of this installation?
Meeting recording is not part of this install. Secret chats are off; the line SECRET_CHATS=true in .env turns them on. Sign-in through SAML, LDAP and SCIM is not supported.
Can people edit documents and spreadsheets together?
Yes. A .docx document and an .xlsx spreadsheet in Drive open in the browser, and Create in Drive offers Document and Spreadsheet. Two people edit one file at once: in a document the second person is offered to join the editing, and each sees the other’s text with a named cursor; in a spreadsheet each sees the cells the other changes. After both close and open it again, both edits are there. A colleague opens a file that was shared with them in Drive. The editors are separate services, a4 (documents) and f1 (spreadsheets), in the same docker-compose.yml. If an editor is stopped or still starting, a page “The document editor is starting” opens in the browser’s language, and the document opens by itself once the editor is ready; the file in Drive is not changed. Checked on 15 Nov by two people on a clean Layers 3.0.1 install.
Bring your team’s work together in Layers
Start free in the cloud — up to 5 people, no time limit — or deploy Layers on your own server.