\documentclass{beamer}
\usepackage{graphicx}
\usepackage{hyperref}
\graphicspath{img/}
\usetheme{Warsaw}
\beamertemplatenavigationsymbolsempty
\title{Running a Home Server}
\subtitle{Configurations \& Considerations}
\date{7 November 2018}

\begin{document}

\frame{\titlepage}

\begin{frame}
\frametitle{Talking Points}
	\begin{columns}
	\column{.5\textwidth}
		\tableofcontents[sections={1-2}]
	\column{.5\textwidth}
	\tableofcontents[sections={3-5}]
	\end{columns}
\end{frame}

\section{Introduction}
	\frame{\sectionpage}
	\subsection{About}
	\begin{frame}
	\frametitle{About my home server}
	A little about my home server setup:
	\begin{itemize}
		\item 4 Physical Servers
		\item 7 Websites (all w/ current SSL Certs)
		\item 2 Radio Stations
		\item 530 new posts per-month across 2 Discussion
		Forums
	\end{itemize}
	Notable WWW spaces I host:
	\begin{description}
		\item [\href{ralee.org}{https://ralee.org}]
		Textboard / Futuristic Discussion Space
		\item [\href{howler.space}{https://howler.space}]
		NCSU Campus Imageboard
		\item [\href{prettyboytellem.com}{https://prettyboytellem.com}]
		My Personal Website
	\end{description}
	\end{frame}
	\subsection{Motivation}
	\begin{frame}
	\frametitle{Motivation / Advantages}
	\subsubsection{Advantages}
	Why are home-servers nice?
	\begin{itemize}
		\item Complete control of your server hardware
		\item Minimize monthly, recurring costs
		\item Use existing hardware
		\item Personal storage accessible from anywhere
		\item Hands-on experience!
	\end{itemize}
	A home-server lets you do what you \underline{want}, and you can
	learn a lot about how servers work!
	\end{frame}\begin{frame}
	\subsubsection{Downsides}
	\frametitle{Motivation / Downsides}
	But running a server can also be messy business! You have
	expectations to meet as a webmaster:
	\begin{itemize}
		\item Your website is expected to just ``work''
		\item It should always be on-line, too!
	\end{itemize}
	Who's responsible for:
	\begin{itemize}
		\item System setup?
		\item Maintainance?
		\item Server upgrades (hardware / software)?
		\item Who gets blamed for down-time?
	\end{itemize}
	No matter of how difficult it may be: \textbf{It's all up to you!}
	\end{frame}
	\begin{frame}
		\frametitle{Fanmail}
		\includegraphics[width=250px]{img/fanmail.png}
	\end{frame}
\section{Architecture}
	\frame{\sectionpage}
	\subsection{Server Room}
	\begin{frame}
		\frametitle{My Room}
		\includegraphics[width=250px]{img/room-floor.png}
	\end{frame}
	\subsection{Hardware}
	\subsubsection{Spitfire}
	\begin{frame}\begin{columns}
		\column{.5\textwidth}
			\includegraphics[width=\textwidth]{img/spitfire.png}
		\column{.5\textwidth}
		\frametitle{Spitfire (Front-end)}
		\begin{description}
			\item [nginx] Reverse-proxy Client HTTP(S) Requests
			\item [tor] Provide access via a .onion URL
			\item [ngircd] IRC Network Daemon
			\item [dovecot] Receiving Mail
			\item [postfix] Relaying Mail
			\item [icecast] Radio Broadcast
			\item [XOrg] Desktop
		\end{description}
	\end{columns}\end{frame}
	\subsubsection{Unison}
	\begin{frame}\begin{columns}
		\column{.5\textwidth}
			\includegraphics[width=\textwidth]{img/unison.png}
		\column{.5\textwidth}
		\frametitle{Unison (Back-end)}
		\begin{description}
			\item [lighttpd] Serve HTTP requests proxied by
			``spitfire''
			\item [php-fpm] Run PHP Scripts
			\item [mysql] SQL Database
		\end{description}
	\end{columns}\end{frame}
	\subsection{Proxying Requests}
	\begin{frame}
		\frametitle{Reverse Proxy}
		All the hardware is set up but how will clients connect to
		my site?

		\begin{itemize}
			\item Only one external :80 when using DNAT
			\item Which domain do you want?
		\end{itemize}
		Solution: Use a reverse-proxy!
	\end{frame}
	\begin{frame}
		\frametitle{Client Request Example}
		\includegraphics[width=250px]{img/example-client.png}
	\end{frame}
	\begin{frame}
		\frametitle{Implications}
		Benefits of using the reverse-proxy:
		\begin{itemize}
			\item Map multiple domains to one port
			\item Centralized SSL certs
			\item Centralized logging
			\item ``Gatekeeping'' traffic rules
			\item Load Balancing
		\end{itemize}
	\end{frame}
\section{Configurations}
	\frame{\sectionpage}
	\subsection{spitfire}
	\begin{frame}
		\frametitle{Spitfire's Configurations}
		\begin{description}
		\item [nginx] \url{https://cdn.prettyboytellem.com/etc/spitfire-nginx.conf}
		\item [icecast] \url{https://cdn.prettyboytellem.com/etc/spitfire-icecast.xml}
		\item [alice-dj] \url{https://cdn.prettyboytellem.com/etc/spitfire-boot-alice}
		\end{description}
	\end{frame}

	\subsection{unison}
	\begin{frame}
		\frametitle{Unison's Configurations}
		\begin{description}
		\item [lighttpd] \url{https://cdn.prettyboytellem.com/etc/unison-lighttpd.conf}
		\end{description}
	\end{frame}
\section{Unique Challenges}
	\frame{\sectionpage}
	\subsection{DNS}
		\begin{frame}
			\frametitle{DNS}
			DNS is how domain names (like \url{ralee.org} are
			resolved to IP addresses. Your consumer-grade
			uplink is likely to have a dynamic IP address instead
			of a static address:
			\begin{itemize}
				\item Likely to change over time
				\item May change on router reboot
				\item Will probably change when you least
				want it to
			\end{itemize}
			Not everyone can have a static address!
		\end{frame}
		\begin{frame}
			\frametitle{DNS / Solutions}
			How can we mitigate the problems of a dynamic
			address?
			\begin{itemize}
				\item Upgrade to a static IP (\$\$\$)
				\item DDNS (Dynamic DNS)
				\item Strictly resolve domains to IPv6
				\item Deal with it
			\end{itemize}
		\end{frame}
	\subsection{Dealing with the ISP}
		\begin{frame}
			\frametitle{Dealing with the ISP}
			Your ISP thinks you're an idiot
			\begin{itemize}
				\item May block ports you ``don't need''
				\item May throttle traffic
			\end{itemize}
			You may become the victim of:
			\begin{itemize}
				\item 2AM ``maintainance''
				\item Random packet dropping
				\item Traffic Shaping
			\end{itemize}
			If you run anything abnormal (.onion, I2P) \textbf{you are
			suspicious to the ISP!}
		\end{frame}
\section{Conclusion}
	\frame{\sectionpage}
\end{document}
