@@ -8,19 +8,19 @@ This guide provides comprehensive deployment instructions for the Torrust Tracke
8
8
across all supported environments:
9
9
10
10
- ** 🏠 Local Development** : KVM/libvirt for development and testing
11
- - ** 🧪 Staging Environment** : Hetzner Cloud with ` torrust-demo.dev ` domain
11
+ - ** 🧪 Staging Environment** : Hetzner Cloud with ` staging- torrust-demo.com ` domain
12
12
- ** 🚀 Production Environment** : Hetzner Cloud with ` torrust-demo.com ` domain
13
13
14
14
The deployment follows ** twelve-factor app methodology** with Infrastructure as Code
15
15
principles for reproducible, maintainable deployments.
16
16
17
17
### Deployment Environments
18
18
19
- | Environment | Provider | Domain | Purpose | Status |
20
- | --------------- | ------------- | ------------------ | ----------------------------- | ------------------------ |
21
- | ** Development** | KVM/libvirt | ` test.local ` | Local testing and development | ✅ ** Fully Implemented** |
22
- | ** Staging** | Hetzner Cloud | ` torrust-demo.dev ` | Pre-production testing | 🚧 ** In Development** |
23
- | ** Production** | Hetzner Cloud | ` torrust-demo.com ` | Live service | 🚧 ** Planned** |
19
+ | Environment | Provider | Domain | Purpose | Status |
20
+ | --------------- | ------------- | -------------------------- | ----------------------------- | ------------------------ |
21
+ | ** Development** | KVM/libvirt | ` test.local ` | Local testing and development | ✅ ** Fully Implemented** |
22
+ | ** Staging** | Hetzner Cloud | ` staging- torrust-demo.com ` | Pre-production testing | 🚧 ** In Development** |
23
+ | ** Production** | Hetzner Cloud | ` torrust-demo.com ` | Live service | 🚧 ** Planned** |
24
24
25
25
## 📋 Prerequisites
26
26
@@ -506,7 +506,7 @@ Infrastructure: Hetzner Cloud servers with floating IPs
506
506
507
507
Register your domains at any registrar. For this guide:
508
508
509
- - ** Staging Domain** : ` torrust-demo.dev `
509
+ - ** Staging Domain** : ` staging- torrust-demo.com `
510
510
- ** Production Domain** : ` torrust-demo.com `
511
511
512
512
** Note** : You can use any registrar (cdmon.com, Namecheap, GoDaddy, etc.). The key is
@@ -518,7 +518,7 @@ pointing the nameservers to Hetzner DNS.
518
518
519
519
1 . Go to [ Hetzner DNS Console] ( https://dns.hetzner.com/ )
520
520
2 . Click ** "Create zone"**
521
- 3 . Enter your domain: ` torrust-demo.dev `
521
+ 3 . Enter your domain: ` staging- torrust-demo.com `
522
522
4 . Click ** "Create zone"**
523
523
524
524
Repeat for production domain: ` torrust-demo.com `
@@ -537,7 +537,7 @@ After creating the zone, note the assigned nameservers:
537
537
538
538
1 . Log in to your cdmon.com control panel
539
539
2 . Navigate to ** "Domain Management"** → ** "DNS Management"**
540
- 3 . Find your domain (` torrust-demo.dev ` )
540
+ 3 . Find your domain (` staging- torrust-demo.com ` )
541
541
4 . Click ** "Modify DNS"** or ** "Change Nameservers"**
542
542
5 . Replace existing nameservers with Hetzner nameservers:
543
543
- ` hydrogen.ns.hetzner.com `
@@ -558,10 +558,10 @@ The process is similar for other registrars:
558
558
#### 4.1 Using Hetzner DNS Console
559
559
560
560
1 . Go to [ Hetzner DNS Console] ( https://dns.hetzner.com/ )
561
- 2 . Click on your zone (` torrust-demo.dev ` )
561
+ 2 . Click on your zone (` staging- torrust-demo.com ` )
562
562
3 . Add the following records:
563
563
564
- ** Staging Environment (` torrust-demo.dev ` )** :
564
+ ** Staging Environment (` staging- torrust-demo.com ` )** :
565
565
566
566
| Type | Name | Value | TTL |
567
567
| ---- | --------- | ----------------------- | --- |
@@ -616,11 +616,11 @@ create_record() {
616
616
617
617
# Setup staging DNS
618
618
setup_staging_dns () {
619
- echo " Setting up DNS for torrust-demo.dev ..."
620
- ZONE_ID=$( get_zone_id " torrust-demo.dev " )
619
+ echo " Setting up DNS for staging- torrust-demo.com ..."
620
+ ZONE_ID=$( get_zone_id " staging- torrust-demo.com " )
621
621
622
622
if [[ -z " $ZONE_ID " ]]; then
623
- echo " Error: Zone not found for torrust-demo.dev "
623
+ echo " Error: Zone not found for staging- torrust-demo.com "
624
624
exit 1
625
625
fi
626
626
@@ -696,27 +696,27 @@ chmod +x manage-dns.sh
696
696
697
697
``` bash
698
698
# Check if nameservers have propagated
699
- dig NS torrust-demo.dev
699
+ dig NS staging- torrust-demo.com
700
700
701
701
# Should show Hetzner nameservers:
702
- # torrust-demo.dev . 3600 IN NS hydrogen.ns.hetzner.com.
703
- # torrust-demo.dev . 3600 IN NS oxygen.ns.hetzner.com.
704
- # torrust-demo.dev . 3600 IN NS helium.ns.hetzner.de.
702
+ # staging- torrust-demo.com . 3600 IN NS hydrogen.ns.hetzner.com.
703
+ # staging- torrust-demo.com . 3600 IN NS oxygen.ns.hetzner.com.
704
+ # staging- torrust-demo.com . 3600 IN NS helium.ns.hetzner.de.
705
705
```
706
706
707
707
#### 5.2 Test DNS Resolution
708
708
709
709
``` bash
710
710
# Test staging domain resolution
711
- dig tracker.torrust-demo.dev
712
- dig AAAA tracker.torrust-demo.dev
711
+ dig tracker.staging- torrust-demo.com
712
+ dig AAAA tracker.staging- torrust-demo.com
713
713
714
714
# Test production domain resolution
715
715
dig tracker.torrust-demo.com
716
716
dig AAAA tracker.torrust-demo.com
717
717
718
718
# Verify the records point to your floating IPs
719
- nslookup tracker.torrust-demo.dev
719
+ nslookup tracker.staging- torrust-demo.com
720
720
nslookup tracker.torrust-demo.com
721
721
```
722
722
@@ -729,7 +729,7 @@ Use online tools to verify global propagation:
729
729
730
730
Search for:
731
731
732
- - ` tracker.torrust-demo.dev ` (A record)
732
+ - ` tracker.staging- torrust-demo.com ` (A record)
733
733
- ` tracker.torrust-demo.com ` (A record)
734
734
735
735
### Step 6: DNS Management Scripts
@@ -743,7 +743,7 @@ For ongoing DNS management, create utility scripts:
743
743
# list-dns-records.sh
744
744
745
745
HDNS_TOKEN=" your-hetzner-dns-token"
746
- DOMAIN=${1:- " torrust-demo.dev " }
746
+ DOMAIN=${1:- " staging- torrust-demo.com " }
747
747
748
748
# Get zone ID
749
749
ZONE_ID=$( curl -s -H " Auth-API-Token: $HDNS_TOKEN " \
@@ -772,7 +772,7 @@ curl -s -H "Auth-API-Token: $HDNS_TOKEN" \
772
772
# update-dns-record.sh
773
773
774
774
HDNS_TOKEN=" your-hetzner-dns-token"
775
- DOMAIN=" torrust-demo.dev "
775
+ DOMAIN=" staging- torrust-demo.com "
776
776
SUBDOMAIN=" tracker"
777
777
NEW_IP=" 78.47.140.132"
778
778
@@ -815,8 +815,8 @@ automatic subdomain concatenation. Configure each service domain separately.
815
815
When you configure:
816
816
817
817
``` bash
818
- TRACKER_DOMAIN=tracker.torrust-demo.dev
819
- GRAFANA_DOMAIN=grafana.torrust-demo.dev
818
+ TRACKER_DOMAIN=tracker.staging- torrust-demo.com
819
+ GRAFANA_DOMAIN=grafana.staging- torrust-demo.com
820
820
```
821
821
822
822
The system uses these exact domain names:
@@ -827,8 +827,8 @@ The system uses these exact domain names:
827
827
#### Required Domain Configuration
828
828
829
829
- ** Staging** :
830
- - ` TRACKER_DOMAIN=tracker.torrust-demo.dev `
831
- - ` GRAFANA_DOMAIN=grafana.torrust-demo.dev `
830
+ - ` TRACKER_DOMAIN=tracker.staging- torrust-demo.com `
831
+ - ` GRAFANA_DOMAIN=grafana.staging- torrust-demo.com `
832
832
- ** Production** :
833
833
- ` TRACKER_DOMAIN=tracker.torrust-demo.com `
834
834
- ` GRAFANA_DOMAIN=grafana.torrust-demo.com `
@@ -975,21 +975,21 @@ HCLOUD_FLOATING_IPV6=2a01:4f8:1c17:a01d::1
975
975
976
976
# === HETZNER DNS CONFIGURATION ===
977
977
HDNS_TOKEN=your-hetzner-dns-token
978
- HDNS_ZONE_NAME=torrust-demo.dev
978
+ HDNS_ZONE_NAME=staging- torrust-demo.com
979
979
980
980
# === VM CONFIGURATION ===
981
981
VM_TYPE=cx22 # 4 vCPU, 8GB RAM, 80GB SSD
982
982
VM_LOCATION=nbg1 # Nuremberg
983
983
VM_IMAGE=ubuntu-24.04
984
984
985
985
# === DOMAIN CONFIGURATION ===
986
- TRACKER_DOMAIN=tracker.torrust-demo.dev
987
- GRAFANA_DOMAIN=grafana.torrust-demo.dev
986
+ TRACKER_DOMAIN=tracker.staging- torrust-demo.com
987
+ GRAFANA_DOMAIN=grafana.staging- torrust-demo.com
988
988
989
989
# === SSL CONFIGURATION ===
990
990
ENABLE_SSL=true
991
991
SSL_GENERATION_METHOD=letsencrypt
992
- CERTBOT_EMAIL=admin@torrust-demo.dev
992
+ CERTBOT_EMAIL=admin@staging- torrust-demo.com
993
993
994
994
# === DATABASE CONFIGURATION ===
995
995
MYSQL_ROOT_PASSWORD=secure_staging_root_password
@@ -1138,11 +1138,11 @@ make app-health-check ENVIRONMENT_TYPE=staging
1138
1138
1139
1139
``` bash
1140
1140
# Test staging endpoints
1141
- curl -s https://tracker.torrust-demo.dev /api/health_check | jq
1142
- curl -s " https://tracker.torrust-demo.dev /api/v1/stats?token=$ADMIN_TOKEN " | jq
1141
+ curl -s https://tracker.staging- torrust-demo.com /api/health_check | jq
1142
+ curl -s " https://tracker.staging- torrust-demo.com /api/v1/stats?token=$ADMIN_TOKEN " | jq
1143
1143
1144
1144
# Monitor staging
1145
- open https://grafana.torrust-demo.dev
1145
+ open https://grafana.staging- torrust-demo.com
1146
1146
```
1147
1147
1148
1148
### Production Workflow (Coming Soon)
1194
1194
1195
1195
#### Cloud Services
1196
1196
1197
- | Service | Staging URL | Production URL | Purpose |
1198
- | ----------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ------------ |
1199
- | ** Tracker API** | ` https://tracker.torrust-demo.dev /api/health_check ` | ` https://tracker.torrust-demo.com/api/health_check ` | Health check |
1200
- | ** Tracker Stats** | ` https://tracker.torrust-demo.dev /api/v1/stats?token=TOKEN ` | ` https://tracker.torrust-demo.com/api/v1/stats?token=TOKEN ` | Statistics |
1201
- | ** HTTP Tracker** | ` https://tracker.torrust-demo.dev /announce ` | ` https://tracker.torrust-demo.com/announce ` | HTTP tracker |
1202
- | ** UDP Tracker** | ` udp://tracker.torrust-demo.dev :6868/announce ` | ` udp://tracker.torrust-demo.com:6868/announce ` | UDP tracker |
1203
- | ** UDP Tracker** | ` udp://tracker.torrust-demo.dev :6969/announce ` | ` udp://tracker.torrust-demo.com:6969/announce ` | UDP tracker |
1204
- | ** Grafana** | ` https://grafana.torrust-demo.dev ` | ` https://grafana.torrust-demo.com ` | Monitoring |
1197
+ | Service | Staging URL | Production URL | Purpose |
1198
+ | ----------------- | ------------------------------------------------------------------- | ----------------------------------------------------------- | ------------ |
1199
+ | ** Tracker API** | ` https://tracker.staging- torrust-demo.com /api/health_check ` | ` https://tracker.torrust-demo.com/api/health_check ` | Health check |
1200
+ | ** Tracker Stats** | ` https://tracker.staging- torrust-demo.com /api/v1/stats?token=TOKEN ` | ` https://tracker.torrust-demo.com/api/v1/stats?token=TOKEN ` | Statistics |
1201
+ | ** HTTP Tracker** | ` https://tracker.staging- torrust-demo.com /announce ` | ` https://tracker.torrust-demo.com/announce ` | HTTP tracker |
1202
+ | ** UDP Tracker** | ` udp://tracker.staging- torrust-demo.com :6868/announce ` | ` udp://tracker.torrust-demo.com:6868/announce ` | UDP tracker |
1203
+ | ** UDP Tracker** | ` udp://tracker.staging- torrust-demo.com :6969/announce ` | ` udp://tracker.torrust-demo.com:6969/announce ` | UDP tracker |
1204
+ | ** Grafana** | ` https://grafana.staging- torrust-demo.com ` | ` https://grafana.torrust-demo.com ` | Monitoring |
1205
1205
1206
1206
### Service Management Commands
1207
1207
@@ -1299,7 +1299,7 @@ curl -I https://tracker.torrust-demo.com
1299
1299
1300
1300
** ⚠️ Important** : Grafana requires manual setup after deployment.
1301
1301
1302
- 1 . ** Access Grafana** : ` https://grafana.torrust-demo.dev ` (or production URL)
1302
+ 1 . ** Access Grafana** : ` https://grafana.staging- torrust-demo.com ` (or production URL)
1303
1303
2 . ** Login** : ` admin/admin ` (change password immediately)
1304
1304
3 . ** Add Prometheus data source** : ` http://prometheus:9090 `
1305
1305
4 . ** Import dashboards** from ` application/share/grafana/dashboards/ `
@@ -1414,11 +1414,11 @@ systemctl status ufw
1414
1414
1415
1415
``` bash
1416
1416
# Check nameserver propagation
1417
- dig NS torrust-demo.dev
1417
+ dig NS staging- torrust-demo.com
1418
1418
1419
1419
# Test DNS resolution
1420
- dig tracker.torrust-demo.dev
1421
- nslookup tracker.torrust-demo.dev
1420
+ dig tracker.staging- torrust-demo.com
1421
+ nslookup tracker.staging- torrust-demo.com
1422
1422
1423
1423
# Check global propagation
1424
1424
# Use whatsmydns.net or dnschecker.org
0 commit comments