{"id":1103,"date":"2026-11-17T03:00:00","date_gmt":"2026-11-17T03:00:00","guid":{"rendered":"https:\/\/vpslake.com\/blog\/?p=1103"},"modified":"2026-11-17T03:00:00","modified_gmt":"2026-11-17T03:00:00","slug":"install-docmost-docker-almalinux-10","status":"publish","type":"post","link":"https:\/\/vpslake.com\/blog\/2026\/11\/17\/install-docmost-docker-almalinux-10\/","title":{"rendered":"How to Install Docmost Using Docker on AlmaLinux 10"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Install Docmost using Docker on AlmaLinux 10 with PostgreSQL, Redis, and automatic HTTPS from Caddy. With a domain already pointed at your VPS, the setup takes about ten minutes and ends at Docmost\u2019s workspace creation screen.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>A 64-bit AlmaLinux 10 VPS with at least 2 GB of RAM and 10 GB of free disk space.<\/li>\n\n\n<li>SSH access as <code>root<\/code>, or a normal Linux account with working <code>sudo<\/code> privileges.<\/li>\n\n\n<li>A domain such as <code>YOUR_DOMAIN<\/code> with an A record pointing to <code>SERVER_IP<\/code>. Caddy needs public DNS and inbound ports 80 and 443 to issue a certificate.<\/li>\n\n\n<li>Outbound HTTPS access to Docker Hub and Docker\u2019s RPM repository.<\/li>\n\n\n<li>A <a href=\"https:\/\/vpslake.com\/buy-vps\">VPSLake Linux VPS<\/a> if you need an AlmaLinux server with root access.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The commands use <code>sudo<\/code> for a normal SSH user. If you are logged in as <code>root<\/code>, remove <code>sudo<\/code>. This guide uses AlmaLinux\u2019s DNF and firewalld, not Ubuntu\u2019s <code>apt<\/code> and <code>ufw<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Confirm AlmaLinux 10 and update the server<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Confirming the release first prevents you from using a repository intended for another Enterprise Linux version.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>. \/etc\/os-release\nprintf '%s\\n' \"$PRETTY_NAME\"\nuname -m\nsudo dnf upgrade -y<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The first two checks should identify AlmaLinux 10 and a 64-bit architecture:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AlmaLinux 10.x (Cerulean Lion)\nx86_64<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The exact minor version changes as updates arrive. Fix any DNF mirror, DNS, or signature error before continuing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Install Docker Engine and Compose<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Docker Engine runs the containers, while the Compose plugin starts Docmost, PostgreSQL, Redis, and Caddy as one application stack.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If this is a fresh VPS, remove packages that can conflict with Docker\u2019s container runtime. On a host already running Podman workloads, inspect those workloads before removing anything.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf remove -y docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add Docker\u2019s RHEL-compatible repository. Docker lists RHEL 10 as supported, and this repository method is the appropriate package path for AlmaLinux 10; see the official <a href=\"https:\/\/docs.docker.com\/engine\/install\/rhel\/\" target=\"_blank\" rel=\"noopener\">Docker Engine RHEL instructions<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y dnf-plugins-core ca-certificates\nsudo dnf config-manager --add-repo https:\/\/download.docker.com\/linux\/rhel\/docker-ce.repo\nsudo dnf makecache\nsudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\nsudo systemctl enable --now docker<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check that the daemon and Compose plugin are available:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl is-active docker\nsudo docker version --format 'Client {{.Client.Version}} \/ Server {{.Server.Version}}'\nsudo docker compose version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output is similar to this, although patch versions will change:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>active\nClient 29.x.y \/ Server 29.x.y\nDocker Compose version v2.x.y<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Allow your SSH user to manage Docker<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Docker\u2019s Unix socket is root-owned by default. Adding only your trusted administration account to the <code>docker<\/code> group avoids repeated <code>sudo<\/code> prompts, but that membership provides root-equivalent control of the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run this for a normal SSH account, replacing the placeholder with that account\u2019s name. Skip it if you will deliberately run Docker as <code>root<\/code> or always use <code>sudo<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -aG docker YOUR_LINUX_USER<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Log out of SSH and reconnect, then check the group membership:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>id -nG\ndocker info --format 'Server {{.ServerVersion}}'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The group list should include <code>docker<\/code>, and the second command should print the Engine version. Until you reconnect, use <code>sudo docker<\/code> and <code>sudo docker compose<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Create secure Docmost settings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Docmost needs a long application secret and one matching PostgreSQL password in two services. Generating both values as hexadecimal strings avoids URL-encoding problems inside <code>DATABASE_URL<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y openssl\nopenssl rand -hex 32\nopenssl rand -hex 24\nsudo mkdir -p \/opt\/docmost\ncd \/opt\/docmost\nsudo vi .env<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In <code>vi<\/code>, create the file below. Replace every uppercase value with the corresponding output or your real domain; do not leave the example values in place.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>APP_URL=https:\/\/YOUR_DOMAIN\nAPP_SECRET=REPLACE_WITH_64_HEX_CHARACTERS\nDB_PASSWORD=REPLACE_WITH_48_HEX_CHARACTERS<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save the file and restrict it because it contains the database credential:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chmod 600 \/opt\/docmost\/.env<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>APP_URL<\/code> must match the HTTPS address people will use. The current <a href=\"https:\/\/docmost.com\/docs\/installation\" target=\"_blank\" rel=\"noopener\">Docmost installation documentation<\/a> requires an application secret of at least 32 characters and uses the same PostgreSQL and Redis connection pattern.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Define Docmost and its HTTPS reverse proxy<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Compose file keeps PostgreSQL and Redis on Docker\u2019s private network, binds Docmost itself to loopback, and lets Caddy handle public HTTP, HTTPS, certificates, and WebSockets.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create the Caddy configuration first:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vi \/opt\/docmost\/Caddyfile<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use this content, replacing <code>YOUR_DOMAIN<\/code> with the same hostname from <code>.env<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>YOUR_DOMAIN {\n    reverse_proxy docmost:3000\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now create <code>\/opt\/docmost\/docker-compose.yml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vi \/opt\/docmost\/docker-compose.yml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Paste this configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>services:\n  caddy:\n    image: caddy:2\n    ports:\n      - \"80:80\"\n      - \"443:443\"\n    volumes:\n      - .\/Caddyfile:\/etc\/caddy\/Caddyfile:ro\n      - caddy_data:\/data\n      - caddy_config:\/config\n    depends_on:\n      - docmost\n    restart: unless-stopped\n\n  docmost:\n    image: docmost\/docmost:latest\n    depends_on:\n      - db\n      - redis\n    environment:\n      APP_URL: ${APP_URL}\n      APP_SECRET: ${APP_SECRET}\n      DATABASE_URL: postgresql:\/\/docmost:${DB_PASSWORD}@db:5432\/docmost\n      REDIS_URL: redis:\/\/redis:6379\n    ports:\n      - \"127.0.0.1:3000:3000\"\n    restart: unless-stopped\n    volumes:\n      - docmost:\/app\/data\/storage\n\n  db:\n    image: postgres:18\n    environment:\n      POSTGRES_DB: docmost\n      POSTGRES_USER: docmost\n      POSTGRES_PASSWORD: ${DB_PASSWORD}\n    restart: unless-stopped\n    volumes:\n      - db_data:\/var\/lib\/postgresql\n\n  redis:\n    image: redis:8\n    command: [\"redis-server\", \"--appendonly\", \"yes\", \"--maxmemory-policy\", \"noeviction\"]\n    restart: unless-stopped\n    volumes:\n      - redis_data:\/data\n\nvolumes:\n  docmost:\n  db_data:\n  redis_data:\n  caddy_data:\n  caddy_config:<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>127.0.0.1<\/code> binding means the application is reachable by Caddy and local health checks, but it is not directly exposed as an unauthenticated port 3000 service. The named volumes preserve pages, uploads, PostgreSQL data, Redis persistence, and Caddy\u2019s certificate state across container recreation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Open firewalld and start the stack<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Only Caddy\u2019s web ports need to be reachable from the internet; firewalld blocks direct access to the private application port.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable --now firewalld\nsudo firewall-cmd --permanent --add-service=http\nsudo firewall-cmd --permanent --add-service=https\nsudo firewall-cmd --reload\nsudo firewall-cmd --list-services<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see <code>http<\/code> and <code>https<\/code> in the service list. Validate the Compose syntax before pulling images or creating containers:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/opt\/docmost\nsudo docker compose config --quiet\nsudo docker compose pull\nsudo docker compose up -d\nsudo docker compose ps<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The configuration check is silent when valid. After the image downloads, all four services should show <code>Up<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NAME                 SERVICE   STATUS    PORTS\ndocmost-caddy-1      caddy     Up        0.0.0.0:80-&gt;80\/tcp, 0.0.0.0:443-&gt;443\/tcp\ndocmost-docmost-1    docmost   Up\ndocmost-db-1         db        Up\ndocmost-redis-1      redis     Up<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Container names may differ if Docker Compose chooses a different project name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify the Docmost installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First test the application health endpoint through HTTPS. This confirms DNS, Caddy\u2019s certificate, the reverse proxy, and Docmost\u2019s HTTP service in one request.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsS -o \/dev\/null -w 'HTTP %{http_code}\\n' https:\/\/YOUR_DOMAIN\/api\/health<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HTTP 200<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open <code>https:\/\/YOUR_DOMAIN<\/code> in a browser. The Docmost setup page should appear; enter a workspace name, administrator name, email address, and a strong login password, then create the workspace. After setup, open the dashboard and create a test page to confirm that storage and the editor work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a final service check, view recent logs without following them indefinitely:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/opt\/docmost\nsudo docker compose logs --tail=30 caddy docmost db redis<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The logs should not show a repeating restart loop, database authentication failure, or certificate error.<\/p>\n\n\n\n<aside class=\"vl-element vl-cta-banner\" aria-label=\"Host Docmost securely\">\n\t<div class=\"vl-cta-banner__content\">\n\t\t<p class=\"vl-cta-banner__eyebrow\">AlmaLinux VPS<\/p>\n\t\t<h3 class=\"vl-cta-banner__title\">Host Docmost securely<\/h3>\n\t\t<p class=\"vl-cta-banner__text\">Deploy a Docker-ready AlmaLinux VPS for your private documentation workspace.<\/p>\n\t<\/div>\n\t<a class=\"vl-cta-banner__button\" href=\"\/buy-vps\" aria-label=\"View Linux VPS plans\">View Linux VPS plans<\/a>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>APP_SECRET must be longer than or equal to 32 characters<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The placeholder is still in <code>.env<\/code>, or the generated secret was truncated while copying it. Run <code>openssl rand -hex 32<\/code> again, replace <code>APP_SECRET<\/code>, and recreate only the application container:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/opt\/docmost\nsudo docker compose up -d --force-recreate docmost\nsudo docker compose logs --tail=40 docmost<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Caddy cannot obtain an HTTPS certificate<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The domain may not resolve to this server yet, or an upstream firewall\/security group may block ports 80 or 443. Confirm the A record, verify firewalld lists <code>http https<\/code>, and test from outside the VPS; do not switch to a self-signed certificate for a public workspace.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>502 Bad Gateway<\/code> at the domain<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Caddy is running but Docmost has not finished starting or the app container exited. Check the dependency and application logs, then restart the stack after correcting the reported error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/opt\/docmost\nsudo docker compose ps\nsudo docker compose logs --tail=80 docmost db redis\nsudo docker compose restart<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><code>password authentication failed for user \"docmost\"<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>DB_PASSWORD<\/code> in <code>.env<\/code> does not match the password stored in an already-initialized PostgreSQL volume, commonly because it was changed after the first startup. Restore the original value in <code>.env<\/code>; do not use <code>docker compose down -v<\/code> on a server containing data because removing the volume deletes the database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hardening and maintenance<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Keep port 3000 bound to <code>127.0.0.1<\/code> and expose only Caddy\u2019s HTTPS endpoint. Do not publish PostgreSQL or Redis ports.<\/li>\n\n\n<li>Back up the <code>docmost<\/code>, <code>db_data<\/code>, <code>redis_data<\/code>, <code>caddy_data<\/code>, and <code>caddy_config<\/code> volumes before upgrades or host maintenance.<\/li>\n\n\n<li>Review image changes before applying them in production. For a planned update, run <code>sudo docker compose pull<\/code> followed by <code>sudo docker compose up -d<\/code> from <code>\/opt\/docmost<\/code>.<\/li>\n\n\n<li>Keep <code>.env<\/code> readable only by root and use a different long password for the Docmost administrator account.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Can I install Docmost without a domain?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can test Docmost over an IP address by changing <code>APP_URL<\/code> and publishing port 3000, but that removes automatic HTTPS and is not a good public deployment. A domain pointing to the VPS lets Caddy issue a trusted certificate and supports secure WebSocket connections.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why are PostgreSQL and Redis included?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PostgreSQL stores Docmost\u2019s structured application data, while Redis provides the supporting cache and real-time infrastructure. Compose keeps both services on an internal network, so neither database is directly reachable from the internet.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Where does Docmost keep uploaded files?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>docmost<\/code> named volume maps to <code>\/app\/data\/storage<\/code> inside the application container. PostgreSQL data is in <code>db_data<\/code>, Redis persistence is in <code>redis_data<\/code>, and Caddy keeps certificates in <code>caddy_data<\/code>; back up these volumes as part of the same recovery plan.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I stop Docmost temporarily?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">From <code>\/opt\/docmost<\/code>, run <code>sudo docker compose stop<\/code> to stop the containers without deleting volumes. Start them again with <code>sudo docker compose start<\/code>; your workspace data remains on the named volumes.<\/p>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Can I install Docmost without a domain?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"You can test Docmost over an IP address by changing `APP_URL` and publishing port 3000, but that removes automatic HTTPS and is not a good public deployment. A domain pointing to the VPS lets Caddy issue a trusted certificate and supports secure WebSocket connections.\"}}, {\"@type\": \"Question\", \"name\": \"Why are PostgreSQL and Redis included?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"PostgreSQL stores Docmost\u2019s structured application data, while Redis provides the supporting cache and real-time infrastructure. Compose keeps both services on an internal network, so neither database is directly reachable from the internet.\"}}, {\"@type\": \"Question\", \"name\": \"Where does Docmost keep uploaded files?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"The `docmost` named volume maps to `\/app\/data\/storage` inside the application container. PostgreSQL data is in `db_data`, Redis persistence is in `redis_data`, and Caddy keeps certificates in `caddy_data`; back up these volumes as part of the same recovery plan.\"}}, {\"@type\": \"Question\", \"name\": \"How do I stop Docmost temporarily?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"From `\/opt\/docmost`, run `sudo docker compose stop` to stop the containers without deleting volumes. Start them again with `sudo docker compose start`; your workspace data remains on the named volumes.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Install Docmost using Docker on AlmaLinux 10 with PostgreSQL, Redis, Caddy HTTPS, firewalld rules, verification, and common fixes in minutes.","protected":false},"author":1,"featured_media":1104,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[5,9],"tags":[91,118,138,139],"class_list":["post-1103","post","type-post","status-publish","format-standard","has-post-thumbnail","category-guides","category-vps-hosting","tag-almalinux-10","tag-docker","tag-docmost","tag-self-hosting","cs-entry"],"_links":{"self":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/comments?post=1103"}],"version-history":[{"count":1,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1103\/revisions"}],"predecessor-version":[{"id":4073,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1103\/revisions\/4073"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media\/1104"}],"wp:attachment":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media?parent=1103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/categories?post=1103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/tags?post=1103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}