diff --git a/README.md b/README.md new file mode 100644 index 0000000..626dbe3 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# selfhosted-traefik + +This is a setup/guide/repo for self hosting services like nextcloud, gitea etc. to avoid using SaaSS I have no control over. +I use Traefik and docker-compose to self hoste services. +Inspired by: https://github.com/awesome-selfhosted/awesome-selfhosted + +# Installation/Setup guide (WIP) + +1. Create a user named _compute_ on your server. _compute_ needs a home directory. +2. Create a _services_ directory in the home directory of compute with `mkdir service`. +3. navigat into _services_ with `cd services`. +4. Clone this git into services with `git clone https://gitea.sporada.eu/sporada/selfhosted-traefik.git`. +5. For every service copy the live.env.tpl to live.env file and edit it accordingly. 'cp live.env.tpl live.env' +6. Navigate into the traefik with cd traefik` folder and start traefik with `docker-compose --env-file live.env up` +7. Could be that you have to create some networks manually before starting everything. +7. Navigate into the other service folders and start every service with `docker-compose --env-file live.env up` after additional setup steps have been completed. (See netxt step!) +8. Every serveice hase an additional README.md where the specific setup steps for the service is explained. Like creating the .env file etc. Follow those steps and then start the service as said above. \ No newline at end of file diff --git a/gitea/live.env.tpl b/gitea/live.env.tpl new file mode 100644 index 0000000..de5c1b4 --- /dev/null +++ b/gitea/live.env.tpl @@ -0,0 +1,11 @@ +# MariaDB settings +MYSQL_ROOT_PASSWORD=password_db_root +MYSQL_DATABASE=gitea +MYSQL_USER=gitea +MYSQL_PASSWORD=pasword_db + +# Gitea +GITEA_ROOT=/home/compute/services/gitea + +# Domain +DOMAIN=domain.com diff --git a/nextcloud/live.env.tpl b/nextcloud/live.env.tpl new file mode 100644 index 0000000..80bd0cf --- /dev/null +++ b/nextcloud/live.env.tpl @@ -0,0 +1,31 @@ +# MariaDB settings +MYSQL_ROOT_PASSWORD=password_db_root +MYSQL_DATABASE=nextcloud +MYSQL_USER=nextcloud +MYSQL_PASSWORD=password_db +MYSQL_INITDB_SKIP_TZINFO=1 +MYSQL_HOST=nextcloud-db + +# Redis +REDIS_HOST=nextcloud-redis +REDIS_HOST_PASSWORD=password_redis + +# Nextcloud +NEXTCLOUD_ROOT=/home/compute/services/nextcloud +NEXTCLOUD_DATA_DIR=/srv/nextcloud/data +NEXTCLOUD_FQDN=your_nextcloud_sub_domain.domain.com +# This is the IP of the Trafik container. This changes if the traefik container restarts. If it is not the current traefik container IP collabora does not work. Check the current traefik container IP with: docker inspect traefik and get the IP from the Networks -> traefik_default -> IPAddress section +TRAEFIK_CONTAINER_IP=172.27.0.16 +PHP_MEMORY_LIMIT=2048M +PHP_UPLOAD_LIMIT=8G + +# Collabora +COLLABORA_FQDN=collabora.domain.com +COLLABORA_DOMAIN=nextcloud_sub_domain\\.domain\\.com # This is the domain which the collabora server is requests accepting from. +COLLABORA_USERNAME=username +COLLABORA_PASSWORD=password_collabora + +# COTURN +COTURN_SECRET=password_coturn +# Traefik +DOMAIN=domain.com diff --git a/nginx-rtmp/README.md b/nginx-rtmp/README.md new file mode 100644 index 0000000..683a1e5 --- /dev/null +++ b/nginx-rtmp/README.md @@ -0,0 +1 @@ +Not Traefik ready! diff --git a/traefik/README.md b/traefik/README.md new file mode 100644 index 0000000..00d7bdd --- /dev/null +++ b/traefik/README.md @@ -0,0 +1 @@ +WIP diff --git a/ts3/README.md b/ts3/README.md new file mode 100644 index 0000000..a5b0ccb --- /dev/null +++ b/ts3/README.md @@ -0,0 +1,2 @@ +This is now routed via traefik. +Still checking performance if working it is. diff --git a/wordpress/live.env.tpl b/wordpress/live.env.tpl new file mode 100644 index 0000000..48f0a23 --- /dev/null +++ b/wordpress/live.env.tpl @@ -0,0 +1,15 @@ +# Domain +DOMAIN=domain.com + +# Wordpress +WORDPRESS_ROOT=/home/compute/services/wordpress +WORDPRESS_DB_HOST=db +WORDPRESS_DB_USER=username +WORDPRESS_DB_PASSWORD=password_db +WORDPRESS_DB_NAME=wordpress + +# DB +MYSQL_DATABASE=wordpress +MYSQL_USER=username +MYSQL_PASSWORD=password_db +MYSQL_RANDOM_ROOT_PASSWORD=password_db_root