Installing and Configuring Outline Wiki on VPS: A Complete Guide for Experts
TL;DR
In this detailed guide, we will step-by-step configure Outline Wiki — a modern, convenient, and self-hosted knowledge base — on your Virtual Private Server (VPS). You will learn how to prepare the server, install all necessary components (Docker, PostgreSQL, Redis), deploy Outline, secure it with HTTPS via Caddy, and set up backups and maintenance. By the end of the guide, you will have a fully functional and secure wiki for your team or personal needs.
- Complete installation of Outline Wiki using Docker Compose.
- Configuring secure access via HTTPS with automatic Caddy certificates.
- Optimal VPS requirements and provider selection.
- Basic server protection with Fail2ban and UFW.
- Configuring automatic Outline data backups.
- Troubleshooting tips and system maintenance.
What we are setting up and why
We will be installing and configuring Outline Wiki — an open-source, modern, and intuitive knowledge base designed for teamwork. Outline is positioned as an alternative to Notion, Confluence, or Google Docs, but with an emphasis on self-hosting and full control over data. It is an ideal solution for developers, startups, and small teams who need a centralized platform for documentation, notes, meeting protocols, and knowledge sharing.
Ultimately, you will get a fully functional wiki, accessible via your own domain name, where your team can collaboratively create, edit, and organize information. Outline Wiki offers a clean user interface, Markdown support, integration with Slack (or other messengers), and powerful search, making it an excellent tool for boosting productivity and preserving corporate knowledge.
There are many alternatives on the market, both cloud-based (Notion, Confluence Cloud, Coda) and self-hosted (Wiki.js, BookStack, DokuWiki). Cloud solutions are convenient because they do not require server setup and maintenance, but you are tied to the provider, its pricing policy, and data security policy. Self-hosted solutions, such as Outline on a VPS, give you full control over your data, security, and performance. This is especially important for projects where information confidentiality is critical, or for teams that want to avoid monthly payments for SaaS services. You manage the infrastructure yourself, which requires certain technical knowledge but provides maximum flexibility and independence.
What VPS configuration is needed for this task
Choosing the right VPS for Outline Wiki depends on the anticipated load, number of users, and volume of stored data. Outline is a fairly resource-intensive application, especially if you have many users and actively use search indexes.
Minimum Requirements
- Processor (CPU): 1-2 cores. For small teams (up to 5-10 active users), one core will be sufficient. For active work and a larger number of users, 2 cores are recommended.
- Random Access Memory (RAM): Minimum 2 GB. Outline, PostgreSQL, and Redis together consume a significant amount of RAM. 2 GB is the absolute minimum, 4 GB is a comfortable start for a small team.
- Disk (SSD): 20-40 GB SSD. SSD is critical for database performance and fast file access. 20 GB will be enough for the system and initial data volume, but more will be needed as content grows. 40 GB is recommended for reserve.
- Network: 100 Mbps or 1 Gbps. A stable channel with sufficient bandwidth is important for fast page loading and data exchange.
Specific VPS plan for the task
For most small and medium-sized teams (up to 20-30 active users), a VPS with the following characteristics will be optimal:
- 2x vCPU
- 4 GB RAM
- 50-80 GB NVMe/SSD disk
- 100 Mbps - 1 Gbps network port
Finding a VPS with the specified characteristics will not be difficult with most providers. It is important to choose a reliable provider with a good reputation and support.
When a dedicated server is needed, not a VPS
A dedicated server may be required in several cases:
- Very large team: If you have hundreds or thousands of active users, and Outline becomes the central knowledge repository for the entire company.
- High load: Intensive use, frequent search queries, large volume of attached files and images.
- Integration with other services: If Outline will be part of a larger infrastructure with many dependencies and high resource demands.
- Security and isolation requirements: A dedicated server provides complete isolation from "neighbors" on the hardware, which can be critical for certain types of data.
In most cases, for Outline Wiki, a VPS will be more than sufficient and more cost-effective.
Location: what it affects
The choice of server location affects several factors:
- Latency: The closer the server is to the main users, the lower the latency and faster the application response. If your team is distributed across different continents, choose a location that will be optimal for most users.
- Legislation: The server's location determines which country's jurisdiction your data falls under. This can be critical for compliance with GDPR, HIPAA, or other regulations.
- Cost: VPS prices may vary slightly depending on the location.
It is usually recommended to choose a location that is geographically close to most of your users to ensure the best user experience.
Server Preparation
Before installing Outline Wiki, it is necessary to perform basic setup of a fresh VPS to ensure security and prepare the environment for further deployment. We will be using Ubuntu Server 24.04 LTS.
1. Connecting via SSH
Connect to your server as the root user, using the IP address provided by your provider:
ssh root@ВАШ_IP_АДРЕС
If you are using a password, enter it. It is highly recommended to use SSH keys for greater security.
2. System Update
Update the package list and installed packages to their latest versions:
sudo apt update && sudo apt upgrade -y
This ensures that you have the latest security fixes and stable versions of all system components.
3. Creating a new user with sudo privileges
Working as root is unsafe. Let's create a new user and grant them sudo privileges.
adduser outlineadmin
Follow the instructions to set a password and user information. Then add the user to the sudo group:
usermod -aG sudo outlineadmin
Now you can switch to the new user:
su - outlineadmin
Going forward, all commands requiring superuser privileges will be executed with the sudo prefix.
4. Configuring SSH keys for the new user
If you are not yet using SSH keys, create them on your local machine (if you don't have them):
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Then copy the public key to the server for the new user outlineadmin:
ssh-copy-id outlineadmin@ВАШ_IP_АДРЕС
Now you can log in without a password. After verification, it is recommended to disable password login for root and for all users in the /etc/ssh/sshd_config file. Find the lines:
sudo nano /etc/ssh/sshd_config
PermitRootLogin no
PasswordAuthentication no
Save changes (Ctrl+O, Enter) and exit (Ctrl+X). Restart the SSH service:
sudo systemctl restart sshd
Be sure to verify that you can log in with your SSH key before closing the current session.
5. Firewall Configuration (UFW)
UFW (Uncomplicated Firewall) is a convenient utility for managing iptables. By default, it is disabled.
sudo apt install ufw -y # Install UFW if not installed
sudo ufw allow OpenSSH # Allow SSH to avoid losing access
sudo ufw allow http # Allow HTTP (port 80)
sudo ufw allow https # Allow HTTPS (port 443)
sudo ufw enable # Enable the firewall
sudo ufw status verbose # Check status
You will be prompted to confirm enabling UFW. Enter y. Your server is now protected from unwanted traffic, except for SSH, HTTP, and HTTPS.
6. Installing Fail2ban
Fail2ban scans logs and automatically blocks IP addresses showing signs of malicious attacks (e.g., multiple failed SSH login attempts).
sudo apt install fail2ban -y
sudo systemctl enable fail2ban
sudo systemctl start fail2ban
Create a configuration file for Fail2ban:
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo nano /etc/fail2ban/jail.local
In the jail.local file, you can configure parameters. Make sure the [sshd] section is active (enabled = true) and, if desired, change bantime (block time) and maxretry (number of attempts).
[DEFAULT]
bantime = 10m
findtime = 10m
maxretry = 5
[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
Save changes and restart Fail2ban:
sudo systemctl restart fail2ban
sudo fail2ban-client status # Check status
sudo fail2ban-client status sshd # Check status for SSH
Now your server has basic protection against brute-force attacks.
Software Installation — Step-by-Step
Outline Wiki is best deployed using Docker and Docker Compose. This ensures component isolation, simplifies dependency management, and updates.
1. Installing Docker Engine (version 26.x as of 2026)
First, remove old Docker versions if they exist:
for pkg in docker.io docker-doc docker-compose docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin; do sudo apt remove $pkg; done
Install the necessary packages to install Docker via the repository:
sudo apt update
sudo apt install ca-certificates curl gnupg -y
Add Docker's official GPG key:
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
Add the Docker repository to APT sources:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Update the package list and install Docker Engine, Docker CLI, and Containerd:
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
Add your user to the docker group to avoid using sudo for every Docker command:
sudo usermod -aG docker $USER
newgrp docker # Apply group changes immediately
Verify Docker installation:
docker run hello-world # Run a test container
The output should confirm a successful installation.
2. Installing Docker Compose (version 2.24.x as of 2026)
Docker Compose is usually installed with Docker Engine as docker-compose-plugin. Let's check its version:
docker compose version # Check Docker Compose version
If the docker compose command does not work, you might have an old Docker installation or the plugin did not install. In that case, install it manually:
sudo apt install docker-compose-plugin -y
3. Creating a Directory for Outline Wiki
Create a directory where all Outline configuration files will be stored:
mkdir -p ~/outline
cd ~/outline
4. Configuring the Docker Compose File
Outline requires several services: the Outline application itself, PostgreSQL (database), and Redis (cache/queues). Create the docker-compose.yml file:
nano docker-compose.yml
Paste the following content. Pay attention to the current image versions (PostgreSQL 16, Redis 7, Outline latest stable).
version: '3.8'
services:
outline:
image: outlines/outline:latest
container_name: outline
restart: always
env_file:
- ./.env
ports:
- "3000:3000" # Port on which Outline listens inside the container
depends_on:
- postgres
- redis
volumes:
- ./data/uploads:/opt/outline/public/uploads # For uploaded files
postgres:
image: postgres:16-alpine
container_name: outline_postgres
restart: always
env_file:
- ./.env
volumes:
- ./data/postgres:/var/lib/postgresql/data # Persistent storage for the database
redis:
image: redis:7-alpine
container_name: outline_redis
restart: always
env_file:
- ./.env
volumes:
- ./data/redis:/data # Persistent storage for Redis (if persistence is used)
volumes:
postgres:
redis:
uploads:
Save the file (Ctrl+O, Enter) and exit (Ctrl+X).
5. Creating the Environment Variables File (.env)
This file will contain all sensitive data and configuration parameters. Create it:
nano .env
Paste the following content. Be sure to replace YOUR_DOMAIN.COM with your actual domain and generate strong passwords and keys.
# Outline Application Settings
URL=https://YOUR_DOMAIN.COM # Domain where Outline Wiki will be accessible
PORT=3000
SECRET_KEY=ВАШ_СЕКРЕТНЫЙ_КЛЮЧ_ДЛЯ_OUTLINE # Generated by a random string, e.g., openssl rand -base64 32
DATABASE_URL=postgres://outline_user:ВАШ_ПАРОЛЬ_ДЛЯ_БД@postgres:5432/outline_db
REDIS_URL=redis://redis:6379
# PostgreSQL Database Settings
POSTGRES_USER=outline_user
POSTGRES_PASSWORD=ВАШ_ПАРОЛЬ_ДЛЯ_БД # Different from SECRET_KEY
POSTGRES_DB=outline_db
# Redis Settings (usually do not require changes if Redis is only used for cache)
REDIS_HOST=redis
REDIS_PORT=6379
# Email Configuration (for invitations, password resets, etc.)
# Example for Mailgun, you can use SendGrid, Postmark, AWS SES, or SMTP
# MAIL_SERVICE_PROVIDER=mailgun
# MAIL_FROM_EMAIL=wiki@YOUR_DOMAIN.COM
# MAILGUN_API_KEY=mg-ваш-api-ключ
# MAILGUN_DOMAIN=mg.YOUR_DOMAIN.COM
# Or for SMTP (replace with your data)
# SMTP_HOST=smtp.gmail.com
# SMTP_PORT=587
# [email protected]
# SMTP_PASSWORD=your_email_password
# SMTP_SECURE=false # true for SSL/TLS, false for STARTTLS
# Authentication Providers (select the ones you need, comment out the rest)
# GOOGLE_CLIENT_ID=
# GOOGLE_CLIENT_SECRET=
# SLACK_CLIENT_ID=
# SLACK_CLIENT_SECRET=
# SLACK_SIGNING_SECRET=
# MICROSOFT_CLIENT_ID=
# MICROSOFT_CLIENT_SECRET=
# OIDC_CLIENT_ID=
# OIDC_CLIENT_SECRET=
# OIDC_AUTH_URL=
# OIDC_TOKEN_URL=
# OIDC_USERINFO_URL=
# OIDC_DISPLAY_NAME=
# OIDC_SCOPES=
# OIDC_USERNAME_CLAIM=
# OIDC_GROUPS_CLAIM=
Important:
SECRET_KEY: Generate a long random string, for example, usingopenssl rand -base64 32.POSTGRES_PASSWORD: Also generate a strong password.URL: Specify the full HTTPS URL of your domain.- Configure the Email Configuration section so Outline can send invitations and notifications.
- Configure the Authentication Providers sections if you plan to use Google, Slack, Microsoft, or OIDC for login. Initially, you can leave them commented out.
Save the file (Ctrl+O, Enter) and exit (Ctrl+X).
6. Starting Outline Wiki
Now that everything is ready, start Outline Wiki with Docker Compose:
docker compose up -d # Run containers in the background
This command will create and start three containers: Outline, PostgreSQL, and Redis. The process may take a few minutes while images are downloaded and the database is initialized.
Check the status of the containers:
docker compose ps
All containers should be in the running state.
At this point, Outline Wiki is running on port 3000 of your server. However, it is not yet externally accessible and does not have HTTPS. We will address this in the next section.