Access Donetick
- Mở trình duyệt của bạn và truy cập:
https://<SERVER_IP> - A browser SSL warning is expected (self-signed certificate).
- Create a new account on first visit.
Các tập tin và thư mục quan trọng
- Thư mục cài đặt:
/opt/donetick - Docker Compose:
/opt/donetick/docker-compose.yml - Tệp cấu hình:
/opt/donetick/config/selfhosted.yaml - Thư mục dữ liệu:
/opt/donetick/data - SQLite DB:
/opt/donetick/data/donetick.db - Cấu hình Nginx:
/etc/nginx/sites-available/donetick - Chứng chỉ SSL:
/etc/nginx/ssl/
Quản lý dịch vụ
cd /opt/donetick
# Start
docker compose up -d
# Stop
docker compose down
# Restart container only
docker restart donetick
# Logs
docker logs -f donetick
Disable User Registration (Optional)
Edit config (/opt/donetick/config/selfhosted.yaml):
is_user_creation_disabled: true
Then restart:
cd /opt/donetick && docker compose restart donetick
Kích hoạt SSL với tên miền
1. Trỏ tên miền của bạn đến địa chỉ IP của máy chủ.
2. Update the public_host in Donetick configuration (/opt/donetick/config/selfhosted.yaml):
public_host: "https://yourdomain.com"
3. Restart Donetick service:
cd /opt/donetick/
docker compose restart
4. Chỉnh sửa cấu hình Nginx và thay thế cả hai server_name <IP>; với tên miền của bạn (<yourdomain.com>) cho cả khối HTTP (cổng 80) và HTTPS (cổng 443):
vim /etc/nginx/sites-available/donetick
5. Cài đặt Certbot:
apt install -y certbot python3-certbot-nginx
6. Chạy lệnh sau để tạo chứng chỉ Let's Encrypt hợp lệ:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
7. Replace SSL paths in Nginx config:
vim /etc/nginx/sites-available/donetick
# Before:
# ssl_certificate /etc/nginx/ssl/donetick.crt;
# ssl_certificate_key /etc/nginx/ssl/donetick.key;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
8. Khởi động lại Nginx để áp dụng các thay đổi:
systemctl restart nginx
9. Mở trình duyệt của bạn và truy cập: https://yourdomain.com
Mobile App Requirement
- If you plan to use the Android or iOS apps, your Donetick instance must be publicly accessible and served over HTTPS with a valid certificate. The mobile apps will not connect to a local-only or insecure HTTP address.
- Set up a domain and configure SSL using Certbot and Let’s Encrypt as described above.