Installation¶
This guide covers all methods for installing Bambuddy on your system.
Requirements¶
Before you begin, ensure you have:
| Requirement | Details |
|---|---|
| Python | 3.10+ (3.11 or 3.12 recommended) |
| Network | Same LAN as your Bambu Lab printer |
| Printer | LAN Mode enabled (see guide) |
Docker Alternative
If you prefer containers, check out the Docker installation guide - it's even simpler!
Quick Install¶
# Install prerequisites
sudo apt update
sudo apt install python3 python3-venv python3-pip git
# Clone and setup
git clone https://github.com/maziggy/bambuddy.git
cd bambuddy
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Run
uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
-
Download and install Python 3.12
Important
Check "Add Python to PATH" during installation!
-
Open PowerShell and run:
Open http://localhost:8000 in your browser.
Running as a Service¶
For production use, run Bambuddy as a system service that starts automatically.
Create the service file:
Add this content (adjust paths for your system):
[Unit]
Description=BamBuddy Print Archive
After=network.target
[Service]
Type=simple
User=YOUR_USERNAME
Group=YOUR_USERNAME
WorkingDirectory=/home/YOUR_USERNAME/bambuddy
Environment="PATH=/home/YOUR_USERNAME/bambuddy/venv/bin"
# Kill any zombie ffmpeg processes before starting/after stopping
# The - prefix ignores errors if no ffmpeg processes exist
ExecStartPre=-/usr/bin/pkill -9 ffmpeg
ExecStopPost=-/usr/bin/pkill -9 ffmpeg
# Ensure directories exist and have correct permissions
# The + prefix runs the command as root even though User= is set
ExecStartPre=+/bin/mkdir -p /home/YOUR_USERNAME/bambuddy/logs
ExecStartPre=+/bin/mkdir -p /home/YOUR_USERNAME/bambuddy/archive
ExecStartPre=+/bin/chown -R YOUR_USERNAME:YOUR_USERNAME /home/YOUR_USERNAME/bambuddy/logs
ExecStartPre=+/bin/chown -R YOUR_USERNAME:YOUR_USERNAME /home/YOUR_USERNAME/bambuddy/archive
ExecStart=/home/YOUR_USERNAME/bambuddy/venv/bin/uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Why kill ffmpeg?
BamBuddy uses ffmpeg for camera streaming. Sometimes ffmpeg processes can become orphaned when the service restarts. The ExecStartPre and ExecStopPost commands ensure clean restarts.
Enable and start:
Check status:
View logs:
Create the plist file:
Add this content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.bambuddy</string>
<key>ProgramArguments</key>
<array>
<string>/Users/YOUR_USERNAME/bambuddy/venv/bin/uvicorn</string>
<string>backend.app.main:app</string>
<string>--host</string>
<string>0.0.0.0</string>
<string>--port</string>
<string>8000</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/YOUR_USERNAME/bambuddy</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
Load and start:
Configuration¶
Configure Bambuddy using environment variables or a .env file:
Environment Variables¶
| Variable | Default | Description |
|---|---|---|
DEBUG | false | Enable debug mode (verbose logging) |
LOG_LEVEL | INFO | Log level: DEBUG, INFO, WARNING, ERROR |
LOG_TO_FILE | true | Write logs to logs/bambuddy.log |
Production Settings (default)¶
- INFO level logging
- SQLAlchemy and HTTP library noise suppressed
- Logs written to
logs/bambuddy.log(5MB rotating, 3 backups)
Development Settings¶
For debugging, create a .env file:
This enables:
- DEBUG level logging (very verbose)
- All SQL queries logged
- Useful for troubleshooting printer connections
Network Requirements¶
Ensure your firewall allows these connections:
| Port | Protocol | Direction | Purpose |
|---|---|---|---|
| 8000 | HTTP | Inbound | Bambuddy web interface |
| 8883 | MQTT/TLS | Outbound | Printer communication |
| 990 | FTPS | Outbound | File transfers from printer |
Accessing from Other Devices
To access Bambuddy from other devices on your network, use your server's IP address instead of localhost. For example: http://192.168.1.100:8000
Updating¶
Manual Update¶
Then restart the service:
Auto Updates¶
Bambuddy includes automatic update checking. Go to Settings to check for updates and apply them with one click.
What Gets Updated
The auto-update feature:
- Downloads the latest release
- Updates Python dependencies
- Restarts the application
- Does NOT affect your database or settings
Build Frontend from Source¶
The repository includes pre-built frontend files. To build from source:
Next Steps¶
Now that Bambuddy is installed: