8.2.17 Installation Outline Wiki

The Host Banner Outline wiki

Outline is a modern open-source Wiki platform with a convenient editor and built-in collaboration features. It is perfect for teams that need their own internal Wiki without relying on third-party SaaS services. With Docker Compose you can deploy Outline, PostgreSQL and Redis in an isolated environment in just a few minutes.

Advantages

  • Rapid deployment with no complex environment setup
  • Service isolation and easy scaling
  • Full control over your team’s documentation

Server preparation

Requirements

  • A VPS or Dedicated server
  • At least 2 CPU, 2 GB RAM, 10 GB SSD
  • Root access or a user with sudo rights
  • Docker and Docker Compose installed beforehand (see our guide)

Variables to replace

  • SECRET_KEY — a 32-character random HEX key generated with openssl rand -hex 32; used for the SECRET_KEY variable
  • UTILS_SECRET — another 32-character random HEX key for the UTILS_SECRET variable
  • YOUR_DOMAIN — your domain name; appears in the URL variable, the server_name directive in Nginx, and when running Certbot

First, create the project directory and enter it:

mkdir ~/outline && cd ~/outline

Generate secure keys for the next step and save them:

openssl rand -hex 32  # for SECRET_KEY
openssl rand -hex 32  # for UTILS_SECRET

opensslrand-hex

Now create the docker-compose.yml file with the basic settings for your service:

version: '3'
services:
  outline:
    image: outlinewiki/outline
    environment:
      - DATABASE_URL=postgres://outline:outline@db:5432/outline
      - REDIS_URL=redis://redis:6379
      - SECRET_KEY=SECRET_KEY
      - UTILS_SECRET=UTILS_SECRET
      - URL=http://YOUR_DOMAIN
      - PGSSLMODE=disable
    ports:
      - "3000:3000"
    depends_on:
      - db
      - redis
    restart: always

  db:
    image: postgres:15
    environment:
      - POSTGRES_USER=outline
      - POSTGRES_PASSWORD=outline
      - POSTGRES_DB=outline
    volumes:
      - outline-db:/var/lib/postgresql/data
    restart: always

  redis:
    image: redis:7
    restart: always

volumes:
  outline-db:

Domain replacement: substitute your own domain or IP-address of your server for YOUR_DOMAIN in the URL variable.

Starting the containers

docker compose up -d

Make sure all services are running:

docker compose ps

Checking the Outline container

Note: if outline stays in health: starting for more than 1–2 minutes, inspect the logs:

docker compose logs -f outline

If you see The server does not support SSL connections, add PGSSLMODE=disable to the environment variables.

Installing Nginx as a reverse proxy

Install Nginx:

sudo apt install -y nginx

install_nginx

Create a site configuration:

sudo nano /etc/nginx/sites-available/outline
server {
    listen 80;
    server_name YOUR_DOMAIN ;

    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Enable the site and reload Nginx:

sudo ln -s /etc/nginx/sites-available/outline /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx

nginx-t

To secure the connection, set up Let’s Encrypt with Certbot:

sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d YOUR_DOMAIN

For detailed instructions, see our Let’s Encrypt guide.

Verifying the deployment

Open http://YOUR_DOMAIN (or https:// if SSL is configured) and follow the on-screen steps to create the first user.

Welcome interface

Common issues
Issue Cause Solution
Error: connect ECONNREFUSED Redis or PostgreSQL not running Check docker compose ps, restart: docker compose up -d
Invalid SECRET_KEY Key too short or missing Generate a new openssl rand -hex 32 and recreate the container
Nginx 502 error App not running or wrong port Ensure outline runs on TCP port 3000 and the port is properly mapped