Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STL Manager

Self-hosted STL library for 3D printing. Runs in Docker, no external dependencies.

Upload STL files, browse them in a 3D viewer, tag and organize them, import from network shares. Everything stays local — SQLite + plain filesystem.


Setup

git clone <repo-url>
cd stl-manager
cp .env.example .env
docker compose up -d --build

http://localhost:8000


Configuration

.env variables (all optional, defaults work fine for local use):

Variable Default Notes
STL_DATA_DIR /data/stl STL storage path inside the container
THUMBNAIL_DIR /data/thumbnails Thumbnail storage
DB_PATH /data/stl_manager.db SQLite database
SHARE_PATHS Comma-separated paths to network shares (see below)
MAX_UPLOAD_SIZE_MB 500 Per-file upload limit
LOG_LEVEL info debug / info / warning / error

Network Shares (NFS / SMB)

Mount the share on the host, pass it into the container, tell the app where it is.

/etc/fstab:

//nas.local/3dprints /mnt/share1 cifs credentials=/etc/samba/.creds,ro,iocharset=utf8 0 0

docker-compose.yml:

volumes:
  - ./data:/data
  - /mnt/share1:/mnt/share1:ro

.env:

SHARE_PATHS=/mnt/share1

The Import view will then show /mnt/share1 as a browsable root.


Reverse Proxy

The app speaks plain HTTP on port 8000. Caddy example:

stl.example.com {
    reverse_proxy localhost:8000
}

Deploying to a Remote Host

chmod +x deploy.sh
./deploy.sh user@host
# custom path + SSH port:
./deploy.sh user@host /opt/stl-manager 2222

Rsyncs the source, builds the image on the remote, starts the container. If no .env exists on the remote, it copies .env.example and prints a reminder to fill it in.

To also push your local STL library and database:

MIGRATE_DATA=1 ./deploy.sh user@host

Needs rsync + ssh locally, Docker Compose v2 on the remote.


Backup

Only ./data/ matters:

data/
├── stl/
├── thumbnails/
└── stl_manager.db
tar -czf stl-manager-$(date +%F).tar.gz ./data/

Running without Docker

python -m venv .venv && source .venv/bin/activate
pip install -r backend/requirements.txt

STL_DATA_DIR=./data/stl \
THUMBNAIL_DIR=./data/thumbnails \
DB_PATH=./data/stl_manager.db \
uvicorn backend.main:app --reload --port 8000

Stack

Python 3.12 / FastAPI / SQLite (async SQLAlchemy) / Three.js / Vanilla JS — no frontend framework, no external database.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages