{"id":16162321,"url":"https://github.com/juanico10/selfhosted","last_synced_at":"2026-05-04T10:34:25.641Z","repository":{"id":128126273,"uuid":"452076334","full_name":"juanico10/selfhosted","owner":"juanico10","description":"Project to install Docker and Docker-Compose in Ubuntu, Raspberry or Nanopi","archived":false,"fork":false,"pushed_at":"2023-03-18T04:50:10.000Z","size":1739,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T03:47:45.439Z","etag":null,"topics":["containers","docker","docker-compose","nextcloud","traefik"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juanico10.png","metadata":{"files":{"readme":"README.md","changelog":"changedetection/README.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-01-25T23:29:22.000Z","updated_at":"2023-04-16T17:08:45.000Z","dependencies_parsed_at":"2024-03-16T13:10:58.056Z","dependency_job_id":"e53aba20-076c-4060-9673-a3c8cf5134fd","html_url":"https://github.com/juanico10/selfhosted","commit_stats":null,"previous_names":["juanico10/selfhosted"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/juanico10/selfhosted","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanico10%2Fselfhosted","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanico10%2Fselfhosted/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanico10%2Fselfhosted/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanico10%2Fselfhosted/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juanico10","download_url":"https://codeload.github.com/juanico10/selfhosted/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanico10%2Fselfhosted/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262545027,"owners_count":23326656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containers","docker","docker-compose","nextcloud","traefik"],"created_at":"2024-10-10T02:29:44.946Z","updated_at":"2026-05-04T10:34:25.581Z","avatar_url":"https://github.com/juanico10.png","language":"Shell","funding_links":["https://www.paypal.com/donate/?hosted_button_id=HVJT2YDSHRZY2"],"categories":[],"sub_categories":[],"readme":"# Docker container selfhosted\nProject to install Docker and Docker-Compose in Ubuntu, Raspberry or Nanopi\n\n#\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.docker.com/\"\u003e\n        \u003cimg src=\"https://github.com/JuanRodenas/Docker-container-selfhosted/blob/main/Docker.png\" alt=\"Docker\"\u003e\n    \u003c/a\u003e\n    \u003cbr\u003e\n    \u003cstrong\u003eMake your projects come to life with Docker\u003c/strong\u003e\n\u003c/p\u003e\n\u003c!-- markdownlint-enable MD033 --\u003e\n\n#\n\n* Documentación oficial:\n📁[Documentación docker](https://docs.docker.com/engine/)\n📁[Documentación hub](https://docs.docker.com/docker-hub/)\n📁[Documentación docker compose](https://docs.docker.com/compose/compose-file/compose-file-v3/#entrypoint)\n\n## INSTALAR DOCKER EN UBUNTU\n\n### INSTALAR DOCKER\nPrimero, actualice su lista de paquetes existente: \n~~~\nsudo apt update\n~~~\n\nA continuación, instale algunos paquetes de requisitos previos que permitan a apt usar paquetes a través de HTTPS: \n~~~\nsudo apt install apt-transport-https ca-certificates curl software-properties-common\n~~~\n\nLuego, añada la clave de GPG para el repositorio oficial de Docker en su sistema: \n~~~\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n~~~\n\nAgregue el repositorio de Docker a las fuentes de APT: \n~~~\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\n~~~\n\nA continuación, actualice el paquete de base de datos con los paquetes de Docker del repositorio recién agregado: \n~~~\nsudo apt update\n~~~\n\nPor último, instale Docker:\n~~~\nsudo apt install docker-ce\n~~~\n\nCompruebe que funcione: \n~~~\nsudo systemctl status docker\n~~~\n\nEjecutar el comando Docker sin sudo, si desea evitar escribir sudo al ejecutar el comando docker, agregue su nombre de usuario al grupo docker: \n~~~\nsudo usermod -aG docker ${USER}\n~~~\n\n### Instalar Docker Compose\nEl siguiente comando descargará la versión 2.2.2 y guardará el archivo ejecutable en /usr/local/bin/docker-compose, que hará que este software esté globalmente accesible como docker-compose, Si desea descargar la versión más reciente, ir al enlace: https://github.com/docker/compose/releases y modificar la versión:\n\n~~~\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n~~~\nLe damos permisos de ejecución:\n~~~\nsudo chmod +x /usr/local/bin/docker-compose\n~~~\n\nPara verificar que la instalación se realizó correctamente, puede ejecutar:\n\n~~~\ndocker-compose --version\n~~~\n\n## INSTALAR DOCKER EN RASPBERRY O NANOPI\n\n### Preparación de la Raspberry Pi\nInstalar los kernel-headers para el sistema operativo. Esto es importante, ya que si no instala los encabezados del kernel, Docker no funcionará.\n~~~\nsudo apt install raspberrypi-kernel raspberrypi-kernel-headers\n~~~\n\n### INSTALAR DOCKER\nPrimero, actualice su lista de paquetes existente: \n~~~\nsudo apt update\n~~~\n\nA continuación, instale algunos paquetes de requisitos previos que permitan a apt usar paquetes a través de HTTPS: \n~~~\nsudo apt install apt-transport-https ca-certificates curl software-properties-common\nsudo apt install -y libffi-dev libssl-dev python3 python3-pip\nsudo apt install iptables-persistent\nsudo apt install unattended-upgrades\n~~~\n\nPor último, instale Docker:\n~~~\nsudo curl -sSL https://get.docker.com | sh\n~~~\n\nCompruebe que funcione: \n~~~\nsudo systemctl status docker\n~~~\n\nEjecutar el comando Docker sin sudo, si desea evitar escribir sudo al ejecutar el comando docker, agregue su nombre de usuario al grupo docker: \n~~~\nsudo usermod -aG docker ${USER}\n~~~\n\n### Instalar Docker Compose\nEl siguiente comando descargará e instalará docker-compose:\n~~~\nsudo apt install -y docker-compose\n~~~\n\nPara verificar que la instalación se realizó correctamente, puede ejecutar:\n~~~\ndocker-compose --version\n~~~\n\n## CONTENEDORES DOCKER\n* [traefik](traefik/) - reverse proxy and SSL manager.\n* [Adguard](Adguard/) -  Network-wide ads \u0026 trackers blocking DNS server.\n* [Grafana](Grafana/) - The open-source platform for monitoring and observability.\n* [Heimdall](Heimdall/) - Heimdall is an elegant solution to organise all your web applications.\n* [Pihole](Pihole/) - The Pi-hole® is a DNS sinkhole that protects your devices from unwanted content without installing any client-side software.\n* [Portainer](Portainer/) - Portainer is a lightweight service delivery platform for containerized applications that can be used to manage Docker, Swarm, Kubernetes and ACI environments.\n* [syncthing](syncthing/) - Syncthing is a continuous file synchronization program.\n* [wikijs](wikijs/) - Wiki.js is an open source project that has been made possible due to the generous contributions by community backers.\n* [fail2ban](fail2ban/) - security tool (ban IP).\n* [freshrss](freshrss/) - RSS feed aggregator.\n* [gotify](gotify/) - notification service.\n* [nextcloud](https://github.com/JuanRodenas/Nextcloud_server) - file-hosting software system.\n* [transmission](transmission/) - fast, easy, and free BitTorrent client.\n* [trilium](trilium/) - hierarchical note-taking application.\n* [vaultwarden](vaultwarden/) - password manager.\n* [watchtower](watchtower/) - automatic docker images update.\n* [wireguard](https://github.com/JuanRodenas/Wireguard) - Wireguard is a selfhosted vpn.\n* [wordpress](https://github.com/JuanRodenas/Wordpress) - WordPress is a blogging tool with a content management system (CMS).\n\n\n# Information\n\nThe overall guide is centered around example. Each of the services is tied with either a docker-compose or a script, everything has been made so that each service is almost ready to use, only a few user-specific variable are required.\n\nAll services respect a certain format :\n\n- **About** - basic overview of the service\n- **Table of Contents**\n- **Information** - detailed information about the service and the example\n- **Usage** - required configuration and commands to use the service\n- **Update** - how to update the container, most of the time it is using watchtower\n\n\n## Docker and UFW\n\nUFW is a popular iptables front end on Ubuntu that makes it easy to manage firewall rules. But when Docker is installed, Docker bypass the UFW rules and the published ports can be accessed from outside.\n\nAn [easy fix](https://github.com/chaifeng/ufw-docker) is available, allowing to easily manage your firewall. As most of the services are going through Traefik, only the port 443 is mandatory. If another port is required, it will be listed in the requirements.\n\n## Docker tips\n\n* Get shell access whilst the container is running\n    ```\n    docker exec -it container-name /bin/bash\n    ```\n* Monitor the logs of the container in realtime\n    ```\n    docker logs -f container-name\n    ```\n\n## Docker images\n\nMost images are used with the tag `latest` as it simplify the testing. It is usually not recommended running an image with this tag as it is not very dynamic and precise.\nFeel free to experiment with the provided docker-compose examples and then use a better versionning system. For more information about [latest](https://vsupalov.com/docker-latest-tag/).\n\n## Updating docker images\n\nThis repository images are automatically updated with watchtower, however this can be a security risk. More details in the [watchtower guide](watchtower).\n\nIf you want to manually update an image, you can use docker-compose.\n\n* Update all images for a specific docker-compose file\n    ```\n    sudo docker-compose pull\n    ```\n* Update a single image\n    ```\n    sudo docker-compose pull image-name\n    ```\n* Recreate all updated containers with docker-compose\n    ```\n    sudo docker-compose up -d\n    ```\n* Recreate a single container with docker-compose\n    ```\n    sudo docker-compose up -d container-name\n    ```\n* Remove all dangling and unused images\n    ```\n    sudo docker image prune  -a\n    ```\n\n## Docker tools\n\nSome useful tools to manage your private docker infrastructure.\n\n- [lazydocker](https://github.com/jesseduffield/lazydocker) - A simple terminal UI for both docker and docker-compose, written in Go with the gocui library. By @jesseduffield\n- [dive](https://github.com/wagoodman/dive) - A tool for exploring each layer in a docker image. By @anchore.\n- [grype](https://github.com/anchore/grype) - A vulnerability scanner for container images and filesystems. By @anchore.\n\n## Docker resources \n\nA compilation of resources mainly focus on security.\n\n- [CIS Docker 1.13.0 Benchmark](https://downloads.cisecurity.org/#/) - provides prescriptive guidance for establishing a secure configuration posture for Docker\n- [Docker security](https://docs.docker.com/engine/security/) - official docker documentation about security\n- [Docker security OWASP](https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html) - OWASP security cheat sheet\n\n### Credits\nBuy me a coffee so I can continue creating content. Invítame a un café para que pueda seguir creando contenidos.\n#\n\u003ca href=\"https://www.paypal.com/donate/?hosted_button_id=HVJT2YDSHRZY2\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanico10%2Fselfhosted","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuanico10%2Fselfhosted","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanico10%2Fselfhosted/lists"}