https://github.com/emad-elsaid/home
Home server setup
https://github.com/emad-elsaid/home
Last synced: 3 months ago
JSON representation
Home server setup
- Host: GitHub
- URL: https://github.com/emad-elsaid/home
- Owner: emad-elsaid
- License: mit
- Created: 2023-07-25T15:17:18.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-26T07:42:01.000Z (8 months ago)
- Last Synced: 2025-07-12T12:44:52.929Z (3 months ago)
- Language: Shell
- Size: 44.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Home Server Configuration
==================================This is a docker-compose and ansible configuration for my home server
# SSH config
Add the following to `~/.ssh/config` to connect to the server with `ssh home` instead of `ssh user@ip-address`
```
Host home
HostName
User
```# Docker context
To allow docker on your machine to control the docker instance on the home server add it as a context
```
docker context create home --docker="host=ssh://home"
```Everytime you want to switch the context use
```
docker context use home
```# Environment variables
docker compose files uses env variables if values are not set. to setup variables* copy `.env.template` to `.env`
* edit `.env` to have the variables values
* load the file as you normally do. for me I'm using [autoenv](https://github.com/hyperupcall/autoenv)# Deploy to remote server
```
docker compose down
docker compose up -d --remove-orphans
```# Updating one service
```
docker compose down
docker compose up -d
```# DNS
To make it easier to access containers add DNS A record to the internal server IP address with a wild card. Example:
- Type: A
- Domain: server.emadelsaid.com and *.server.emadelsaid.com
- IP: `my server internal IP`# Ansible
It installs host system configuration and requirements needed by the containers.
```
make ansible
```