Outline is on the path to become a good self-hosted alternative to notion for team collaboration on documentation.
In this short article, we will learn how to self-host it with Docker compose and Traefik
Recently N8N presented this list of interesting workflow automation software and one of them, Outline, picked my curiosity and I decided to try it out. Here's how I deployed it on my server with docker compose and Traefik as a proxy layer.
Are you interested in how to set up traefik? Find how I configured it on my other article here
What is Outline?
On their website, https://www.getoutline.com/, outline presents itself as "Your team’s knowledge base". A tool to basically write any shared written document your organization may need for functioning correctly.
Why hosting it yourself?
If you're an individual who enjoys hosting this kind of software yourself or if you need to cut the cost of SaaS software, this tool seems like a great way to run it without committing to a paid subscription.
If you don't have a server already, Digital Ocean have a great offering with promotional credit.
Once you find that it became a fundamental tool for your business, you can cut on the management cost by picking a cloud plan hosted by outline directly.
How to install Outline?
To install outline, I opted for a docker compose installation, with secrets managed externally by doppler and pushed when running the docker compose file using doppler run -- .
Here's my docker compose file
As you can see in the x-defaults section I define all the environment variables which I then push into the different services. If you're not using doppler you can set the variables with in the same terminal before you start the dockers.
Another option to load environment variables in the services is to use a .env file like how is done in the original documentation. Here's an example of how it must be https://github.com/outline/outline/blob/main/.env.sample. To load this file replace <<: *defaults for env_file: ./docker.env
The docker file uses two networks, the traefik one for the public facing endpoint and an internal one just for this dockers.
Safety
To stay safe online, traefik creates a SSL certificate and exposes your site on the domain specified on the docker labels using https.
As a recovery option, I configured the project tiredofit/db-backup to periodically save the database.
With time, it would be an intelligent thing to also save this destination folder with all the backups to another location, but I'm leaving it for another day, as time in never enough.
🦺
If you care about safety you should also care about your online safety. Please check Nord Vpn for keeping you safe online.
Additional note
In the docker compose I configured a minio service but for lack of time I'm still not using it inside outline.
Thank you for reading so far.
In this article, we've explored how to run Outline on a docker compose plus traefik stack to make hosting it easy. Let me know if you have any questions in the comment section below. Also, please ask me if you want similar guides for other software