Linux
Welcome to the YourFamilyHub Installation Guide! Here you will find all commands nessary for starting front & backend.
THE LINUX VERSION IS FOLLOWING SOON! NO SUPPORT FOR THIS VERSION YET! INOFFICIAL: The following guide is ai generated and has not been tested yet. Feel free to give it a try. You whole data may be deleted. This is not safe yet! A official linux version will follow.
Prerequisites
Linux server with nginx installed
Node.js 18+ installed
Git installed
Installation
Download and extract GoldFamily:
# Create directory for the application
sudo mkdir -p /var/www/YourFamilyHub
cd /var/www/YourFamilyHub
# Download the latest release
curl -L https://github.com/maxigoldy/YourFamilyHubHub/releases/latest/download/YourFamilyHubHub-dist.tar.gz | sudo tar -xz
# Set proper permissions
sudo chown -R www-data:www-data /var/www/YourFamilyHub
sudo chmod +x /var/www/YourFamilyHub/start.shInstall dependencies:
cd /var/www/YourFamilyHub
sudo npm install --productionConfigure Nginx:
# Create nginx configuration
sudo tee /etc/nginx/sites-available/YourFamilyHub << 'EOF'
server {
listen 80;
server_name YourFamilyHub.local; # Change to your preferred domain
# Serve static files
location / {
root /var/www/YourFamilyHub/dist;
try_files $uri $uri/ /index.html;
# Security headers
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
}
# Proxy API requests to Node.js server
location /api/ {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
# Gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
}
EOF
# Enable the site
sudo ln -sf /etc/nginx/sites-available/YourFamilyHub /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginxCreate systemd service:
sudo tee /etc/systemd/system/YourFamilyHub.service << 'EOF'
[Unit]
Description=YourFamilyHub Self-Hosted Family Hub
After=network.target
[Service]
Type=simple
User=www-data
WorkingDirectory=/var/www/YourFamilyHub
ExecStart=/usr/bin/node server/server.js
Restart=always
RestartSec=10
Environment=NODE_ENV=production
Environment=PORT=3000
# Security settings
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/www/YourFamilyHub
[Install]
WantedBy=multi-user.target
EOF
# Enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable YourFamilyHub
sudo systemctl start YourFamilyHubVerify installation:
# Check service status
sudo systemctl status YourFamilyHub
# Check nginx status
sudo systemctl status nginx
# View logs if needed
sudo journalctl -u YourFamilyHub -fAccess your application:
Open your browser and navigate to
http://YourFamilyHub.local(or your server's IP)Complete the initial setup by creating an admin account
Configure your family code and app name
Local Network Access
To access YourFamilyHub from other devices on your network:
Find your server's IP address:
ip addr show | grep inetUpdate nginx configuration:
sudo nano /etc/nginx/sites-available/YourFamilyHub
# Change server_name to: server_name goldfamily.local YOUR_SERVER_IP;
sudo systemctl reload nginxAccess from other devices:
Use
http://YOUR_SERVER_IPin any browser on your local network
Optional: Custom Domain
To use a custom local domain (e.g., family.home):
Add to your router's DNS or each device's hosts file:
# On each device, edit /etc/hosts (Linux/Mac) or C:\Windows\System32\drivers\etc\hosts (Windows)
YOUR_SERVER_IP family.homeUpdate nginx configuration:
sudo nano /etc/nginx/sites-available/YourFamilyHub
# Change server_name to: server_name family.home;
sudo systemctl reload nginxManual Setup (Alternative)
If you prefer to set up manually:
Clone and build:
git clone https://github.com/maxigoldy/YourFamilyHub.git
cd YourFamilyHub
npm install
npm run buildStart the server:
node server/server.jsConfigure nginx to serve the
distfolder and proxy/apito your Node.js server
Backup
To backup your data:
# Copy the database file
cp /var/www/YourFamilyHub/data.json /path/to/backup/YourFamilyHub-backup-$(date +%Y%m%d).dbTo restore:
# Stop the service
sudo systemctl stop YourFamilyHub
# Replace the database
sudo cp /path/to/backup/YourFamilyHub-backup-YYYYMMDD.db /var/www/YourFamilyHub/data.json
sudo chown www-data:www-data /var/www/YourFamilyHub/data.json
# Start the service
sudo systemctl start YourFamilyHubTroubleshooting
Service won't start
# Check logs
sudo journalctl -u YourFamilyHub -n 50
# Check if port 3000 is available
sudo netstat -tlnp | grep :3000Database issues
# Check database file permissions
ls -la /var/www/YourFamilyHub/data.json
# Reset database (WARNING: This deletes all data)
sudo rm /var/www/YourFamilyHub/data.json
sudo systemctl restart YourFamilyHubNginx issues
# Test nginx configuration
sudo nginx -t
# Check nginx logs
sudo tail -f /var/log/nginx/error.logDevelopment
To run in development mode:
# Install dependencies
npm install
# Start development server (frontend)
npm run dev
# Start backend server (in another terminal)
node server/server.jsLast updated