Create the following records:
| Type | Host | Value |
|---|---|---|
| A | n8n | Server IP |
| A | portainer | Server IP |
| A | vault | Server IP |
| A | traefik | Server IP |
Start by reading 0-VPS_Setup.md
-
Copy the
./configfolder,1-proxy.ymland2-infra.ymlinto the VPS -
Init Docker Swarm
docker swarm init --advertise-addr {IP-ADDR-SERVER}You will see
docker swarm join --token {YOUR-TOKEN} {IP-ADDR-SERVER}:23771.Create networks
docker network create --driver overlay --attachable proxy_socket_access_network
docker network create --driver overlay --attachable proxy_internet_access_network
docker network create --driver overlay --attachable security_network2.Create volumes
docker volume create 1-traefik_certs
docker volume create 1-traefik_dumped_certs
docker volume create 1-traefik_acme_data
docker volume create 1-traefik_log_data- Deploy
docker stack deploy -c 1-proxy.yml 1-proxy --detach=truedocker node update --label-add portainer.portainer-data=true $(docker info -f '{{.Swarm.NodeID}}')
docker volume create 2-portainer_datadocker stack deploy -c 2-infra.yml 2-infra --detach=trueFrom this point on, you must deploy all the other stacks through Portainer (2-infra).
The usual steps are the following:
- Go into the stack.yml file and take note of external networks, volumes or secrets that must be created.
- Log into Portainer and create the necessary resources.
Portainer > Stack > Deployand copy and paste the content of the *.yml you want to deploy (ex.3-vault.yml)- Add the Environment Variables needed.
- Deploy
- After all the stacks are deployed, you should setup Authentik and enable the Forward Auth proxies for security and OIDC for SSO OAuth login.
- Most of the documentation can be found in the official website, ex: https://docs.goauthentik.io/integrations/services/portainer/
- You can setup Bitwarden Browser Extension and point it at a self-hosted instance.
- At the very basic level we should setup Authentik with Forward Auth to ensure only logged in users can assess the services.
- As a next step, we should deploy Crowdsec