This is a collection of docker-compose files for my home lab. There will be a video added for each service over time. I will be using Hostinger for all hosting. Visit Hostinger for more information. If you sign up for anything there, use coupon code mattw for 10% off.
- n8n
- searxng
- perplexica
- firecrawl
- openwebui
- qdrant
- budibase
- postgres
- caddy
- watchtower
I want to have a home lab that is self-hosted and runs on docker. I want to be able to access all of the services from the internet. But I don't want to let anyone access them...just me. n8n will be publicly accessible, but require authentication. The main thing that allows for this is Tailscale, which has a free plan that will let us do all we need.
This first section is covered in a video on my channel, sponsored by Hostinger. Embed will be added after its posted.
If you want to follow along with everything I am doing, you can sign up for a Hostinger account at Hostinger and use the coupon code mattw for 10% off. Select the KVM2 plan. You can choose any template you like, but I am going to start with just the Docker install. Once it is setup, SSH into the server as the user root and we need to do a few things.
-
Create a new user account. You could use the default
ubuntuuser, but I prefer to create a new one for my name, matt. You use your name.adduser matt. -
Allow the user to sudo:
usermod -aG sudo matt -
Add your user to the docker group:
sudo usermod -aG docker matt -
Log out and copy your public key to the server:
ssh-copy-id -i keyname matt@<your-server-ip> -
SSH in as the new user:
ssh matt@<your-server-ip> -
Edit /etc/ssh/sshd_config
a. Change
PasswordAuthenticationfromyestonob. Change
PermitRootLoginfromyestonoc. Change
UsePAMfromyestono -
Delete /etc/ssh/sshd_config.d/50-cloud-init.conf
-
Restart the ssh service:
sudo systemctl restart ssh -
Log out and log back in as your new user.
-
Clone this repo to your home directory:
git clone https://github.com/technovangelist/homelab.git
The first step is to get a Tailscale account and add you home machine to your tailnet. You can do this by downloading the Tailscale app from the Tailscale website.
After its installed, you need a key to add your docker containers to the tailnet. I found the easiest way to do it is to add the key to a docker secret.
- Create a folder called
~/.configon the home directory for the user you are logged in as. - Create a file called
tsauthkeyin the~/.configfolder. - Go to the tailscale admin page, click on Settings. On the left go to Keys. Click the button
Generate auth key.... - Enable
Reusable. ClickGenerate key. - Add the key to the
tsauthkeyfile. - Make the file only readable by the user:
chmod 600 ~/.config/tsauthkey
-
Navigate into the n8n directory:
cd homelab/n8n -
Copy the example.env file to .env:
cp example.env .env -
Edit the .env file.
a.
N8N_HOSTshould be the hostname of your server. b.WEBHOOK_URLshould be the URL of your server. In my case they are the same. c.GENERIC_TIMEZONEshould be your timezone. -
Start the n8n container:
docker compose up -d
This will update all the containers to the latest version every day at 4am
- Navigate into the watchtower directory:
cd homelab/watchtower - Change the Timezone to where ever you are.
- Start the watchtower container:
docker compose up -d