My homeserver setup. Everything managed securely using Portainer.

Overview

homeserver-traefik-portainer

Features:

  • access all services with free TLS from letsencrypt using your own domain
  • running a side project is super simple as you can plug the docker-compose file in the Portainer (directly from another repo) and even use Portainer as the docker registry
  • no shell scripts are needed for maintenance
  • automatic https and cert refresh
  • Only 80, 443 and 9000 are needed so no problems with allocated ports (9000 if Traefik died and you want to access Portainer)
  • not even ssh will be needed. Once Portainer is running through Traefik (https), everything can be updated using the UI
  • multiple ways to access logs (Portainer, Dozzle)

How to

Warning! If a docker-compose doesn't work for you out of the box, it's probably because I use docker mapping for synology, like /volume1/@docker:/var/lib/docker. If that's the case, you will have to change it yourself.

  1. Buy a domain. For this to work you will need to be able to create one DNS A record with a wildcard. Cloudflare offers domains at no cost (they don't make profit off it) and are great overall so I recommend them as a domain registrar.
  2. You will need an ACME provider for the ACME challenge. Here's the list of providers supported by Traefik. If you're using Cloudflare, head over to API Tokens and create one with Edit zone DNS permission. Save it. You will use it for CF_DNS_API_TOKEN in a moment.
  3. Copy .env.example to .env. Overwrite SERVER_DOMAIN with your domain name.
  4. Now you're ready to start. In the root directory, simply docker-compose up -d. It will start Portainer from the compose file. This compose already has some things that will be useful for Traefik in a moment.
  5. Once Portainer is up and running, head over to http://ip-where-portainer-is-running:9000. Go to Settings -> App Templates and replace the url with https://raw.githubusercontent.com/tomwojcik/homeserver-traefik-portainer/master/template.json.
  6. Go to App Templates. Make sure you see some applications there. Deploy Traefik first.
  7. When deploying Traefik you will need to set SERVER_DOMAIN, ACME_EMAIL and now is the time to use CF_DNS_API_TOKEN. If you want to use another challenge provider, you will have to copy this template and adjust it to fit your needs.
  8. Once you click Deploy the stack, head over to Traefik stack and see logs. Make sure there are no errors. If you have problems, it's best to expose ports of Traefik and Whoami using the "edit stack" option in Portainer. Then just fix whatever is broken.
  9. Now go to Cloudflare. You need to add a subdomain. Select your domain, go to DNS panel, click Add record. Assuming the Portainer is running on 192.168.1.2 within the local network, create record:
    1. Type: A
    2. Name: *
    3. IPv4 address: 192.168.1.2
    4. Proxy status: disabled
  10. From now on you can access Portainer (within local network) using portainer.example.com.
  11. Deploy other stacks. Enjoy.

My NAS-specific things

Synology uses 80 and 443 for DSM or other stuff so the ports need to be changed.

  1. sed -i -e 's/80/81/' -e 's/443/444/' /usr/syno/share/nginx/server.mustache /usr/syno/share/nginx/DSM.mustache /usr/syno/share/nginx/WWWService.mustache
  2. Depending on the DSM version, restart nginx with:
    1. DSM<7 = synoservicecfg --restart nginx
    2. DSM>=7 = sudo systemctl restart nginx

Other stuff

I adjusted https://github.com/SimonHaas/homeserver to my needs. Big kudos to Simon Haas for sharing his stack.

default Portainer templates

biggest OSS templates set

Portainer docs on templates

Contributing

It's my homeserver setup so if it works for me - there's nothing to improve. If you want to star / fork / download - go ahead. I hope it makes your life easier!

Owner
Tomasz Wójcik
There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.
Tomasz Wójcik
Auslesen, entschlüsseln und parsen von Smart Meter Telegrammen

Netz-NÖ SmartMeter-P1-Reader https://www.netz-noe.at/Download-(1)/Smart-Meter/218_9_SmartMeter_Kundenschnittstelle_lektoriert_14.aspx Dieses Skript en

3 Jan 14, 2022
ML-Test-Client

ML-Test-Client Introduction What is this? This Test Client App is to be used to crowd-test machine learning models with the goal of finding the best c

11 Jul 15, 2022
Univerity-student oriented (lithuanian) discord bot

Univerity-student oriented (lithuanian) discord bot

3 Nov 30, 2021
Who are we? We are the Hunters of all Torrent in this world.🗡️.Fork from SlamDevs

MIRROR HUNTER This Mirror Bot is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google Drive. Repo la

Anime Republic 130 May 28, 2022
IOGen - An Open source discord token generator

_____ ____ _____ |_ _/ __ \ / ____| | || | | | |

0xVichy#1234 85 Nov 03, 2022
A modular Telegram Python bot running on python3 with a sqlalchemy database.

Nao Tomori Robot Found Me On Telegram As Nao Tomori 🌼 A modular Telegram Python bot running on python3 with a sqlalchemy database. How to setup/deplo

Stinkyproject 1 Nov 24, 2021
Telegram Client and Bot that use Artificial Intelligence to auto-reply to scammers and waste their time

scamminator Blocking a scammer is not enough. It is time to fight back. Wouldn't be great if there was a tool that uses Artificial Intelligence to rep

Federico Galatolo 6 Nov 12, 2022
An API which returns random AOT quote everytime it's invoked

An API which returns random AOT quote everytime it's invoked

Nishant Sapkota 1 Feb 07, 2022
User-Bot for reporting russian propaganda channels

Юзер-Бот, що автоматизує репортування Телеграм каналів пропагандистів Цей Телеграм Юзер-Бот використовується для автоматизації репорту пропагандистьск

58 Nov 07, 2022
Python async SDK for betsapi.com

Python async SDK for betsapi.com

1 Dec 21, 2021
Unlimited Filter Telegram Bot 2

Mother NAther Bot Features Auto Filter Manuel Filter IMDB Admin Commands Broadcast Index IMDB search Inline Search Random pics ids and User info Stats

LɪᴏɴKᴇᴛᴛʏUᴅ 1 Oct 30, 2021
TFT Bot that automatically surrenders and allows finishing TFT Passes easily.

Image Based TFT Bot TFT Bot that automatically surrenders and allows finishing TFT Passes easily. Please read full file! You can check new releases he

1 Feb 06, 2022
A python script for hitting the kik API to enumerate people based on a username/userlist

kick3d Recon script for enumerating users off of the Kik API. This script has the ability to check single usernames or run through a userlist of usern

Sakura Samurai 19 Oct 04, 2021
Temperature Monitoring and Prediction Using a Modified Lambda Architecture

Temperature Monitoring and Prediction Using a Modified Lambda Architecture A more detailed write up can be seen in this paper. Original Lambda Archite

Parsa Yousefi 2 Jun 27, 2022
Projeto sobre BioInformática - MoA (mecanismos de ação)

Projeto: MoA no Paredawn Projeto sobre Bioinformatica - Mecanismos de Ação (MoA) MODELO PREDITIVO PARA PREVER O ATIVAMENTO DO MOA E MODELO PARA PREVER

Junior Torres 36 Feb 15, 2022
Simple bot to receive feedback,same as livegram bot but with more features & full control over bot

Kontak Simple bot to receive feedback,same as livegram bot but with more features & full control over bot Deploy to VPS

Mahin Ahmed 2 Dec 16, 2021
A small Python app to create Notion pages from Jira issues

Jira to Notion This little program will capture a Jira issue and create a corresponding Notion subpage. Mac users can fetch the current issue from the

Dr. Kerem Koseoglu 12 Oct 27, 2022
A Simple Telegram Inline Torrent Search Bot by @infotechIT

Torrent-Search-RoBot A Simple Telegram Inline Torrent Search Bot by @infotechIT. Torrent API Using api.infotech.wtf API Host Bot Deploy to Heroku Clic

InfoTech 0 May 05, 2022
Awslogs - AWS CloudWatch logs for Humans™

awslogs awslogs is a simple command line tool for querying groups, streams and events from Amazon CloudWatch logs. One of the most powerful features i

Jorge Bastida 4.5k Dec 30, 2022
Quack-SMS-BOMBER - Quack Toolkit By IkigaiHack

Quack Toolkit By IkigaiHack About Quack Toolkit Quack Toolkit is a set of tools

Marcel 2 Aug 19, 2022