
Outline is an open-source knowledge base and team documentation platform designed for creating, organizing, and sharing internal documentation. It provides a clean and collaborative writing experience, real-time editing, collections for structured content, and integrations with popular authentication providers.
This article explains how to deploy Outline on a Linux server using Docker Compose with PostgreSQL as the database, Redis for caching, and Traefik for automatic HTTPS with Let's Encrypt. It covers directory setup, environment configuration, accessing the web interface, and creating team documentation within your workspace.
Before you begin, you need to:
outline.example.com).Outline requires a project directory with persistent storage for the database, uploads, and certificates. Environment variables control the application configuration and service connections.
Create the project directory.
data/: Stores Outline attachments, uploads, and other file-based data.pgdata/: Persists PostgreSQL database files.redis/: Stores Redis data for caching and sessions.letsencrypt/: Stores Traefik ACME certificates for HTTPS renewal.Navigate to the project directory.
Generate strong random secrets for the application.
Run the command twice and save both outputs. Use one value for SECRET_KEY and the other for UTILS_SECRET in the next steps.
Create the environment file.
Add the following configuration. Replace outline.example.com with your domain name, admin@example.com with your email address, STRONG_DATABASE_PASSWORD with a secure password, and the secret placeholders with the generated values.
Save and close the file.
Outline can start and run without SMTP configured, but features such as user invitations, password resets, email notifications, and sharing documents via email require a working SMTP configuration. Uncomment and configure the SMTP variables for a production deployment.
Docker Compose orchestrates Outline with PostgreSQL as the backend database, Redis for caching, and Traefik as the reverse proxy for automatic HTTPS. This configuration is based on the official Outline Docker Compose example, adapted to use environment variables and persistent storage.
Create the Docker Compose file.
Add the following configuration.
Save and close the file.
In the above manifest:
LETSENCRYPT_EMAIL..env file and includes a health check to ensure readiness before Outline starts../redis directory..env file, connects to PostgreSQL and Redis, and registers with Traefik for secure domain access.Start all services in detached mode.
Verify that all containers are running.
The output displays four running containers: Outline, PostgreSQL, Redis, and Traefik. Outline, PostgreSQL, and Redis show a healthy state; Traefik shows as running since it has no configured health check.
View the logs for the services.
For more information on managing a Docker Compose stack, see the How To Use Docker Compose article.
After deployment, access Outline through your domain and complete the initial workspace setup.
Replace outline.example.com with your configured domain and open https://outline.example.com in a web browser.
On the Create Workspace screen, enter your Workspace name, Admin name, and Admin email to create the super admin account.
Click Continue.
Collections organize documents into categories, and documents support real-time collaborative editing. This section demonstrates creating a collection, publishing a document, and inviting team members.
A collection groups related documents under a shared access policy.
In the left sidebar, click New Collection and enter a name (for example, March Articles).
Choose the default access level: Can edit (members can view and edit), View only (members can only read), or No access (only explicitly invited users can access).
Click Advanced options to configure template permissions, public sharing, and commenting settings.
Click Create.
Documents live inside a collection and support real-time collaborative editing.
From the upper right, click + New doc.
Enter a document title (for example, How to Deploy Outline).
Use the rich text editor to write content. Type / to insert headings, lists, tables, or code blocks.
Invitations grant workspace access with a role that controls what each member can do.
From the bottom-left of the sidebar, click + Invite people.
Select a role for each invite: Admin (manage workspace settings), Editor (create and edit documents), or Viewer (view and comment).
Enter the email address and name for each person. Click + Add another to invite multiple people.
Click Send Invites.
Inviting team members via email requires a working SMTP configuration in your .env file. If SMTP is not configured, invitations are not sent. Alternatively, share documents via public links or manually create accounts for users.
You have deployed Outline on a Linux server using Docker Compose with PostgreSQL for data storage, Redis for caching, and Traefik for automatic HTTPS. Your self-hosted instance provides a collaborative knowledge base with real-time editing, document collections, and team sharing while keeping data on your own infrastructure. For more information and advanced configuration, refer to the official Outline documentation.
0 Comments
Be the first to comment and share your perspective with the community.