Access
- Відкрийте браузер і перейдіть за адресою:
https://<SERVER_IP> - Попередження браузера SSL очікується (самопідписний сертифікат)
- Потрібна автентифікація (спливаюче вікно Basic Auth)
- Метод автентифікації: HTTP Basic Auth
- Облікові дані зберігаються в захищеному вигляді в:
/root/.cloudzy-creds
Важливі файли та директорії
- Install directory:
/opt/glance - Docker Compose:
/opt/glance/docker-compose.yml - Environment file:
/opt/glance/.env - Config directory:
/opt/glance/config - Home config:
/opt/glance/config/home.yml - Main config:
/opt/glance/config/glance.yml - Assets directory:
/opt/glance/assets - Custom CSS:
/opt/glance/assets/user.css - Nginx config:
/etc/nginx/sites-available/glance.conf - SSL certificates:
/etc/nginx/ssl - Auth file:
/etc/nginx/auth/.glance-htpasswd - Credentials file:
/root/.glance-credentials
Керування стеком
Go до директорії встановлення:
cd /opt/glance
Основні команди Docker Compose:
# Check status
docker compose ps
# View logs (follow live)
docker compose logs -f
# Restart all services
docker compose restart
# Stop services
docker compose down
# Start again
docker compose up -d
Вимкнути Basic Auth HTTP в Nginx (необов'язково)
Відредагуйте файл сайту Nginx: /etc/nginx/sites-available/glance.conf
Видаліть або закоментуйте ці рядки:
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/auth/.glance-htpasswd;
Reload Nginx:
systemctl restart nginx
Увімкнення SSL з власним доменом
1. Вкажіть ваш домен на IP-адресу сервера.
2. Відредагуйте конфігурацію Nginx і замініть обидва значення server_name <IP>; на ваш домен (<your-domain>) для блоків HTTP (порт 80) і HTTPS (порт 443):
vim /etc/nginx/sites-available/glance.conf
3. Install Certbot:
apt install -y certbot python3-certbot-nginx
4. Виконайте наступну команду для отримання дійсного сертифіката Let's Encrypt:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Замініть шляхи SSL у конфігурації Nginx:
vim /etc/nginx/sites-available/glance.conf
# Before:
# ssl_certificate /etc/nginx/ssl/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
6. Перезапустіть Nginx, щоб застосувати зміни:
systemctl restart nginx
7. Відкрийте браузер і перейдіть за адресою: https://yourdomain.com