The idea of this particular repo is to hold a bootstrap script for my homelab, which I use to host some useful apps. This is meant to be used on Arch Linux, and it won`t work on other distributions.
- Clone repo on your home server and get into scripts directory (you should have NetworkManager installed on your machine, you may install it via archinstall when setting up your machine)
git clone https://github.com/xirzo/homelab && cd homelab/scripts
- Install wireguard on your VPS and put the client config with the name wg0.conf into Homelab directory on your home server.
Client wg0.conf example:
[Interface]
Address = 10.7.0.2/24
DNS = 77.88.8.8, 8.8.4.4
PrivateKey = <KEY>
[Peer]
PublicKey = <KEY>
PresharedKey = <KEY>
AllowedIPs = 10.7.0.1/32
Endpoint = <YOUR-SERVER-IP-OR-DOMAIN>:51820
PersistentKeepalive = 25
Now you should have wg0.conf in homelab
directory
- Make script executable and run it
sudo chmod +x scripts/main.sh && sudo ./main.sh
You may change docker-compose files as you wish, but do not remove vps-network from networks property as it is needed for forwarding ports to your VPS.
Create new docker-compose-.yml file in docker-compose directory and then add such line to the main.sh. Note that in order to use WG network you should add vps-network to your docker-compose service.
bash ./create_docker_app.sh "<name>" "../docker-compose/docker-compose-<name>.yml"
You may just use create_docker_app.sh script or use portainer
./create_docker_app.sh "<name>" "docker-compose-<name>.yml"
Forward port from server to your machine (this command must be executed on your machine, not server nor VPS)
ssh -L 8181:localhost:8080 server
Then open your browser at localhost:8181
Configure NPM as such and insert domain that you chose on Nextcloud page when it asks so.
Note: If you`ve lost your Nextcloud passcode obtain it with this command (use it on server):
sudo docker exec nextcloud-aio-mastercontainer grep password /mnt/docker-aio-config/data/configuration.json
client_body_buffer_size 512k;
proxy_read_timeout 86400s;
client_max_body_size 0;
- sshd
- docker
- portainer
- nextcloud
- jellyfin
- portainer (12443)
- nextcloud (90, 9080, 9443)
- vim
- git
- openssl
- docker
- docker-compose
- terminus-font
- wireguard-tools
- resolvconf