Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] Linuxserver.io - Snipe-it

Featured Replies

I'm getting some nginx error that prevents the webui from functioning. Frustratingly, the webui was working until I thought it might be a good idea to follow these steps, which I'm guessing are out of date (App key??)

 

ErrorWarningSystemArrayLogin

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
Snipe-IT: https://snipeitapp.com/donate

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 40-config: executing...
[cont-init.d] 40-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4

 

And so on, looping on the nginx error.

 

Edit: Fixed by adding APP_URL manually to nginx/site-confs/default. Not sure why that was required.

Edited by mattenz

This bug still seems to exist, where the max upload is misconfigured in the Docker. Not sure if it's possible to fix on this end.

 

Edit: Solution is to edit php/php-local.ini with something like:

upload_max_filesize = 8M
post_max_size = 8M

 

Edited by mattenz

6 hours ago, mattenz said:

This bug still seems to exist, where the max upload is misconfigured in the Docker. Not sure if it's possible to fix on this end.

 

Edit: Solution is to edit php/php-local.ini with something like:


upload_max_filesize = 8M
post_max_size = 8M

 

Has that been reported to us before? The big you linked to is in the snipe-it repo and we don't follow issues there.

13 hours ago, saarg said:

Has that been reported to us before? The big you linked to is in the snipe-it repo and we don't follow issues there.

Possibly not, I didn't mean to imply it was your bug (sorry). I had assumed that it a bug like that in the default repo that might be difficult to fix on your end.

Edited by mattenz

  • 2 weeks later...

I don't suppose that there are any hints for an nginx proxy.conf file.

 

I see this, but would be keen to know what it means in practice.

On 5/2/2021 at 10:24 AM, mattenz said:

I'm getting some nginx error that prevents the webui from functioning. Frustratingly, the webui was working until I thought it might be a good idea to follow these steps, which I'm guessing are out of date (App key??)

 



ErrorWarningSystemArrayLogin

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
Snipe-IT: https://snipeitapp.com/donate

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 40-config: executing...
[cont-init.d] 40-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4

 

And so on, looping on the nginx error.

 

Edit: Fixed by adding APP_URL manually to nginx/site-confs/default. Not sure why that was required.

 

same here: needed to insert my ip+port from "APP_URL" manually behind the "server_name" to nginx/site-confs/default

On 5/19/2021 at 6:31 AM, nikkita said:

 

same here: needed to insert my ip+port from "APP_URL" manually behind the "server_name" to nginx/site-confs/default

Thanks! I'm actually a bit of an idiot, so was getting upstream and downstream ports confused in nginx! Lesson learnt.

looks like we are up and running here (local).

I was able to reverse proxy snipe-it, im using NginxProxyManager. 

Just add  

server_name HOSTIP:CONTAINERPORT#;

 TO snipe-it/nginx/site-confs/default file.

 

server {
  listen 80;
  listen 443 ssl http2;
  server_name HOSTIP:PORT;
  
  root /var/www/html/public;
  index index.html index.htm index.php;
  
  ssl_certificate /config/keys/cert.crt;
  ssl_certificate_key /config/keys/cert.key;
  
  client_max_body_size 0;
  
location / {
  try_files $uri $uri/ /index.php$is_args$args;
  }
  
location ~ \.php$ {
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  fastcgi_pass 127.0.0.1:9000;
  fastcgi_index index.php;
  include /etc/nginx/fastcgi_params;
  }
  
location /.env {
  return 404;
  }
}

 

In NPM add your 

Scheme | Forward Hostname / IP  |  Forward Port

http         HOSTIP                            CONTAINERPORT

Edited by Tolete

  • 3 weeks later...

I keep getting this last line repeat endlessly: nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4

Here is the full log before it repeats

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
Snipe-IT: https://snipeitapp.com/donate

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 40-config: executing...
[cont-init.d] 40-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
nginx: [emerg] invalid number of arguments in "server_name" directive in /config/nginx/site-confs/default:4

Just wanted to let anyone know if they have trouble with the URL for uploaded images being wrong. I had to deleted the App_URL setting in the docker settings.
You need to add the URL inside the .env file manually but removing the APP_URL setting in the docker fixes the broken image URLs

  • 1 month later...
On 6/21/2021 at 7:02 AM, Fireworrks said:

Just wanted to let anyone know if they have trouble with the URL for uploaded images being wrong. I had to deleted the App_URL setting in the docker settings.
You need to add the URL inside the .env file manually but removing the APP_URL setting in the docker fixes the broken image URLs

This solved my problem, thank you!

  • 6 months later...
4 hours ago, nikky said:

keep getting the invalid number of arguments error

Are you using this on Unraid? 

 

You should always read the first post in the thread. 

Hi there, just tried to install this but getting connection refused but the log file does not really show any errors

 

| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
Snipe-IT: https://snipeitapp.com/donate

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 40-config: executing...
[cont-init.d] 40-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

 

localhost refused to connect.

33 minutes ago, MrLondon said:

Hi there, just tried to install this but getting connection refused but the log file does not really show any errors

 

| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
Snipe-IT: https://snipeitapp.com/donate

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 40-config: executing...
[cont-init.d] 40-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

 

localhost refused to connect.

could you please show a snippet of your compose file?

37 minutes ago, nikky said:

could you please show a snippet of your compose file?

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='snipe-it' --net='bridge' -e TZ="Europe/London" -e HOST_OS="Unraid" -e 'NGINX_APP_URL'='192.168.0.24' -e 'MYSQL_PORT_3306_TCP_ADDR'='192.168.0.24' -e 'MYSQL_PORT_3306_TCP_PORT'='3306' -e 'MYSQL_DATABASE'='snipeit' -e 'MYSQL_USER'='snipeit' -e 'MYSQL_PASSWORD'='snipeit' -e 'PUID'='99' -e 'PGID'='100' -e 'UMASK'='022' -p '8084:80/tcp' -v '/mnt/cache/appdata/snipe-it':'/config':'rw' 'lscr.io/linuxserver/snipe-it'

d53971dc1e875f73270fa5eff26eeeb25fe5184f7e9524d79e99371870c071c9

MYSQL_PORT_3306_TCP_ADDR'='192.168.0.24'
try changing this to -
MYSQL_PORT_3306_TCP_ADDR'='mysql'

On 1/31/2022 at 4:57 PM, trurl said:

Are you using this on Unraid? 

 

You should always read the first post in the thread. 

No i wasn't

Now the error is fixed. I have attached a sample .yml file for reference below -

 

--

version: "3"
services:
  mysql:
    image: linuxserver/mariadb
    container_name: snipe_mysql
    restart: always
    volumes:
      - /var/lib/mysql:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata
      - MYSQL_ROOT_PASSWORD=test123
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=test123
      - MYSQL_DATABASE=snipe
  snipeit:
    image: linuxserver/snipe-it:latest
    container_name: snipe-it
    restart: always
    depends_on:
      - mysql
    volumes:
      - /var/lib/snipeit:/config
    environment:
      - NGINX_APP_URL=127.0.0.1:8080
      - MYSQL_PORT_3306_TCP_ADDR=mysql
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=snipe
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=test123
      - PGID=1000
      - PUID=1000
      - [email protected]
      - MAIL_ENV_FROM_NAME=Abc
      - MAIL_ENV_ENCRYPTION=tcp
      - MAIL_ENV_USERNAME=abc
      - MAIL_ENV_PASSWORD=test123
      - APP_ENV=production
      - APP_DEBUG=false
      - APP_KEY=base64:<later>
      - APP_URL=http://127.0.0.1:8080
      - APP_TIMEZONE=Asia/Kolkata
      - APP_LOCALE=en
    ports:
      - "8080:80"

24 minutes ago, nikky said:

MYSQL_PORT_3306_TCP_ADDR'='192.168.0.24'
try changing this to -
MYSQL_PORT_3306_TCP_ADDR'='mysql'

changed but still getting connection denied

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='snipe-it' --net='bridge' -e TZ="Europe/London" -e HOST_OS="Unraid" -e 'NGINX_APP_URL'='192.168.0.24' -e 'MYSQL_PORT_3306_TCP_ADDR'='mysql' -e 'MYSQL_PORT_3306_TCP_PORT'='3306' -e 'MYSQL_DATABASE'='snipeit' -e 'MYSQL_USER'='snipeit' -e 'MYSQL_PASSWORD'='snipeit' -e 'PUID'='99' -e 'PGID'='100' -e 'UMASK'='022' -p '8084:80/tcp' -v '/mnt/cache/appdata/snipe-it':'/config':'rw' 'lscr.io/linuxserver/snipe-it'

b3fac5bf1a3e0644be10ee564f71c550f1a3086eb89dd36f159dd5da14c96b5e

  • 10 months later...

 

email out was not working for some reason, checking the .env file i was able to see there was a discrepancy on the smtp port on the docker environment variables and the .env file. I made them both the same and email was back online. If anyone looking for the .env file.

 

-console into the container.

cd app/www/ && ls -al

 

you should see a .env and a .env.example to view/edit those file you can.

nano .env
nano .env.example

 

🖖

Edited by Tolete

  • 9 months later...

Currently running Snipe-IT on Unraid, and it's been working well. Looking to set up SAML.
following the documentation to setup SAML I get a 

 

**Success:** Settings updated successfully.

 

But when trying to sign in using SAML, I get an error.

**Error** There was a problem while trying to log you in, please try again.

 

Wondering if I'm missing environment variables specific for SAML to work properly.

 

## System Information
**Snipe-IT version:**
v6.2.1 build 11625 (gc45ede2d1)

**Software License:**
[AGPL3](https://www.gnu.org/licenses/agpl-3.0.en.html)

**PHP Version:**
8.1.22

**Laravel Version:**
8.83.22

**Timezone:**
America/Los_Angeles

**Database Driver:**
mysql

**Mail From Address:**
Snipe-IT`<[email protected]>`

**Mail Reply-To Address:**

Snipe-IT `<[email protected]>`

**Table Storage:**
cookieStorage

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.