Docker Compose
Self-hosting monetr via Docker Compose is the simplest and officially supported way to run monetr yourself. This guide assumes Docker is already installed on your system. If not, please refer to Docker’s Installation Guide to set it up.
monetr’s container images are built with every tagged release and are available on both:
Images from both registries are identical for the same version tag, so feel free to use your preferred registry.
Image Tags
Each monetr release provides two types of container image tags:
latest
Tag
The latest
tag always points to the most recent version of monetr. For example:
ghcr.io/monetr/monetr:latest
Note
Using the latest
tag is convenient but can lead to unexpected behavior if updates introduce breaking changes.
Versioned Tags
Versioned tags, such as 0.18.31
, refer to specific releases. For example:
ghcr.io/monetr/monetr:0.18.31
Version tags are recommended for stability. By pinning a version, you can control updates and easily roll back if needed. monetr’s version numbers use a v
prefix (e.g., v0.18.31
), but container tags omit this prefix.
Docker Compose
The easiest way to start monetr is to use the provided
docker-compose.yaml
located in the project’s root
directory.
Clone The Repository
To get the compose file, first clone the monetr repository:
git clone https://github.com/monetr/monetr.git
Start The Server
To run monetr, execute the following command in your terminal from the root directory of monetr’s repository.
docker compose up -d
This will start the monetr server, as well as the database it needs and a redis server.
Open monetr
Once monetr is finished starting, you should be able to access it in your browser via http://localhost:4000
.
Sign ups are enabled by default from the docker-compose.yaml
provided. If you are exposing your monetr instance to
the public internet; it is recommended you disable sign ups after you have created your own login.
Updating Via Docker Compose
If you are already running monetr and want to upgrade to a more recent version you can perform the following steps.
Please make sure to review the release notes for monetr before upgrading, as it will include any breaking changes you should be aware of.
Update The Repository
In your cloned monetr directory, run the following command to retrieve the latest changes.
git pull --rebase
If you encounter a conflict while performing the pull, this means that some changes you may have made locally might cause problems with the latest version of monetr. Make sure to resolve these conflicts before moving onto the next step.
Stop The Containers
You’ll need to stop the containers running before upgrading to make sure there are not conflicts.
docker compose stop
Pull New Images
Once the containers have stopped you can run the following command to update the monetr image:
docker compose pull
Start monetr Again
Once the new images have been pulled onto your local machine you can restart the server via docker compose:
docker compose start
Things like database migrations are automatically run when using the provided compose file.
Troubleshooting
If you encounter issues while setting up or running monetr, here are some common problems and their solutions:
Containers Won’t Start
If the containers fail to start or exit immediately:
- Check the logs using:
docker compose logs -f
Cannot Access monetr in the Browser
If http://localhost:4000
doesn’t load:
Verify the containers are running using:
docker compose ps
Ensure no other services are using port 4000. Modify the docker-compose.yaml
file to use a different port if needed.
Check firewall or network settings on your machine.
Update Issues After Pulling New Images
If monetr doesn’t work correctly after an update:
- Check for breaking changes in the Release Notes
- Run
This should recreate the containers for monetr without deleting any data on the volumes.
docker compose stop docker compose up -d
Need More Help?
If these solutions don’t resolve your issue:
- Check the monetr GitHub Issues for similar problems.
- Create a new issue with detailed logs and steps to reproduce the problem.
- Reach out for assistance on Discord.