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
An accessible Archive of Our Own reader application written in python.

AO3-A11y. Important disclaimer. This project is under active development. Many features might not yet be present, or some things might not work at all

4 Nov 11, 2022
Queen Zellie is a chat bot for Telegram.

🧝‍♀️ 💙 Queen Zellei 💙 🧝‍♀️ Queen Zellie is a chat bot for Telegram. Make it easy and fun to use Telegram. Telegram | Telegram Channel | Whatsapp H

Sinhalaya Official 4 Dec 18, 2021
KTUN Öğrenci Bilgi Sistemine bağlanıp her 15 dakikada notları kontrol eden ve değişiklik olduğu zaman size Discord Webhook ile mesaj atan uygulama.

KTUN_Obis KTUN Öğrenci Bilgi Sistemi KTUN Öğrenci Bilgi Sistemine selenium kullanarak girip setttings.py dosyasında verdiğiniz bilgeri doldurup ardınd

İbrahim Uysal 5 Oct 27, 2022
PerrOS - The operating system for your discord server.

PerrOS PerrOS is a Opensource Discord Bot to do it all! Installation Use the package manager pip to install the python3 requirements. pip3 install -r

Webshort 2 Jun 20, 2022
The Fastest multi spambot of Telegram 🤞 🤞

Revil Spam Bot The Fastest multi spambot of Telegram 🤞 🤞 𝚂𝚄𝙿𝙿𝙾𝚁𝚃 🖤 ᴄʀᴇᴀᴛᴏʀ 🖤 ⚡ 𝓡𝓮𝓿𝓲𝓵 𝓗𝓾𝓷𝓽𝓮𝓻 𝔐𝔲𝔩𝔱𝔦 ẞø✞︎ ⚡ 𝓐 𝕾мοοτн 𝓐и∂ 𝕱

REVIL HUNTER 4 Dec 08, 2021
unofficial library for discord components(on development)

discord.py-buttons unofficial library for discord buttons(on development) Install pip install --upgrade discord_buttons Example from discord import Cl

kiki7000 129 Dec 31, 2022
THE BEST INSTAGRAM AUTO LIKER GET MORE FOLLOWERS WITH THIS AUTOMATION

Hi 👋 , I'm Anandhu Ashok Developer making awesome things for awesome people 🚀 Connect with me: THE BEST INSTAGRAM AUTO LIKER GET MORE FOLLOWERS WITH

Anandhu Ashok 3 Jul 26, 2022
This is a very easy to use tool developed in python that will search for free courses from multiple sites including youtube and enroll in the ones in which it can.

Free-Course-Hunter-and-Enroller This is a very easy to use tool developed in python that will search for free courses from multiple sites including yo

Zain 12 Nov 12, 2022
Unofficial Discord Rich Presence for HackTheBox platform

HTBRichPresence Unofficial Discord Rich Presence for HackTheBox platform The project is under lazy development. How to run Install requirements: // I'

Antonio 4 Apr 19, 2022
Command-line program to download videos from YouTube.com and other video sites

youtube-dl - download videos from youtube.com or other video platforms INSTALLATION DESCRIPTION OPTIONS CONFIGURATION OUTPUT TEMPLATE FORMAT SELECTION

youtube-dl 116.4k Jan 07, 2023
TikTok channel bulk ripper based on TikTok-Api and Youtube-dl. Some assembly may be required.

RipTok Script provided as is. Absolutely no guarantee. A TikTok ripper based on TikTokApi and YouTube-dl. Some assembly may be required. positional ar

32 Dec 24, 2022
Python client for QIWI payment system

Pyqiwi Lib for QIWI payment system Installation pip install pyqiwi Usage from decimal import Decimal from datetime import datetime, timedelta from p

Andrey 12 Jun 03, 2022
A virus/stealer made in py

python-virus A virus/stealer made in py. Features: Discord token stealer, Password stealer, Windows key stealer, Credit-card stealer, Image grab, Anti

SKYNETMARCI 5 Dec 12, 2022
A python API wrapper for temp-mail.org

temp-mail Python API Wrapper for temp-mail.ru service. Temp-mail is a service which lets you use anonymous emails for free. You can view full API spec

Denis Veselov 91 Nov 19, 2022
CyberTKR - CyberTK-API

CyberTKR - CyberTK-API

TKR 2 Apr 08, 2022
VC-Music , Playing music without bot.

VC-Userbot A Telegram Userbot to play or streaming Audio and Video songs / files in Telegram Voice Chats. It's made with PyTgCalls and Pyrogram Requir

RioProjectX 8 Aug 04, 2022
This is Telegram Files Store Bot by @AbirHasan2005

PyroFilesStoreBot This is Telegram Parmanent Files Store Bot by @AbirHasan2005. Language: Python3 Library: Pyrogram Features: In PM Just Forward or Se

Abir Hasan 168 Dec 19, 2022
Acid's Utilities is a bot for my Discord server that alerts when I go live, welcomes new users, has some awesome games and so much more!

Acid's Utilities Acid's Utilities is a bot for my Discord server that alerts when I go live, welcomes new users, has some awesome games and so much mo

AcidFilms (Fin Stuart) 3 Nov 19, 2021
Savecontentbot - Telegram Save Content Bot With Same more Features

Save Restricted Content Bot A simple telegram bot to save restricted content wit

Group Dc Bots 3 Jan 26, 2022
A module to get data about anime characters, news, info, lyrics and more.

Animec A module to get data about anime characters, news, info, lyrics and more. The module scrapes myanimelist to parse requested data. If you wish t

DriftAsimov 31 Aug 31, 2022