Skip to main content
50% off all plans, limited time. Starting at $2.48/mo
SparkyFitness

SparkyFitness

SparkyFitness is a full-stack fitness tracking application for nutrition, exercise, body measurements, and water intake, with AI-assisted food logging. A self-hosted MyFitnessPal alternative with 4,700+ GitHub stars.

At a glance

4.8k

GitHub stars

238

Active installs

Version Latest OS Ubuntu Server 24.04 LTS Min RAM 1 GB IP IPV4

Active installs is sample data (staging preview); real metric wires in before launch.

Access SparkyFitness

  1. Open: https://<SERVER_IP>
  2. Accept the self-signed certificate warning.
  3. Sign up to create a new account.
  4. 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

More in Self Hosted

Related apps.

Deploy SparkyFitness now. From $2.48/mo.