2021-02-18 07:36:33 +00:00
---
title: snipe-it
2025-02-03 20:38:37 +00:00
tags:
- Administration
description: "[Snipe-it](https://github.com/snipe/snipe-it) makes asset management easy. It was built by people solving real-world IT and asset management problems, and a solid UX has always been a top priority. Straightforward design and bulk actions mean getting things done faster."
2021-02-18 07:36:33 +00:00
---
2023-10-06 19:56:06 +00:00
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read https://github.com/linuxserver/docker - snipe - it/blob/master/.github/CONTRIBUTING.md -->
2020-07-02 19:50:56 +00:00
# [linuxserver/snipe-it](https://github.com/linuxserver/docker-snipe-it)
2024-05-20 20:34:17 +00:00
[](https://scarf.sh)
2020-07-02 19:50:56 +00:00
[](https://github.com/linuxserver/docker-snipe-it)
[](https://github.com/linuxserver/docker-snipe-it/releases)
[](https://github.com/linuxserver/docker-snipe-it/packages)
2020-12-16 21:43:45 +00:00
[](https://gitlab.com/linuxserver.io/docker-snipe-it/container_registry)
2021-10-07 07:35:33 +00:00
[](https://quay.io/repository/linuxserver.io/snipe-it)
2020-07-02 19:50:56 +00:00
[](https://hub.docker.com/r/linuxserver/snipe-it)
[](https://hub.docker.com/r/linuxserver/snipe-it)
[](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-snipe-it/job/master/)
2020-11-02 03:56:47 +00:00
[](https://ci-tests.linuxserver.io/linuxserver/snipe-it/latest/index.html)
2019-02-07 20:51:33 +00:00
[Snipe-it ](https://github.com/snipe/snipe-it ) makes asset management easy. It was built by people solving real-world IT and asset management problems, and a solid UX has always been a top priority. Straightforward design and bulk actions mean getting things done faster.
2024-06-17 16:44:11 +00:00
[](https://github.com/snipe/snipe-it)
2023-10-06 19:56:06 +00:00
2019-02-07 20:51:33 +00:00
## Supported Architectures
2023-11-20 20:30:07 +00:00
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here ](https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list ) and our announcement [here ](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/ ).
2019-02-07 20:51:33 +00:00
2022-05-04 23:56:14 +00:00
Simply pulling `lscr.io/linuxserver/snipe-it:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
2019-02-13 08:46:49 +00:00
2019-02-07 20:51:33 +00:00
The architectures supported by this image are:
2022-05-04 23:56:14 +00:00
| Architecture | Available | Tag |
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\<version tag\> |
| arm64 | ✅ | arm64v8-\<version tag\> |
2023-07-03 20:35:53 +00:00
| armhf | ❌ | |
2019-02-07 20:51:33 +00:00
2021-04-22 11:58:00 +00:00
## Application Setup
2024-06-17 16:44:11 +00:00
Access the webui at `<your-ip>:8080` , for more information check out [Snipe-it ](https://github.com/snipe/snipe-it ).
2022-03-04 09:02:21 +00:00
2024-02-17 17:41:13 +00:00
**This container requires a MySQL or MariaDB server to connect to, we recommend [ours ](https://github.com/linuxserver/docker-mariadb )**
2022-03-04 09:02:21 +00:00
2019-02-07 20:51:33 +00:00
## Usage
2021-07-08 07:33:53 +00:00
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
2019-02-07 20:51:33 +00:00
2024-12-02 20:44:09 +00:00
!!! info
Unless a parameter is flaged as 'optional', it is *mandatory* and a value must be provided.
2021-07-08 07:33:53 +00:00
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
2019-02-07 20:51:33 +00:00
```yaml
2022-03-04 09:02:21 +00:00
---
2019-02-07 20:51:33 +00:00
services:
2022-03-04 09:02:21 +00:00
snipe-it:
2022-05-04 23:56:14 +00:00
image: lscr.io/linuxserver/snipe-it:latest
2022-03-04 09:02:21 +00:00
container_name: snipe-it
2019-02-07 20:51:33 +00:00
environment:
2021-04-28 12:03:48 +00:00
- PUID=1000
- PGID=1000
2023-02-16 07:31:15 +00:00
- TZ=Etc/UTC
2024-06-17 16:44:11 +00:00
- APP_KEY=
2022-03-04 09:02:21 +00:00
- APP_URL=http://localhost:8080
2022-12-30 13:17:07 +00:00
- MYSQL_PORT_3306_TCP_ADDR=
- MYSQL_PORT_3306_TCP_PORT=
- MYSQL_DATABASE=
- MYSQL_USER=
- MYSQL_PASSWORD=
2024-02-17 17:41:13 +00:00
- APP_DEBUG=false #optional
2024-06-17 16:44:11 +00:00
- APP_ENV=production #optional
- APP_FORCE_TLS=false #optional
2024-02-17 17:41:13 +00:00
- APP_LOCALE= #optional
2024-06-17 16:44:11 +00:00
- MAIL_PORT_587_TCP_ADDR= #optional
- MAIL_PORT_587_TCP_PORT= #optional
- MAIL_ENV_FROM_ADDR= #optional
- MAIL_ENV_FROM_NAME= #optional
- MAIL_ENV_ENCRYPTION= #optional
- MAIL_ENV_USERNAME= #optional
- MAIL_ENV_PASSWORD= #optional
2019-02-07 20:51:33 +00:00
volumes:
2024-06-17 16:44:11 +00:00
- /path/to/snipe-it/data:/config
2019-02-07 20:51:33 +00:00
ports:
2022-03-04 09:02:21 +00:00
- 8080:80
restart: unless-stopped
2019-02-07 20:51:33 +00:00
```
2021-07-08 07:33:53 +00:00
### docker cli ([click here for more info](https://docs.docker.com/engine/reference/commandline/cli/))
2020-10-08 19:51:08 +00:00
2021-04-22 11:58:00 +00:00
```bash
2020-10-08 19:51:08 +00:00
docker run -d \
--name=snipe-it \
-e PUID=1000 \
-e PGID=1000 \
2023-02-16 07:31:15 +00:00
-e TZ=Etc/UTC \
2024-06-17 16:44:11 +00:00
-e APP_KEY= \
2022-03-04 09:02:21 +00:00
-e APP_URL=http://localhost:8080 \
2022-12-30 13:17:07 +00:00
-e MYSQL_PORT_3306_TCP_ADDR= \
-e MYSQL_PORT_3306_TCP_PORT= \
-e MYSQL_DATABASE= \
-e MYSQL_USER= \
-e MYSQL_PASSWORD= \
2024-02-17 17:41:13 +00:00
-e APP_DEBUG=false `#optional` \
2024-06-17 16:44:11 +00:00
-e APP_ENV=production `#optional` \
-e APP_FORCE_TLS=false `#optional` \
2024-02-17 17:41:13 +00:00
-e APP_LOCALE= `#optional` \
2024-06-17 16:44:11 +00:00
-e MAIL_PORT_587_TCP_ADDR= `#optional` \
-e MAIL_PORT_587_TCP_PORT= `#optional` \
-e MAIL_ENV_FROM_ADDR= `#optional` \
-e MAIL_ENV_FROM_NAME= `#optional` \
-e MAIL_ENV_ENCRYPTION= `#optional` \
-e MAIL_ENV_USERNAME= `#optional` \
-e MAIL_ENV_PASSWORD= `#optional` \
2020-10-08 19:51:08 +00:00
-p 8080:80 \
2024-06-17 16:44:11 +00:00
-v /path/to/snipe-it/data:/config \
2020-10-08 19:51:08 +00:00
--restart unless-stopped \
2022-05-04 23:56:14 +00:00
lscr.io/linuxserver/snipe-it:latest
2020-10-08 19:51:08 +00:00
```
2019-02-07 20:51:33 +00:00
## Parameters
2023-10-06 19:56:06 +00:00
Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
2019-02-07 20:51:33 +00:00
2020-07-02 19:50:56 +00:00
### Ports (`-p`)
2019-02-07 20:51:33 +00:00
| Parameter | Function |
2020-07-02 19:50:56 +00:00
| :----: | --- |
2024-12-02 20:44:09 +00:00
| `8080:80` | Snipe-IT Web UI |
2019-02-07 20:51:33 +00:00
2020-07-02 19:50:56 +00:00
### Environment Variables (`-e`)
2019-02-07 20:51:33 +00:00
| Env | Function |
2020-07-02 19:50:56 +00:00
| :----: | --- |
2019-03-07 20:50:47 +00:00
| `PUID=1000` | for UserID - see below for explanation |
| `PGID=1000` | for GroupID - see below for explanation |
2023-02-16 07:31:15 +00:00
| `TZ=Etc/UTC` | specify a timezone to use, see this [list ](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List ). |
2024-06-17 16:44:11 +00:00
| `APP_KEY=` | App key used for encrypting stored data. Generate with `docker exec snipe-it php /app/www/artisan key:generate --show` . |
2022-03-04 09:02:21 +00:00
| `APP_URL=http://localhost:8080` | Hostname or IP and port if applicable, be sure to define https/http |
2022-12-30 13:17:07 +00:00
| `MYSQL_PORT_3306_TCP_ADDR=` | Mysql hostname or IP to use |
| `MYSQL_PORT_3306_TCP_PORT=` | Mysql port to use |
| `MYSQL_DATABASE=` | Mysql database to use |
| `MYSQL_USER=` | Mysql user to use |
| `MYSQL_PASSWORD=` | Mysql password to use |
2024-02-17 17:41:13 +00:00
| `APP_DEBUG=false` | Set to `true` to see debugging output in the web UI. |
2024-06-17 16:44:11 +00:00
| `APP_ENV=production` | Default is `production` but can use `testing` or `develop` . |
| `APP_FORCE_TLS=false` | Set to `true` if running behind a reverse proxy |
2024-06-19 12:56:11 +00:00
| `APP_LOCALE=` | Default is `en-US` . Set to a language from [this list ](https://snipe-it.readme.io/docs/configuration#section-setting-a-language ). |
2024-06-17 16:44:11 +00:00
| `MAIL_PORT_587_TCP_ADDR=` | SMTP mail server ip or hostname. |
| `MAIL_PORT_587_TCP_PORT=` | SMTP mail server port. |
| `MAIL_ENV_FROM_ADDR=` | The email address mail should be replied to and listed when sent. |
| `MAIL_ENV_FROM_NAME=` | The name listed on email sent from the default account on the system. |
| `MAIL_ENV_ENCRYPTION=` | Mail encryption to use e.g. `tls` . |
| `MAIL_ENV_USERNAME=` | SMTP server login username. |
| `MAIL_ENV_PASSWORD=` | SMTP server login password. |
2019-02-07 20:51:33 +00:00
2020-07-02 19:50:56 +00:00
### Volume Mappings (`-v`)
2019-02-07 20:51:33 +00:00
| Volume | Function |
2020-07-02 19:50:56 +00:00
| :----: | --- |
2019-02-07 20:51:33 +00:00
| `/config` | Contains your config files and data storage for Snipe-IT |
2021-10-07 07:35:33 +00:00
#### Miscellaneous Options
| Parameter | Function |
| :-----: | --- |
2020-07-02 19:50:56 +00:00
## Environment variables from files (Docker secrets)
2020-05-28 19:51:02 +00:00
You can set any environment variable from a file by using a special prepend `FILE__` .
As an example:
2021-04-22 11:58:00 +00:00
```bash
2023-10-06 19:56:06 +00:00
-e FILE__MYVAR=/run/secrets/mysecretvariable
2020-05-28 19:51:02 +00:00
```
2023-10-06 19:56:06 +00:00
Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file.
2020-05-28 19:51:02 +00:00
## Umask for running applications
2020-07-02 19:50:56 +00:00
For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting.
Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here ](https://en.wikipedia.org/wiki/Umask ) before asking for support.
2020-05-28 19:51:02 +00:00
2019-02-07 20:51:33 +00:00
## User / Group Identifiers
2020-07-02 19:50:56 +00:00
When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID` .
2019-02-07 20:51:33 +00:00
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
2023-10-06 19:56:06 +00:00
In this instance `PUID=1000` and `PGID=1000` , to find yours use `id your_user` as below:
2019-02-07 20:51:33 +00:00
2021-04-22 11:58:00 +00:00
```bash
2023-10-06 19:56:06 +00:00
id your_user
```
Example output:
```text
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)
2019-02-07 20:51:33 +00:00
```
2020-04-08 19:02:19 +00:00
## Docker Mods
2021-04-22 11:58:00 +00:00
2020-10-08 19:51:08 +00:00
[](https://mods.linuxserver.io/?mod=snipe-it "view available mods for this container.") [](https://mods.linuxserver.io/?mod=universal "view available universal mods.")
2020-04-08 19:02:19 +00:00
2020-10-08 19:51:08 +00:00
We publish various [Docker Mods ](https://github.com/linuxserver/docker-mods ) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.
2020-04-08 19:02:19 +00:00
2019-02-07 20:51:33 +00:00
## Support Info
2019-09-05 19:51:00 +00:00
* Shell access whilst the container is running:
2023-10-06 19:56:06 +00:00
```bash
docker exec -it snipe-it /bin/bash
```
2019-09-05 19:51:00 +00:00
* To monitor the logs of the container in realtime:
2023-10-06 19:56:06 +00:00
```bash
docker logs -f snipe-it
```
* Container version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' snipe-it
```
* Image version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/snipe-it:latest
```
## Updating Info
2024-01-15 20:31:32 +00:00
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the [Application Setup ](#application-setup ) section above to see if it is recommended for the image.
2023-10-06 19:56:06 +00:00
Below are the instructions for updating containers:
### Via Docker Compose
* Update images:
* All images:
```bash
docker-compose pull
```
* Single image:
```bash
docker-compose pull snipe-it
```
* Update containers:
* All containers:
```bash
docker-compose up -d
```
* Single container:
```bash
docker-compose up -d snipe-it
```
* You can also remove the old dangling images:
```bash
docker image prune
```
### Via Docker Run
* Update the image:
```bash
docker pull lscr.io/linuxserver/snipe-it:latest
```
* Stop the running container:
```bash
docker stop snipe-it
```
* Delete the container:
```bash
docker rm snipe-it
```
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
* You can also remove the old dangling images:
```bash
docker image prune
```
### Image Update Notifications - Diun (Docker Image Update Notifier)
2024-09-30 20:37:59 +00:00
!!! tip
2023-10-06 19:56:06 +00:00
We recommend [Diun ](https://crazymax.dev/diun/ ) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
## Building locally
If you want to make local modifications to these images for development purposes or just to customize the logic:
```bash
git clone https://github.com/linuxserver/docker-snipe-it.git
cd docker-snipe-it
docker build \
--no-cache \
--pull \
-t lscr.io/linuxserver/snipe-it:latest .
```
2024-11-11 20:37:02 +00:00
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
2023-10-06 19:56:06 +00:00
```bash
2024-11-11 20:37:02 +00:00
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
2023-10-06 19:56:06 +00:00
```
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64` .
2019-02-07 20:51:33 +00:00
2024-12-16 20:40:32 +00:00
To help with development, we generate this dependency graph.
??? info "Init dependency graph"
```d2
"snipe-it:latest": {
docker-mods
base {
fix-attr +\nlegacy cont-init
}
docker-mods -> base
legacy-services
custom services
init-services -> legacy-services
init-services -> custom services
custom services -> legacy-services
legacy-services -> ci-service-check
init-migrations -> init-adduser
init-nginx-end -> init-config
init-os-end -> init-config
init-config -> init-config-end
2025-01-26 21:28:08 +00:00
init-crontab-config -> init-config-end
2024-12-16 20:40:32 +00:00
init-snipe-it-config -> init-config-end
2025-01-26 21:28:08 +00:00
init-config -> init-crontab-config
2024-12-16 20:40:32 +00:00
init-mods-end -> init-custom-files
base -> init-envfile
init-os-end -> init-folders
init-php -> init-keygen
base -> init-migrations
init-config-end -> init-mods
init-mods-package-install -> init-mods-end
init-mods -> init-mods-package-install
init-samples -> init-nginx
2025-01-26 21:28:08 +00:00
init-version-checks -> init-nginx-end
2024-12-16 20:40:32 +00:00
init-adduser -> init-os-end
init-envfile -> init-os-end
init-keygen -> init-permissions
init-nginx -> init-php
init-folders -> init-samples
init-custom-files -> init-services
init-nginx-end -> init-snipe-it-config
2025-01-26 21:28:08 +00:00
init-permissions -> init-version-checks
2024-12-16 20:40:32 +00:00
init-services -> svc-cron
svc-cron -> legacy-services
init-services -> svc-nginx
svc-nginx -> legacy-services
init-services -> svc-php-fpm
svc-php-fpm -> legacy-services
}
Base Images: {
2025-01-26 21:28:08 +00:00
"baseimage-alpine-nginx:3.21" < - " baseimage-alpine:3 . 21 "
2024-12-16 20:40:32 +00:00
}
"snipe-it:latest" < - Base Images
```
2019-02-07 20:51:33 +00:00
## Versions
2025-01-26 21:28:08 +00:00
* **16.01.25:** - Rebase to Alpine 3.21.
2024-06-17 16:44:11 +00:00
* **17.06.24:** - Rebase to Alpine 3.20. Existing users should update their nginx confs to avoid http2 deprecation warnings.
2024-03-06 18:46:17 +00:00
* **06.03.24:** - Existing users should update: site-confs/default.conf - Cleanup default site conf.
2024-02-17 17:41:13 +00:00
* **17.02.24:** - Add php81-exif.
2023-07-03 20:35:53 +00:00
* **03.07.23:** - Deprecate armhf. As announced [here ](https://www.linuxserver.io/blog/a-farewell-to-arm-hf )
2023-04-16 23:51:05 +00:00
* **13.04.23:** - Move ssl.conf include to default.conf.
2023-04-13 13:26:49 +00:00
* **13.04.23:** - Add php81-pecl-redis for redis support.
2022-12-30 13:17:07 +00:00
* **28.12.22:** - Rebase to Alpine 3.17, migrate to s6v3.
2022-11-23 18:25:48 +00:00
* **20.08.22:** - Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base)).
2022-05-14 18:50:49 +00:00
* **14.05.22:** - Add php7-sodium for v6.
2022-04-12 12:32:53 +00:00
* **12.04.22:** - Don't build development elements.
2022-03-04 09:02:21 +00:00
* **02.03.22:** - Rework init logic, do not show default compose.
2021-06-29 19:15:50 +00:00
* **29.06.21:** - Rebasing to alpine 3.14.
2021-04-30 20:17:14 +00:00
* **30.04.21:** - Rebasing to alpine 3.13, add artisan migrate on spinup.
2020-07-03 14:41:12 +00:00
* **01.06.20:** - Rebasing to alpine 3.12.
2019-12-27 10:59:26 +00:00
* **19.12.19:** - Rebasing to alpine 3.11.
2019-06-30 19:37:22 +00:00
* **28.06.19:** - Rebasing to alpine 3.10.
2019-05-28 23:46:43 +00:00
* **10.04.19:** - Add php deps for V4.7.0, ensure framework directories are available at build time.
2019-04-11 12:15:04 +00:00
* **10.04.19:** - Fix permissions for new bootstrap cache directory.
2019-03-24 19:27:24 +00:00
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
2019-02-24 04:10:06 +00:00
* **22.02.19:** - Rebasing to alpine 3.9.
2019-02-07 20:51:33 +00:00
* **31.10.18:** - Rebasing to alpine 3.8
* **05.08.18:** - Migration to live build server.
* **13.06.18:** - Initial Release.