--- id: iss-server title: "Installing on IIS server" --- Te instrukcje zostały napisane dla systemu Windows Server 2012, usługi IIS8, [Node.js 0.12.3](https://nodejs.org/), [iisnode 0.2.16](https://github.com/tjanczuk/iisnode) oraz [verdaccio 2.1.0](https://github.com/verdaccio/verdaccio). - Install IIS Install [iisnode](https://github.com/tjanczuk/iisnode). Make sure you install prerequisites (Url Rewrite Module & node) as explained in the instructions for iisnode. - Utwórz nowy folder w Eksploratorze, gdzie chcesz, aby znajdowało się verdaccio. Na przykład `C:\verdaccio`. Zapisz[package.json](#packagejson), [start.js](#startjs) oraz [web.config](#webconfig) w tym folderze. - Create a new site in Internet Information Services Manager. Możesz ją nazwać jakkolwiek chcesz. Ja nazwę ją verdaccio w tych [instrukcjach](http://www.iis.net/learn/manage/configuring-security/application-pool-identities). Specify the path to where you saved all files and a port number. - Go back to Explorer and give the user that runs the application pool modify rights to the folder you just created. If you've named the new site verdaccio and did not change the app pool, it's running under an ApplicationPoolIdentity and you should give the user IIS AppPool\verdaccio modify rights see instructions if you need help. (You can restrict access later if you want so that it only has modify rights on the iisnode and verdaccio\storage) - Start a command prompt and execute the commands below to download verdaccio: cd c:\verdaccio npm install - Make sure you have an inbound rule accepting TCP traffic to the port in Windows Firewall - Thats it! Now you can navigate to the host and port that you specified I wanted the `verdaccio` site to be the default site in IIS so I did the following: - I made sure the .npmrc file in `c:\users{yourname}` had the registry set to `"registry=http://localhost/"` - I stopped the "Default Web Site" and only start the site "verdaccio" site in IIS - I set the bindings to "http", ip address "All Unassigned" on port 80, ok any warning or prompts These instructions are based on [Host Sinopia in IIS on Windows](https://gist.github.com/HCanber/4dd8409f79991a09ac75). I had to tweak my web config as per below but you may find the original from the for mentioned link works better A default configuration file will be created `c:\verdaccio\verdaccio\config.yaml` ### package.json ```json { "name": "iisnode-verdaccio", "version": "1.0.0", "description": "Hosts verdaccio in iisnode", "main": "start.js", "dependencies": { "verdaccio": "^2.1.0" } } ``` ### start.js ```bash process.argv.push('-l', 'unix:' + process.env.PORT); require('./node_modules/verdaccio/src/lib/cli.js'); ``` ### web.config ```xml ``` ### Troubleshooting - **The web interface does not load when hosted with https as it tries to download scripts over http.** Make sure that you have correctly mentioned `url_prefix` in verdaccio config. Follow the [discussion](https://github.com/verdaccio/verdaccio/issues/622).