Installation
Run Stamon with Docker, Docker Compose or from source.
On this page
Stamon ships as a Docker image, k4htoo/stamon. You can also build it from
source.
Requirements
- Docker (recommended): install Docker.
- To build from source: Rust, Node.js and pnpm.
Run Stamon
Docker
docker run -d -e JWT_SECRET="$(openssl rand -base64 48)" -p 3000:3000 -v stamon-data:/app/data k4htoo/stamon
Docker Compose
Create a .env file with a secret generated for this deployment:
echo "JWT_SECRET=$(openssl rand -base64 48)" > .env
Then create a compose.yml file:
services:
stamon:
image: k4htoo/stamon
environment:
JWT_SECRET: ${JWT_SECRET:?set JWT_SECRET in .env}
ports:
- "3000:3000"
volumes:
- stamon-data:/app/data
# Only needed to monitor Docker containers; see the Docker monitor page.
# - /var/run/docker.sock:/var/run/docker.sock:ro
volumes:
stamon-data:
Then run:
docker compose up -d
From source
-
Clone the repository.
git clone https://github.com/krivahtoo/stamon.git cd stamon -
Build the frontend. The output is written to
frontend/build/.cd frontend pnpm install pnpm build cd .. -
Build and run the server.
cargo build --release DATA_PATH=./data JWT_SECRET="$(openssl rand -base64 48)" ASSETS_PATH=./frontend/build ./target/release/server
Stamon listens on port 3000. Open http://localhost:3000 and continue with First run.
Keep the data and the secret
The stamon-data volume (or DATA_PATH) holds the database, so keep it when
you replace the container. JWT_SECRET signs sign-in tokens: generate a unique
one for each deployment, never reuse an example value, and keep it the same
across restarts, or everyone is signed out.
All settings are listed in Configuration.