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
Change the name and pfp of ur accounts, uses tokens.txt for ur tokens.

Change the name and pfp of ur accounts, uses tokens.txt for ur tokens. Also scrapes the pfps+names from a server chosen by you. For hq tokens go to discord.gg/tokenshop or t.me/praisetelegram

cChimney 36 Dec 09, 2022
EpikCord.py - This is an API Wrapper for Discord's API for Python

EpikCord.py - This is an API Wrapper for Discord's API for Python! We've decided not to fork discord.py and start completely from scratch for a new, better structuring system!

EpikHost 28 Oct 10, 2022
A discord bot wrapper for python have slash command

A discord bot wrapper for python have slash command

4 Dec 04, 2021
Dicha herramienta esta creada con una api... esta api permite enviar un SMS cada 12 horas dependiendo del pais... Hay algunos paises y operadoras no están soportados.

SMSFree pkg install python3 pip install requests git clone https://github.com/Hidden-parker/SMSFree cd SMSFree python sms.py DISFRUTA... Dicha herrami

piter 2 Nov 14, 2021
Sunflower-farmers-automated-bot - Sunflower Farmers NFT Game automated bot.IT IS NOT a cheat or hack bot

Sunflower-farmers-auto-bot Sunflower Farmers NFT Game automated bot.IT IS NOT a

Arthur Alves 17 Nov 09, 2022
Open API to list Viet Nam administrative divisions

Viet Nam province API Homepage: https://provinces.open-api.vn This is online tool to let my VietnamProvinces library reach more users. VietnamProvince

Nguyễn Hồng Quân 52 Dec 05, 2022
Anti-league-discordbot - Harrasses imbeciles for playing league of legends

anti-league-discordbot harrasses imbeciles for playing league of legends Running

Chris Clem 2 Feb 12, 2022
A fun hangman style game to guess random movie names with a short summary about the movie.

hang-movie-man Hangman but for movies 😉 This is a fun hangman style game to guess random movie names from the local database and show some summary ab

Ankit Josh 10 Sep 07, 2022
Python lib to control HottoH based stove devices

Project desciption This library can be used to discuss with HootoH based stove devices Actually tested and validated with a CMG Drum stove. To use thi

3 May 16, 2022
Tracks how much money a profile has in their bank and graphs it, as long as they enable the bank api

Tracks how much money a profile has in their bank and graphs it, as long as they enable the bank api. (you could really use this to track anything from the hypixel api)

1 Feb 08, 2022
Program that automates the bump of the Disboard Bot. Done 100% in Python with PyAutoGUI library

Auto-Discord-Bump Program that automates the bump of the Disboard Bot done 100% in python with PyAutoGUI How to configue You will need 3 things before

Mateus 1 Dec 19, 2021
A code to match you with the perfect Taylor Swift song for your mood and relationship status.

taylorswift A package for matching your current mood and relationship status to a suitable Taylor Swift song. Requirements: Python 2 or 3, and the num

Megan Mansfield 82 Dec 09, 2022
ANKIT-OS/TG-MUSIC-PLAYER a special repository. Its Is A Telegram Bot To Play To Play Music In Voice Chat

🔥 🎶 TG MUSIC PLAYER 🎶 🔥 The owner would not be responsible for any kind of bans due to the bot. • ⚡ INSTALLING ⚡ • • 🛠️ Lᴀɴɢᴜᴀɢᴇs Aɴᴅ Tᴏᴏʟs 🔰 •

ANKIT KUMAR 1 Dec 27, 2021
python library to the bitly api

bitly API python library Installation pip install bitly_api Run tests Your username is the lowercase name shown when you login to bitly, your access

Bitly 245 Aug 14, 2022
Evernote SDK for Python

Evernote SDK for Python Evernote API version 1.28 This SDK is intended for use with Python 2.X For Evernote's beta Python 3 SDK see https://github.com

Evernote 612 Dec 30, 2022
YouTube-Discord-Bot - Discord Bot to Search YouTube

YouTube Bot Info YouTube Bot is a discord bot where you can search for anything

Riceblades11 10 Mar 05, 2022
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 API Wrapper for Guilded.

Guildr A simple API Wrapper for Guilded. Frequently updated! I am not a user of Guilded, meaning I do not keep track of new Guilded updates or patches

2 Mar 07, 2022
Unofficial instagram API, give you access to ALL instagram features (like, follow, upload photo and video and etc)! Write on python.

Instagram-API-python Unofficial Instagram API to give you access to ALL Instagram features (like, follow, upload photo and video, etc)! Written in Pyt

Vladimir Bezrukov 1 Nov 19, 2021
Nautobot-custom-jobs - Custom jobs for Nautobot

nautobot-custom-jobs This repo contains custom jobs for Nautobot. Installation P

Dan Peachey 9 Oct 27, 2022