Access SparkyFitness
- Open:
https://<SERVER_IP> - Accept the self-signed certificate warning.
- Sign up to create a new account.
- The first registered account will be granted administrator privileges.
User Registration
User registration is enabled by default.
To disable new registrations, edit /root/sparkyfitness/.env and set SPARKY_FITNESS_DISABLE_SIGNUP=true.
Apply the change:
cd /root/sparkyfitness
docker compose up -d
Important Files & Directories
- Install Path:
/root/sparkyfitness - Docker Compose File:
/root/sparkyfitness/docker-compose.yml - Environment File:
/root/sparkyfitness/.env - PostgreSQL Data:
/root/sparkyfitness/postgresql - User Uploads:
/root/sparkyfitness/uploads - Application Backups:
/root/sparkyfitness/backup - Nginx Configuration:
/etc/nginx/sites-available/sparkyfitness - SSL Certificate:
/etc/nginx/ssl/sparkyfitness.crt - SSL Private Key:
/etc/nginx/ssl/sparkyfitness.key
Container Management
View containers:
docker ps
View logs:
cd /root/sparkyfitness
docker compose logs -f
Restart services:
cd /root/sparkyfitness
docker compose restart
Stop services:
cd /root/sparkyfitness
docker compose down
Start services:
cd /root/sparkyfitness
docker compose up -d
Nginx Management
Test configuration:
nginx -t
Restart Nginx:
systemctl restart nginx
Reload Nginx:
systemctl reload nginx
Enabling SSL with a Domain
1. Point your domain to the server IP.
2. Edit Nginx config and replace server_name _; with your domain (server_name <your-domain>) for both HTTP (port 80) and HTTPS (port 443) blocks:
vim /etc/nginx/sites-available/sparkyfitness
3. Install Certbot:
apt install -y certbot python3-certbot-nginx
4. Run the following command to generate a valid Let's Encrypt certificate:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Replace SSL paths in Nginx config :
vim /etc/nginx/sites-available/sparkyfitness
# Before:
# ssl_certificate /etc/nginx/ssl/sparkyfitness.crt;
# ssl_certificate_key /etc/nginx/ssl/sparkyfitness.key;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
6. Reload Nginx to apply the changes:
systemctl reload nginx
7. Edit the /root/sparkyfitness/.env file to set your domain name: SPARKY_FITNESS_FRONTEND_URL=https://yourdoamin.com
8. Recreate the services:
cd /root/sparkyfitness
docker compose up -d
9. Open your browser and visit: https://yourdomain.com