https://wiki.archlinux.org/api.php?action=feedcontributions&user=Krukai&feedformat=atomArchWiki - User contributions [en]2024-03-28T22:23:01ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:GitLab&diff=489201Talk:GitLab2017-09-08T09:15:58Z<p>Krukai: /* Very confusing */ signature</p>
<hr />
<div>== Missing Section? ==<br />
It might just be me, but it seems like a section is missing. In start and test it says visit your domain, however unless I am missing something pretty major that shouldn't work since neither apache nor nginx are ever setup / pointed to the webapp.--[[User:Theflyingfool|Theflyingfool]] ([[User talk:Theflyingfool|talk]]) 08:15, 8 April 2014 (UTC)<br />
<br />
I don't have neither of them on my server, Gitlab uses own one, Unicorn, to deal with webapp.<br />
[[User:Kosciak9|Kosciak9]] ([[User talk:Kosciak9|talk]]) 12:17, 6 December 2015 (UTC)<br />
<br />
== Resolving dependencies and testing gitlab on remote server ==<br />
This is a reply to the question above, as well some things that was missed during the installation I made.<br />
<br />
I'm not sure if it should be added, so I'm putting it here for discussion:<br />
<br />
You should install the following packages, ''before'' installing the GitLab from AUR:<br />
* https://aur.archlinux.org/packages/ruby-bundler/<br />
* https://aur.archlinux.org/packages/gitlab-shell/<br />
<br />
Also, after finally starting the gitlab with unicorn, if you have installed gitlab on a remote server and not locally, you won't be able to access it using domain:8080. It is even mentioned in /etc/webapps/gitlab/unicorn.rb. In order to be able to access it, I have changed 127.0.0.1 to the servers IP, and made sure that shell.yml reflect the change as well (including the port).<br />
<br />
After restarting the daemons, I was able to access giltab using domain:8080.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== nginx ==<br />
After completing the steps above I continued to nginx installation, however, being not familiar with nginx it took me some time, so I'll put it here for discussion as well. This is the full guide, I know that some things are already mentioned in the page, just not very organized.<br />
<br />
After installing nginx, it is mentioned that you should make the following command:<br />
<br />
# ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab<br />
<br />
However, it will not work, since there is no site-available or sites-enabled directories, with include section in nginx.conf. It is true however in debian installations, but since we're in arch everything comes with no changes from the distro side.<br />
<br />
Since there was no site-available file to copy the vhosts from, I read the official gitlab guide, and found that the file is located in /usr/share/webapps/gitlab/lib/support/nginx/ after installing the gitlab package.<br />
<br />
I just put everything inside the file to nginx.conf inside the ''http'' section, just before the last {{ic|<nowiki>}</nowiki>}}, and changed the following:<br />
* {{ic|server_name}} to reflect my server's domain.<br />
* Set {{ic|proxy_pass}} config to reflect unicorn listening address. I just put {{ic|localhost:8080}} in nginx.conf and set back unicorn.rb to point to 127.0.0.1 as it was before (including the port 8080).<br />
* Inside {{ic|upstream gitlab}} set {{ic|server}} to point to {{ic|unix:/usr/share/webapps/gitlab/tmp/sockets/gitlab.socket;}} - I'm NOT sure about this. I also had a permissions problem, so I changed group permission to http for the sockets folder.<br />
* Point the config {{ic|root}} to {{ic|/usr/share/webapps/gitlab/public}};<br />
* Comment out the ''gzip'' section - it was not working for me, and made the site with no assets, so I didn't bother with it.<br />
<br />
Edit shell.yml as follows:<br />
<br />
{{ic|gitlab_url: "http://domain/"}} - domain is the same as server_name in nginx.conf.<br />
<br />
Also make sure that in gitlab.yml the host is set to your domain and the port is the same as in nginx.conf.<br />
<br />
Restart the daemons:<br />
$ systemctl restart gitlab-sidekiq gitlab-unicorn nginx<br />
<br />
Should be working now.<br />
<br />
As I said, this is my rough way of installing it, so before I put it on the page, would like to know if that's the right steps.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== Using Sudo instead of su - ==<br />
<br />
I don't have any root password on my pi, only my user password (for sudo). As the rest of the documentation uses sudo, it would be better to use sudo <br />
here too :<br />
https://wiki.archlinux.org/index.php?title=Gitlab&section=13<br />
<br />
For some reason all sudo - commands fail for me, not sure why. [[User:ElectricPrism|ElectricPrism]] ([[User talk:ElectricPrism|talk]]) 08:10, 21 December 2015 (UTC)<br />
:I'm also having issues without being root, unfortunately there are more issues, and I couldn't install (the latest version) at all.<br />
:Going to add Stub template, because more commands listed doesn't seem to work (correctly).<br />
:[[User:Beta990|Beta990]] ([[User talk:Beta990|talk]]) 11:42, 21 December 2015 (UTC)<br />
<br />
{{Note|Regarding the `su - gitlab` users have gotten a update because they kept failing for me too.}}<br />
<br />
== Very confusing ==<br />
<br />
I went through the install, I didn't make it work yet but I have a few questions on confusing instructions:<br />
<br />
-I want to use my already set-up nginx webserver. Should I still use reddis, and the gem/bundle install commands ?<br />
:Yes, you should proxy-pass nginx to unicorn. Redis is used for internal communication, gem/bundle for setup. You can find good explanations at the GitLab website. [[User:DenBrahe|DenBrahe]] ([[User talk:DenBrahe|talk]]) 21:43, 19 April 2016 (UTC)<br />
<br />
-What are the pros/cons to use the AUR package v. using the official package ?<br />
:AUR package is finetuned for Arch to work with systemd and linux conventions and things like that (don't know exactly). Basically if you're not an expert, you're better off with the AUR package. Wiki page should get an update though. [[User:DenBrahe|DenBrahe]] ([[User talk:DenBrahe|talk]]) 21:43, 19 April 2016 (UTC)<br />
<br />
-How can we uninstall the components installed by the gem/bundle install commands ?<br />
<br />
-the su - gitlab command is not working but sudo -u gitlab works (as mentionned in this thread), is that ok ?<br />
<br />
-I don't have any shell.yml file, which is mentionned only once for the HTTPS configuration, is it normal ?<br />
<br />
-what is /dev/null in the nginx config ?<br />
<br />
-how do I setup resque.timer ? I can't load it? ('unit resque.timer not found).<br />
<br />
<br />
[[User:Mentatf|Mentatf]] ([[User talk:Mentatf|talk]]) 22:41, 7 April 2016 (UTC)<br />
<br />
<br />
I am adding my two cents to this section as well, because after trying for around 5 hours, I am giving up on the gitlab package and will try Gogs/Gitea instead. As I cannot say for sure what are actual problems and which are design choices made by the package maintainer that are just not well documented, someone else who has the necessary knowledge has to decide which changes are appropiate to make.<br />
<br />
This is summary of the problems/confusion I faced:<br />
<br />
* The package depends on ruby2-3, which does not provide the bin 'ruby'. This throws off the environment check at the very least, yet no note is made of that.<br />
* Despite stating that the Arch package uses the user gitlab instead of git, the latter keeps getting mentioned in the article, sometimes even together with gitlab.<br />
* As described below, rvm seems to be neither necessary nor supported, yet the article implies that its usage is good practise.<br />
* All GitLab files seem to belong to root, leaving the gitlab with insufficient rights to save config files. As a result, at the very least the copy&paste solutions provided by the environment checks cannot be used because of that.<br />
* The article states that Unicorn is a HTTP server on its own, yet GitLab is shipped with nginx by default.<br />
* The article says that gitlab-workhorse is optional, yet at the very least the current Apache examples provided by GitLab all assume it to be configured. The package itself also depends on it.<br />
<br />
Right now, it might be a better idea to intall GitLab from source, as the official documentation is more up-to-date and can be used with less adjustments. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 09:15, 8 September 2017 (UTC)<br />
<br />
== Check that the secret file exists ==<br />
<br />
The Initialize Gitlab database section tells us to check if there's a secret file at /etc/webapps/gitlab/secret, while the file is found at /etc/webapps/gitlab/secrets.yml now. [[User:Sava|Sava]] ([[User talk:Sava|talk]]) 08:21, 25 September 2016 (UTC)<br />
<br />
== Regarding 'Running GitLab with rvm' ==<br />
<br />
<br />
According to [[Gitlab#Running_GitLab_with_rvm]], Ruby version 1.9.3 is recommended. However, GitLab seems to recommend 2.3 since at least v9.2.1: [https://gitlab.com/gitlab-org/gitlab-ce/blob/v9.2.1/README.md].<br />
Also, the section is not very clear whether rvm should be downloaded as the new user or not. It seems that this should be the case, but the section only mentions it after the first step.<br />
Finally, it refers to the user {{ic|git}}, while Arch installs Gitlab for the user {{ic|gitlab}} by default.<br />
Does the section need to be updated, or am I missing something here? Right now, I feel like installing GitLab without rvm. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 09:50, 6 September 2017 (UTC)<br />
<br />
: This section still needs to be updated. I haven't performed a test of that topic yet. Feel free to update that section as I don't plan to use Gitlab with rvm any time soon (at least professionally). Regards. -- [[User:wget|wget]] ([[User talk:wget|talk]]) 14:54, 6 September 2017 (UTC)<br />
<br />
:: Thanks for the heads-up, but I don't see any reason right now to use rvm, either, as the package depends on exactly the Ruby version needed. I assume that once GitLab moved to Ruby 2.4, the package maintainer will as well. Perhaps the section could use a note indication something along those lines. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 15:17, 6 September 2017 (UTC)<br />
<br />
::: I'd say remove this section altogether. RVM is not officially supported. --[[User:Maevius|Maevius]] ([[User talk:Maevius|talk]]) 17:22, 7 September 2017 (UTC)</div>Krukaihttps://wiki.archlinux.org/index.php?title=Talk:GitLab&diff=489147Talk:GitLab2017-09-07T18:16:34Z<p>Krukai: /* Very confusing */ Added personal findings</p>
<hr />
<div>== Missing Section? ==<br />
It might just be me, but it seems like a section is missing. In start and test it says visit your domain, however unless I am missing something pretty major that shouldn't work since neither apache nor nginx are ever setup / pointed to the webapp.--[[User:Theflyingfool|Theflyingfool]] ([[User talk:Theflyingfool|talk]]) 08:15, 8 April 2014 (UTC)<br />
<br />
I don't have neither of them on my server, Gitlab uses own one, Unicorn, to deal with webapp.<br />
[[User:Kosciak9|Kosciak9]] ([[User talk:Kosciak9|talk]]) 12:17, 6 December 2015 (UTC)<br />
<br />
== Resolving dependencies and testing gitlab on remote server ==<br />
This is a reply to the question above, as well some things that was missed during the installation I made.<br />
<br />
I'm not sure if it should be added, so I'm putting it here for discussion:<br />
<br />
You should install the following packages, ''before'' installing the GitLab from AUR:<br />
* https://aur.archlinux.org/packages/ruby-bundler/<br />
* https://aur.archlinux.org/packages/gitlab-shell/<br />
<br />
Also, after finally starting the gitlab with unicorn, if you have installed gitlab on a remote server and not locally, you won't be able to access it using domain:8080. It is even mentioned in /etc/webapps/gitlab/unicorn.rb. In order to be able to access it, I have changed 127.0.0.1 to the servers IP, and made sure that shell.yml reflect the change as well (including the port).<br />
<br />
After restarting the daemons, I was able to access giltab using domain:8080.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== nginx ==<br />
After completing the steps above I continued to nginx installation, however, being not familiar with nginx it took me some time, so I'll put it here for discussion as well. This is the full guide, I know that some things are already mentioned in the page, just not very organized.<br />
<br />
After installing nginx, it is mentioned that you should make the following command:<br />
<br />
# ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab<br />
<br />
However, it will not work, since there is no site-available or sites-enabled directories, with include section in nginx.conf. It is true however in debian installations, but since we're in arch everything comes with no changes from the distro side.<br />
<br />
Since there was no site-available file to copy the vhosts from, I read the official gitlab guide, and found that the file is located in /usr/share/webapps/gitlab/lib/support/nginx/ after installing the gitlab package.<br />
<br />
I just put everything inside the file to nginx.conf inside the ''http'' section, just before the last {{ic|<nowiki>}</nowiki>}}, and changed the following:<br />
* {{ic|server_name}} to reflect my server's domain.<br />
* Set {{ic|proxy_pass}} config to reflect unicorn listening address. I just put {{ic|localhost:8080}} in nginx.conf and set back unicorn.rb to point to 127.0.0.1 as it was before (including the port 8080).<br />
* Inside {{ic|upstream gitlab}} set {{ic|server}} to point to {{ic|unix:/usr/share/webapps/gitlab/tmp/sockets/gitlab.socket;}} - I'm NOT sure about this. I also had a permissions problem, so I changed group permission to http for the sockets folder.<br />
* Point the config {{ic|root}} to {{ic|/usr/share/webapps/gitlab/public}};<br />
* Comment out the ''gzip'' section - it was not working for me, and made the site with no assets, so I didn't bother with it.<br />
<br />
Edit shell.yml as follows:<br />
<br />
{{ic|gitlab_url: "http://domain/"}} - domain is the same as server_name in nginx.conf.<br />
<br />
Also make sure that in gitlab.yml the host is set to your domain and the port is the same as in nginx.conf.<br />
<br />
Restart the daemons:<br />
$ systemctl restart gitlab-sidekiq gitlab-unicorn nginx<br />
<br />
Should be working now.<br />
<br />
As I said, this is my rough way of installing it, so before I put it on the page, would like to know if that's the right steps.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== Using Sudo instead of su - ==<br />
<br />
I don't have any root password on my pi, only my user password (for sudo). As the rest of the documentation uses sudo, it would be better to use sudo <br />
here too :<br />
https://wiki.archlinux.org/index.php?title=Gitlab&section=13<br />
<br />
For some reason all sudo - commands fail for me, not sure why. [[User:ElectricPrism|ElectricPrism]] ([[User talk:ElectricPrism|talk]]) 08:10, 21 December 2015 (UTC)<br />
:I'm also having issues without being root, unfortunately there are more issues, and I couldn't install (the latest version) at all.<br />
:Going to add Stub template, because more commands listed doesn't seem to work (correctly).<br />
:[[User:Beta990|Beta990]] ([[User talk:Beta990|talk]]) 11:42, 21 December 2015 (UTC)<br />
<br />
{{Note|Regarding the `su - gitlab` users have gotten a update because they kept failing for me too.}}<br />
<br />
== Very confusing ==<br />
<br />
I went through the install, I didn't make it work yet but I have a few questions on confusing instructions:<br />
<br />
-I want to use my already set-up nginx webserver. Should I still use reddis, and the gem/bundle install commands ?<br />
:Yes, you should proxy-pass nginx to unicorn. Redis is used for internal communication, gem/bundle for setup. You can find good explanations at the GitLab website. [[User:DenBrahe|DenBrahe]] ([[User talk:DenBrahe|talk]]) 21:43, 19 April 2016 (UTC)<br />
<br />
-What are the pros/cons to use the AUR package v. using the official package ?<br />
:AUR package is finetuned for Arch to work with systemd and linux conventions and things like that (don't know exactly). Basically if you're not an expert, you're better off with the AUR package. Wiki page should get an update though. [[User:DenBrahe|DenBrahe]] ([[User talk:DenBrahe|talk]]) 21:43, 19 April 2016 (UTC)<br />
<br />
-How can we uninstall the components installed by the gem/bundle install commands ?<br />
<br />
-the su - gitlab command is not working but sudo -u gitlab works (as mentionned in this thread), is that ok ?<br />
<br />
-I don't have any shell.yml file, which is mentionned only once for the HTTPS configuration, is it normal ?<br />
<br />
-what is /dev/null in the nginx config ?<br />
<br />
-how do I setup resque.timer ? I can't load it? ('unit resque.timer not found).<br />
<br />
<br />
[[User:Mentatf|Mentatf]] ([[User talk:Mentatf|talk]]) 22:41, 7 April 2016 (UTC)<br />
<br />
<br />
I am adding my two cents to this section as well, because after trying for around 5 hours, I am giving up on the gitlab package and will try Gogs/Gitea instead. As I cannot say for sure what are actual problems and which are design choices made by the package maintainer that are just not well documented, someone else who has the necessary knowledge has to decide which changes are appropiate to make.<br />
<br />
This is summary of the problems/confusion I faced:<br />
<br />
* The package depends on ruby2-3, which does not provide the bin 'ruby'. This throws off the environment check at the very least, yet no note is made of that.<br />
* Despite stating that the Arch package uses the user gitlab instead of git, the latter keeps getting mentioned in the article, sometimes even together with gitlab.<br />
* As described below, rvm seems to be neither necessary nor supported, yet the article implies that its usage is good practise.<br />
* All GitLab files seem to belong to root, leaving the gitlab with insufficient rights to save config files. As a result, at the very least the copy&paste solutions provided by the environment checks cannot be used because of that.<br />
* The article states that Unicorn is a HTTP server on its own, yet GitLab is shipped with nginx by default.<br />
* The article says that gitlab-workhorse is optional, yet at the very least the current Apache examples provided by GitLab all assume it to be configured. The package itself also depends on it.<br />
<br />
Right now, it might be a better idea to intall GitLab from source, as the official documentation is more up-to-date and can be used with less adjustments.<br />
<br />
== Check that the secret file exists ==<br />
<br />
The Initialize Gitlab database section tells us to check if there's a secret file at /etc/webapps/gitlab/secret, while the file is found at /etc/webapps/gitlab/secrets.yml now. [[User:Sava|Sava]] ([[User talk:Sava|talk]]) 08:21, 25 September 2016 (UTC)<br />
<br />
== Regarding 'Running GitLab with rvm' ==<br />
<br />
<br />
According to [[Gitlab#Running_GitLab_with_rvm]], Ruby version 1.9.3 is recommended. However, GitLab seems to recommend 2.3 since at least v9.2.1: [https://gitlab.com/gitlab-org/gitlab-ce/blob/v9.2.1/README.md].<br />
Also, the section is not very clear whether rvm should be downloaded as the new user or not. It seems that this should be the case, but the section only mentions it after the first step.<br />
Finally, it refers to the user {{ic|git}}, while Arch installs Gitlab for the user {{ic|gitlab}} by default.<br />
Does the section need to be updated, or am I missing something here? Right now, I feel like installing GitLab without rvm. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 09:50, 6 September 2017 (UTC)<br />
<br />
: This section still needs to be updated. I haven't performed a test of that topic yet. Feel free to update that section as I don't plan to use Gitlab with rvm any time soon (at least professionally). Regards. -- [[User:wget|wget]] ([[User talk:wget|talk]]) 14:54, 6 September 2017 (UTC)<br />
<br />
:: Thanks for the heads-up, but I don't see any reason right now to use rvm, either, as the package depends on exactly the Ruby version needed. I assume that once GitLab moved to Ruby 2.4, the package maintainer will as well. Perhaps the section could use a note indication something along those lines. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 15:17, 6 September 2017 (UTC)<br />
<br />
::: I'd say remove this section altogether. RVM is not officially supported. --[[User:Maevius|Maevius]] ([[User talk:Maevius|talk]]) 17:22, 7 September 2017 (UTC)</div>Krukaihttps://wiki.archlinux.org/index.php?title=GitLab&diff=488887GitLab2017-09-06T19:12:06Z<p>Krukai: /* Create a virtual host for Gitlab */ Updated examples link</p>
<hr />
<div>[[Category:Version Control System]]<br />
[[Category:Web applications]]<br />
[[ja:Gitlab]]<br />
{{Related articles start}}<br />
{{Related|Gitolite}}<br />
{{Related|Ruby on Rails}}<br />
{{Related articles end}}<br />
<br />
From [https://about.gitlab.com/ GitLab's homepage:]<br />
<br />
:GitLab offers git repository management, code reviews, issue tracking, activity feeds and wikis. Enterprises install GitLab on-premise and connect it with LDAP and Active Directory servers for secure authentication and authorization. A single GitLab server can handle more than 25,000 users but it is also possible to create a high availability setup with multiple active servers.<br />
<br />
An example live version can be found at [https://gitlab.com/ GitLab.com].<br />
<br />
== Installation ==<br />
{{Note|If you want to use RVM refer to the article [[#Running GitLab with rvm]] before starting with the installation}}<br />
<br />
{{Note|This article covers installing and configuring GitLab without HTTPS at first. If needed, see [[#Advanced Configuration]] to set up SSL}}<br />
<br />
GitLab requires [[Redis]] and a database backend. If you plan to run it on the same machine, first install either [[MySQL]] or [[PostgreSQL]].<br />
<br />
[[Install]] the {{pkg|gitlab}} package.<br />
<br />
In order to receive mail notifications, a mail server must be installed and configured. See the following for more information: [[:Category:Mail server]]<br />
<br />
== Configuration ==<br />
<br />
=== Preliminary Notes ===<br />
The {{pkg|gitlab}} package installs GitLab's files in a manner that more closely follows standard Linux conventions:<br />
<br />
{| class="wikitable"<br />
! Description <br />
! [https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md GitLab's Official] <br />
! {{pkg|gitlab}} <br />
|----------------------------------------------------------<br />
| Configuration File GitShell<br />
| {{ic|/home/git/gitlab-shell/config.yml}}<br />
| {{ic|/etc/webapps/gitlab-shell/config.yml}}<br />
|----------------------------------------------------------<br />
| Configuration File GitLab<br />
| {{ic|/home/git/gitlab/config/gitlab.yml}}<br />
| {{ic|/etc/webapps/gitlab/gitlab.yml}}<br />
|----------------------------------------------------------<br />
| User (Home Directory)<br />
| {{ic|git}} ({{ic|/home/git}})<br />
| {{ic|gitlab}} ({{ic|/var/lib/gitlab}})<br />
|}<br />
<br />
{{tip|If you are familiar with the [[Arch Build System]] you can edit the PKGBUILD and relevant files to change gitlab's home directory to a place of your liking.}}<br />
<br />
===GitLab===<br />
Edit {{ic|/etc/webapps/gitlab/gitlab.yml}} and setup at least the following parameters:<br />
<br />
{{Tip|The hostname and port are used for the {{ic|git clone http://hostname:port}} as example.}}<br />
<br />
'''Hostname:''' In the {{ic|gitlab:}} section set {{ic|host:}} - replacing {{ic|localhost}} to {{ic|yourdomain.com}} ('''note:''' no 'http://' or trailing slash) - into your fully qualified domain name.<br />
<br />
'''Port:''' {{ic|port:}} can be confusing. This is not the port that the gitlab server (unicorn) runs on; it's the port that users will initially access through in their browser. Basically, if you intend for users to visit 'yourdomain.com' in their browser, without appending a port number to the domain name, leave {{ic|port:}} as {{ic|80}}. If you intend your users to type something like 'yourdomain.com:3425' into their browsers, then you'd set {{ic|port:}} to {{ic|3425}}. You will also have to '''configure your webserver''' to listen on that port.<br />
<br />
'''Timezone (optional):''' The {{ic|time_zone:}} parameter is optional, but may be useful to force the zone of GitLab applications.<br />
<br />
Finally set the correct permissions to the ''uploads'' directory:<br />
<br />
# chmod 700 /var/lib/gitlab/uploads<br />
<br />
===GitLab Shell===<br />
{{Out of date|Configuration variables in this section are no longer in config.yml}}<br />
{{Note|You can leave the {{ic|gitlab_url}} with default value if you intend to host GitLab on the same host.}} <br />
<br />
Edit {{ic|/etc/webapps/gitlab-shell/config.yml}} and set {{ic|gitlab_url:}} to the prefer url and port:<br />
{{hc|/etc/webapps/gitlab-shell/config.yml|2=<br />
# GitLab user. git by default<br />
user: gitlab<br />
<br />
# Url to gitlab instance. Used for api calls. Should end with a slash.<br />
# Default: http://localhost:8080/<br />
# You only have to change the default if you have configured Unicorn<br />
# to listen on a custom port, or if you have configured Unicorn to<br />
# only listen on a Unix domain socket.<br />
gitlab_url: "http://localhost:8080/" #<br />
<br />
http_settings:<br />
# user: someone<br />
# password: somepass<br />
...<br />
}}<br />
<br />
Update the {{ic|/etc/webapps/gitlab/unicorn.rb}} configuration if the port and/or hostname is different from the default:<br />
{{hc|/etc/webapps/gitlab/unicorn.rb|2=<br />
listen "/run/gitlab/gitlab.socket", :backlog => 1024<br />
listen "'''127.0.0.1:8080'''", :tcp_nopush => true<br />
}}<br />
<br />
===Redis===<br />
<br />
In order to provide sufficient performance you will need a cache database. [[Redis#Installation|Install]] and [[Redis#Configuration|configure]] a Redis instance, being careful to the section dedicated to listening via a socket.<br />
<br />
* Add the user ''git'' and ''gitlab'' to the ''redis'' [[group]].<br />
<br />
* Update the configuration files:<br />
{{hc|/etc/webapps/gitlab/resque.yml|2=<br />
development: unix:/run/redis/redis.sock<br />
test: unix:/run/redis/redis.sock<br />
production: unix:/run/redis/redis.sock<br />
}}<br />
<br />
{{hc|/etc/webapps/gitlab-shell/config.yml|2=<br />
# Redis settings used for pushing commit notices to gitlab<br />
redis:<br />
bin: /usr/bin/redis-cli<br />
host: 127.0.0.1<br />
port: 6379<br />
# pass: redispass # Allows you to specify the password for Redis<br />
database: 5 # Use different database, default up to 16<br />
socket: /run/redis/redis.sock # '''uncomment''' this line<br />
namespace: resque:gitlab<br />
}}<br />
<br />
=== Database backend ===<br />
A Database backend will be required before Gitlab can be run. Currently GitLab supports [[MariaDB]] and [[PostgreSQL]]. By default, GitLab assumes you will use MySQL. Extra work is needed if you plan to use PostgreSQL.<br />
<br />
==== MariaDB ====<br />
To set up MySQL (MariaDB) you need to create a database called {{ic|gitlabhq_production}} along with a user (default: {{ic|gitlab}}) who has full privileges to the database:<br />
<br />
{{hc|$ mysql -u root -p|2=<br />
mysql> CREATE DATABASE `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY 'password';<br />
mysql> GRANT ALL ON `gitlabhq_production`.* TO 'gitlab'@'localhost';<br />
mysql> \q<br />
}}<br />
<br />
Try connecting to the new database with the new user:<br />
<br />
$ mysql -u '''gitlab''' -p -D gitlabhq_production<br />
<br />
Copy the MySQL template file before configuring it:<br />
<br />
# cp /usr/share/doc/gitlab/database.yml.mysql /etc/webapps/gitlab/database.yml<br />
<br />
Next you will need to open {{ic|/etc/webapps/gitlab/database.yml}} and set {{ic|username:}} and {{ic|password:}} for the {{ic|gitlabhq_production}}:<br />
<br />
{{hc|/etc/webapps/gitlab/database.yml|<br />
#<br />
# PRODUCTION<br />
#<br />
production:<br />
adapter: mysql2<br />
encoding: utf8<br />
collation: utf8_general_ci<br />
reconnect: false<br />
database: gitlabhq_production<br />
pool: 10<br />
username: '''username'''<br />
password: '''"password"'''<br />
# host: localhost<br />
# socket: /run/mysqld/mysqld.sock # If running MariaDB as socket<br />
...<br />
}}<br />
<br />
It should not be set as world readable, e.g. only processes running under the {{ic|gitlab}} user should have read/write access:<br />
<br />
# chmod 600 /etc/webapps/gitlab/database.yml<br />
# chown gitlab:gitlab /etc/webapps/gitlab/database.yml<br />
<br />
For more info and other ways to create/manage MySQL databases, see the [https://mariadb.org/docs/ MariaDB documentation] and the [https://github.com/gitlabhq/gitlabhq/blob/6-5-stable/doc/install/installation.md GitLab official (generic) install guide].<br />
<br />
==== PostgreSQL ====<br />
Login to PostgreSQL and create the {{ic|gitlabhq_production}} database with along with it's user. Remember to change {{ic|your_username_here}} and {{ic|your_password_here}} to the real values:<br />
<br />
# psql -d template1<br />
<br />
{{bc|1=<br />
template1=# CREATE USER your_username_here WITH PASSWORD 'your_password_here';<br />
template1=# ALTER USER your_username_here SUPERUSER;<br />
template1=# CREATE DATABASE gitlabhq_production OWNER your_username_here;<br />
template1=# \q<br />
}}<br />
<br />
{{Note|The reason for creating the user as a superuser is that GitLab is trying to be "smart" and install extensions (not just create them in it's own userspace). And this is only allowed by superusers in Postgresql.}}<br />
<br />
Try connecting to the new database with the new user to verify it works:<br />
<br />
# psql -d gitlabhq_production<br />
<br />
Copy the PostgreSQL template file before configuring it (overwriting the default MySQL configuration file):<br />
<br />
# cp /usr/share/doc/gitlab/database.yml.postgresql /etc/webapps/gitlab/database.yml<br />
<br />
Open the new {{ic|/etc/webapps/gitlab/database.yml}} and set the values for {{ic|username:}} and {{ic|password:}}. For example:<br />
<br />
{{hc|/etc/webapps/gitlab/database.yml|<br />
#<br />
# PRODUCTION<br />
#<br />
production:<br />
adapter: postgresql<br />
encoding: unicode<br />
database: gitlabhq_production<br />
pool: 10<br />
username: your_username_here<br />
password: "your_password_here"<br />
# host: localhost<br />
# port: 5432<br />
# socket: /tmp/postgresql.sock<br />
...<br />
}}<br />
<br />
For our purposes (unless you know what you are doing), you do not need to worry about configuring the other databases listed in {{ic|/etc/webapps/gitlab/database.yml}}. We only need to set up the production database to get GitLab working.<br />
<br />
=== Firewall ===<br />
<br />
If you want to give direct access to your Gitlab installation through an [[iptables]] firewall, you may need to adjust the port and the network address:<br />
<br />
# iptables -A tcp_inbound -p TCP -s '''192.168.1.0/24''' --destination-port '''80''' -j ACCEPT<br />
<br />
To enable API-access:<br />
<br />
# iptables -A tcp_inbound -p TCP -s '''192.168.1.0/24''' --destination-port '''8080''' -j ACCEPT<br />
<br />
If you are behind a router, do not forget to forward this port to the running GitLab server host, if you want to allow WAN-access.<br />
<br />
=== Initialize Gitlab database ===<br />
<br />
Start the [[Redis]] server before we create the database.<br />
<br />
Initialize the database and activate advanced features:<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake gitlab:setup RAILS_ENV=production"<br />
<br />
Finally run the following commands to check your installation:<br />
<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake gitlab:env:info RAILS_ENV=production"<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake gitlab:check RAILS_ENV=production"<br />
<br />
{{note|<br />
*The ''gitlab:env:info'' and ''gitlab:check'' commands will show a fatal error related to git. This is OK.<br />
*If ''gitlab:check'' fails with ''Check GitLab API access: FAILED. code: 401'', see [[#401 Unauthorized on all API access]] and [[#/etc/webapps/gitlab/secret is empty]] of the troubleshoot section to resolve this.<br />
*The ''gitlab:check'' will complain about missing initscripts. This is nothing to worry about, as [[systemd]] service files are used instead (which GitLab does not recognize).<br />
}}<br />
<br />
=== Configure Git User ===<br />
# cd /usr/share/webapps/gitlab<br />
# sudo -u gitlab -H git config --global user.name "GitLab"<br />
# sudo -u gitlab -H git config --global user.email "example@example.com"<br />
# sudo -u gitlab -H git config --global core.autocrlf "input"<br />
<br />
=== Adjust modifier bits ===<br />
(The gitlab check won't pass if the user and group ownership isn't configured properly)<br />
<br />
# chmod -R ug+rwX,o-rwx /var/lib/gitlab/repositories/<br />
# chmod -R ug-s /var/lib/gitlab/repositories<br />
# find /var/lib/gitlab/repositories/ -type d -print0 | xargs -0 chmod g+s<br />
<br />
== Start and test GitLab ==<br />
{{note|See [[#Troubleshooting]] and log files inside the {{ic|/usr/share/webapps/gitlab/log}} directory for troubleshooting.}}<br />
<br />
Make sure [[MySQL]] or [[PostgreSQL]] and [[Redis]] are running and setup correctly.<br />
<br />
After starting the database backends, we can start GitLab with its webserver (Unicorn) by [[start]]ing both the {{ic|gitlab-sidekiq}} and {{ic|gitlab-unicorn}} systemd units.<br />
<br />
To automatically launch GitLab at startup, enable the {{ic|gitlab.target}}, {{ic|gitlab-sidekiq}} and {{ic|gitlab-unicorn}} services.<br />
<br />
Now test your GitLab instance by visiting http://localhost:8080 or http://yourdomain.com, you should be prompted to create a password:<br />
<br />
{{bc|<br />
username: root<br />
password: You'll be prompted to create one on your first visit.<br />
}}<br />
<br />
== Upgrade database on updates ==<br />
After updating the {{Pkg|gitlab}} package, it is required to upgrade the database:<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:migrate RAILS_ENV=production"<br />
<br />
Afterwards, restart gitlab-related services:<br />
# systemctl daemon-reload<br />
# systemctl restart gitlab-sidekiq gitlab-unicorn gitlab-workhorse gitlab-gitaly<br />
<br />
== Advanced Configuration ==<br />
<br />
=== Custom SSH Connection ===<br />
If you are running SSH on a non-standard port, you must change the GitLab user's SSH config:<br />
{{hc|/var/lib/gitlab/.ssh/config|2=<br />
host localhost # Give your setup a name (here: override localhost)<br />
user gitlab # Your remote git user<br />
port 2222 # Your port number<br />
hostname 127.0.0.1; # Your server name or IP<br />
}}<br />
<br />
You also need to change the corresponding options (e.g. ssh_user, ssh_host, admin_uri) in the {{ic|/etc/webapps/gitlab/gitlab.yml}} file.<br />
<br />
=== HTTPS/SSL ===<br />
<br />
==== Change GitLab configs ====<br />
Modify {{ic|/etc/webapps/gitlab/shell.yml}} so the url to your GitLab site starts with {{ic|https://}}.<br />
Modify {{ic|/etc/webapps/gitlab/gitlab.yml}} so that {{ic|https:}} setting is set to {{ic|true}}.<br />
<br />
See also [[Apache HTTP Server#TLS/SSL]] and [[Let’s Encrypt]].<br />
<br />
==== Let's Encrypt ====<br />
<br />
To validate your URL, the Let's Encrypt process will try to access your gitlab server with something like {{ic|<nowiki>https://gitlab.</nowiki>''YOUR_SERVER_FQDN''/.well-known/acme-challenge/''A_LONG_ID''}}. But, due to gitlab configuration, every request to {{ic|gitlab.''YOUR_SERVER_FQDN''}} will be redirected to a proxy (gitlab-workhorse) that will not be able to deal with this URL.<br />
<br />
To bypass this issue, you can use the Let's Encrypt webroot configuration, setting the webroot at {{ic|/srv/http/letsencrypt/}}.<br />
<br />
Additionally, force the Let's Encrypt request for gitlab to be redirected to this webroot by adding the following:<br />
<br />
{{hc|/etc/http/conf/extra/gitlab.conf|<br />
Alias "/.well-known" "/srv/http/letsencrypt/.well-known"<br />
RewriteCond %{REQUEST_URI} !/\.well-known/.*<br />
}}<br />
<br />
===Web server configuration===<br />
If you want to integrate Gitlab into a running web server instead of using its build-in http server Unicorn, then follow these instructions.<br />
<br />
===== Node.js =====<br />
You can easily set up an http proxy on port 443 to proxy traffic to the GitLab application on port 8080 using http-master for Node.js. After you have creates your domain's OpenSSL keys and have gotten you CA certificate (or self signed it), then go to https://github.com/CodeCharmLtd/http-master to learn how easy it is to proxy requests to GitLab using HTTPS. http-master is built on top of [https://github.com/nodejitsu/node-http-proxy node-http-proxy].<br />
<br />
==== Nginx and unicorn ====<br />
Copy {{ic|/usr/share/doc/gitlab/nginx.conf.example}} or {{ic|/usr/share/doc/gitlab/nginx-ssl.conf.example}} to {{ic|/etc/nginx/servers-available/gitlab}}. See [[Nginx#Managing server entries]] for more information.<br />
<br />
Update the {{ic|/etc/nginx/servers-available/gitlab}} file and [[restart]] the nginx service.<br />
<br />
If you are unable to authenticate, add the following headers to {{ic|/etc/nginx/servers-available/gitlab}}:<br />
proxy_set_header X-Forwarded-Ssl on; # Only when using SSL<br />
proxy_set_header X-Frame-Options SAMEORIGIN; <br />
<br />
===== Alternative Example =====<br />
{{Note|You may need to change {{ic|localhost:8080}} with the correct gitlab address and {{ic|example.com}} to your desired server name.}}<br />
{{Tip|See [[Nginx#TLS.2FSSL|Nginx#TLS/SSL]] before enabling SSL.}}<br />
Create a file {{ic|/etc/nginx/servers-available/gitlab}} with the following content:<br />
<br />
{{hc|/etc/nginx/servers-available/gitlab|2=<br />
# Created by: Sameer Naik<br />
# Contributor: francoism90<br />
# Source: https://gist.github.com/sameersbn/becd1c976c3dc4866ef8<br />
<br />
upstream gitlab-workhorse {<br />
server unix:/run/gitlab/gitlab-workhorse.socket fail_timeout=0;<br />
}<br />
<br />
<br />
server {<br />
listen 80;<br />
#listen 443 ssl; # uncomment to enable ssl<br />
keepalive_timeout 70;<br />
server_name example.com<br />
server_tokens off;<br />
#ssl_certificate ssl/example.com.crt;<br />
#ssl_certificate_key ssl/example.com.key;<br />
charset utf-8;<br />
root /dev/null;<br />
<br />
# Increase this if you want to upload larger attachments<br />
client_max_body_size 20m;<br />
<br />
location / {<br />
proxy_read_timeout 300;<br />
proxy_connect_timeout 300;<br />
proxy_redirect off;<br />
<br />
proxy_set_header X-Forwarded-Proto $scheme;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-Ssl on;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header X-Forwarded-Proto $scheme;<br />
proxy_set_header X-Frame-Options SAMEORIGIN;<br />
<br />
proxy_pass http://gitlab-workhorse;<br />
} <br />
}<br />
}}<br />
<br />
==== Apache and unicorn ====<br />
<br />
[[Install]] {{Pkg|apache}} from the [[official repositories]].<br />
<br />
=====Configure Unicorn=====<br />
<br />
As the official installation guide instructs, copy the unicorn configuration file:<br />
# sudo -u git -H cp /usr/share/webapps/gitlab/config/unicorn.rb.example /usr/share/webapps/gitlab/config/unicorn.rb<br />
<br />
Now edit {{ic|config/unicorn.rb}} and add a listening port by uncommenting the following line:<br />
listen "127.0.0.1:8080"<br />
<br />
{{Tip| You can set a custom port if you want. Just remember to also include it in Apache's virtual host. See below.}}<br />
<br />
=====Create a virtual host for Gitlab=====<br />
<br />
Create a configuration file for Gitlab’s virtual host and insert the lines below adjusted accordingly. For the ssl section see [[LAMP#SSL]]{{Broken section link}}. If you do not need it, remove it. Notice that the SSL virtual host needs a specific IP instead of generic. Also if you set a custom port for Unicorn, do not forget to set it at the BalanceMember line.<br />
<br />
You can use these [https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache examples] to get you started.<br />
<br />
=====Enable host and start unicorn=====<br />
<br />
Enable your Gitlab virtual host and reload [[Apache]]:<br />
{{hc|/etc/httpd/conf/httpd.conf| Include /etc/httpd/conf/extra/gitlab.conf}}<br />
<br />
Copy the Apache gitlab.conf file<br />
<br />
# cp /usr/share/doc/gitlab/apache.conf.example /etc/httpd/conf/extra/gitlab.conf<br />
<br />
Finally [[start]] {{ic|gitlab-unicorn.service}}.<br />
<br />
=== Gitlab-workhorse ===<br />
<br />
{{Expansion|This section needs configuration instructions.}}<br />
<br />
Since 8.0 GitLab uses separate HTTP server {{Pkg|gitlab-workhorse}} for large HTTP requests like Git push/pull. If you want to use this instead of SSH, install the {{Pkg|gitlab-workhorse}} package, enable {{ic|gitlab-workhorse.service}} and configure web server for this. {{Pkg|gitlab-workhorse}} should now be preferred over {{ic|gitlab-unicorn}} according to the GitLab team: https://gitlab.com/gitlab-org/gitlab-ce/issues/22528#note_16036216<br />
<br />
{{Note|Unicorn is still needed so don't disable or stop {{ic|gitlab-unicorn.service}}. If you've changed the port Unicorn listens at, [[edit]] the {{ic|-authBackend}} setting in {{ic|gitlab-workhorse.service}} accordingly}}<br />
<br />
By default {{Pkg|gitlab-workhorse}} listens on {{ic|/run/gitlab/gitlab-workhorse.socket}}. You can [[edit]] {{ic|gitlab-workhorse.service}} and change the parameter {{ic|-listenAddr}} to make it listen on an address, for example {{ic|-listenAddr 127.0.0.1:8181}}. If listening on an address you also need to set the network type to {{ic|-listenNetwork tcp}}<br />
<br />
When using nginx remember to edit your nginx configuration file. To switch from gitlab-unicorn to gitlab-workhorse edit the two following settings accordingly<br />
{{hc|/etc/nginx/servers-available/gitlab|2=<br />
upstream gitlab {<br />
server unix:/run/gitlab/gitlab-workhorse.socket fail_timeout=0;<br />
}<br />
<br />
...<br />
<br />
proxy_pass http://unix:/run/gitlab/gitlab-workhorse.socket;<br />
} <br />
}<br />
}}<br />
<br />
==Useful Tips==<br />
<br />
===Fix Rake Warning===<br />
When running rake tasks for the gitlab project, this error will occur: {{ic|fatal: Not a git repository (or any of the parent directories): .git}}. This is a bug in bundler, and it can be safely ignored. However, if you want to git rid of the error, the following method can be used:<br />
<br />
{{bc|1=<br />
# cd /usr/share/webapps/gitlab<br />
# sudo -u gitlab git init<br />
# sudo -u gitlab git commit -m "initial commit" --allow-empty<br />
}}<br />
<br />
===Hook into /var===<br />
{{bc|1=<br />
# mkdir -m700 /var/log/gitlab /var/tmp/gitlab<br />
# chown gitlab:gitlab /var/log/gitlab /var/tmp/gitlab<br />
# sudo -u gitlab -i<br />
# cd ~/gitlab<br />
# d=log; mv $d/* /var/$d/gitlab; rm -f $d/.gitkeep; rm -r $d && ln -s /var/$d/gitlab $d<br />
# d=tmp; mv $d/* /var/$d/gitlab; rm -f $d/.gitkeep; rm -r $d && ln -s /var/$d/gitlab $d<br />
}}<br />
<br />
===Hidden options===<br />
Go to Gitlab's home directory:<br />
# cd /usr/share/webapps/gitlab<br />
<br />
and run:<br />
{{hc|<nowiki># rake -T | grep gitlab</nowiki>|<nowiki><br />
rake gitlab:app:check # GITLAB | Check the configuration of the GitLab Rails app<br />
rake gitlab:backup:create # GITLAB | Create a backup of the GitLab system<br />
rake gitlab:backup:restore # GITLAB | Restore a previously created backup<br />
rake gitlab:check # GITLAB | Check the configuration of GitLab and its environment<br />
rake gitlab:cleanup:block_removed_ldap_users # GITLAB | Cleanup | Block users that have been removed in LDAP<br />
rake gitlab:cleanup:dirs # GITLAB | Cleanup | Clean namespaces<br />
rake gitlab:cleanup:repos # GITLAB | Cleanup | Clean repositories<br />
rake gitlab:env:check # GITLAB | Check the configuration of the environment<br />
rake gitlab:env:info # GITLAB | Show information about GitLab and its environment<br />
rake gitlab:generate_docs # GITLAB | Generate sdocs for project<br />
rake gitlab:gitlab_shell:check # GITLAB | Check the configuration of GitLab Shell<br />
rake gitlab:import:all_users_to_all_groups # GITLAB | Add all users to all groups (admin users are added as owners)<br />
rake gitlab:import:all_users_to_all_projects # GITLAB | Add all users to all projects (admin users are added as masters)<br />
rake gitlab:import:repos # GITLAB | Import bare repositories from gitlab_shell -> repos_path into GitLab project instance<br />
rake gitlab:import:user_to_groups[email] # GITLAB | Add a specific user to all groups (as a developer)<br />
rake gitlab:import:user_to_projects[email] # GITLAB | Add a specific user to all projects (as a developer)<br />
rake gitlab:satellites:create # GITLAB | Create satellite repos<br />
rake gitlab:setup # GITLAB | Setup production application<br />
rake gitlab:shell:build_missing_projects # GITLAB | Build missing projects<br />
rake gitlab:shell:install[tag,repo] # GITLAB | Install or upgrade gitlab-shell<br />
rake gitlab:shell:setup # GITLAB | Setup gitlab-shell<br />
rake gitlab:sidekiq:check # GITLAB | Check the configuration of Sidekiq<br />
rake gitlab:test # GITLAB | Run all tests<br />
rake gitlab:web_hook:add # GITLAB | Adds a web hook to the projects<br />
rake gitlab:web_hook:list # GITLAB | List web hooks<br />
rake gitlab:web_hook:rm # GITLAB | Remove a web hook from the projects<br />
rake setup # GITLAB | Setup gitlab db<br />
</nowiki>}}<br />
<br />
===Backup and restore===<br />
<br />
Create a backup of the gitlab system:<br />
# sudo -u gitlab -H rake RAILS_ENV=production gitlab:backup:create<br />
<br />
Restore the previously created backup file {{ic|/home/gitlab/gitlab/tmp/backups/20130125_11h35_1359131740_gitlab_backup.tar}}:<br />
# sudo -u gitlab -H rake RAILS_ENV=production gitlab:backup:restore BACKUP=/home/gitlab/gitlab/tmp/backups/20130125_11h35_1359131740<br />
<br />
{{Note| Backup folder is set in {{ic|config/gitlab.yml}}. GitLab backup and restore is documented [https://github.com/gitlabhq/gitlabhq/blob/master/doc/raketasks/backup_restore.md here].}}<br />
<br />
===Migrate from sqlite to mysql===<br />
<br />
Get latest code as described in [[#Update Gitlab]]{{Broken section link}}.<br />
Save data.<br />
# cd /home/gitlab/gitlab<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:data:dump RAILS_ENV=production"<br />
<br />
Follow [[#Mysql]]{{Broken section link}} instructions and then setup the database.<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:setup RAILS_ENV=production"<br />
<br />
Finally restore old data.<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:data:load RAILS_ENV=production"<br />
<br />
===Running GitLab with rvm===<br />
<br />
To run gitlab with rvm first you have to set up an rvm:<br />
<br />
curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3<br />
<br />
{{Note|Version 1.9.3 is currently recommended to avoid some compatibility issues.}}<br />
<br />
For the complete installation you will want to be the final user (e.g. {{ic|git}}) so make sure to switch to this user and activate your rvm:<br />
<br />
su - git<br />
source "$HOME/.rvm/scripts/rvm"<br />
<br />
Then continue with the installation instructions from above. However, the systemd scripts will not work this way, because the environment for the rvm is not activated. The recommendation here is to create to separate shell scripts for {{ic|unicorn}} and {{ic|sidekiq}} to activate the environment and then start the service:<br />
<br />
{{hc|gitlab.sh|<nowiki><br />
#!/bin/sh<br />
source `/home/git/.rvm/bin/rvm 1.9.3 do rvm env --path`<br />
bundle-2.3 exec "unicorn_rails -c /usr/share/webapps/gitlab/config/unicorn.rb -E production"</nowiki><br />
}}<br />
<br />
{{hc|sidekiq.sh|<nowiki><br />
#!/bin/sh<br />
source `/home/git/.rvm/bin/rvm 1.9.3 do rvm env --path`<br />
case $1 in<br />
start)<br />
bundle-2.3 exec rake sidekiq:start RAILS_ENV=production<br />
;;<br />
stop)<br />
bundle-2.3 exec rake sidekiq:stop RAILS_ENV=production<br />
;;<br />
*)<br />
echo "Usage $0 {start|stop}"<br />
esac<br />
</nowiki>}}<br />
<br />
Then modify the above systemd files so they use these scripts. Modify the given lines:<br />
<br />
{{hc|gitlab.service|<nowiki><br />
ExecStart=/home/git/bin/gitlab.sh<br />
</nowiki>}}<br />
{{hc|sidekiq.service|<nowiki><br />
ExecStart=/home/git/bin/sidekiq.sh start<br />
ExecStop=/home/git/bin/sidekiq.sh stop<br />
</nowiki>}}<br />
<br />
===Sending mails from Gitlab via SMTP===<br />
<br />
You might want to use a gmail (or other mail service) to send mails from your gitlab server. This avoids the need to install a mail daemon on the gitlab server.<br />
<br />
Adjust {{ic|smtp_settings.rb}} according to your mail server settings:<br />
<br />
{{hc|/usr/share/webapps/gitlab/config/initializers/smtp_settings.rb|<nowiki><br />
if Rails.env.production?<br />
Gitlab::Application.config.action_mailer.delivery_method = :smtp<br />
<br />
Gitlab::Application.config.action_mailer.smtp_settings = {<br />
address: 'smtp.gmail.com',<br />
port: 587,<br />
domain: 'gmail.com',<br />
user_name: 'username@gmail.com',<br />
password: 'application password',<br />
authentication: 'plain',<br />
enable_starttls_auto: true<br />
}<br />
end</nowiki>}}<br />
<br />
Gmail will reject mails received this way (and send you a mail that it did). You will need to disable secure authentication (follow the link in the rejection mail) to work around this. The more secure approach is to enable two-factor authentication for username@gmail.com and to set up an application password for this configuration file.<br />
<br />
==Troubleshooting==<br />
<br />
Sometimes things may not work as expected. Be sure to visit the [https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide Trouble Shooting Guide].<br />
<br />
=== HTTPS is not green (gravatar not using https) ===<br />
Redis caches gravatar images, so if you have visited your GitLab with http, then enabled https, gravatar will load up the non-secure images. You can clear the cache by doing<br />
<br />
cd /usr/share/webapps/gitlab<br />
RAILS_ENV=production bundle-2.3 exec rake cache:clear<br />
<br />
as the gitlab user.<br />
<br />
=== 401 Unauthorized on all API access ===<br />
Make 100% sure, that the files {{ic|/etc/webapps/gitlab/secret}} and {{ic|/etc/webapps/gitlab-shell/secret}} files contain something!<br />
<br />
=== Error at push bad line length character: API ===<br />
If you get the following error while trying to push<br />
fatal: protocol error: bad line length character: API<br />
<br />
Check that your {{ic|/etc/webapps/gitlab-shell/secret}} matches {{ic|/usr/share/webapps/gitlab/.gitlab_shell_secret}}<br />
<br />
If it is not the same, recreate the file with the following command<br />
ln -s /etc/webapps/gitlab-shell/secret /usr/share/webapps/gitlab/.gitlab_shell_secret<br />
<br />
=== Errors after updating ===<br />
After updating the package from the AUR, the database migrations and asset updates will sometimes fail. These steps may resolve the issue, if a simple reboot does not.<br />
<br />
First, move to the gitlab installation directory.<br />
# cd /usr/share/webapps/gitlab<br />
<br />
If every gitlab page gives a 500 error, then the database migrations and the assets are probably stale. If not, skip this step.<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:migrate RAILS_ENV=production"<br />
<br />
If gitlab is constantly waiting for the deployment to finish, then the assets have probably not been recompiled.<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake gitlab:assets:clean gitlab:assets:compile cache:clear RAILS_ENV=production"<br />
<br />
Finally, restart the gitlab services and test your site.<br />
# systemctl restart gitlab-unicorn gitlab-sidekiq gitlab-workhorse<br />
<br />
=== /etc/webapps/gitlab/secret is empty ===<br />
This file is usually generated while installing the {{pkg|gitlab-shell}} and the {{pkg|gitlab}} packages, but in some cases it may need to be generated manually.<br />
# hexdump -v -n 64 -e '1/1 "%02x"' /dev/urandom > /etc/webapps/gitlab-shell/secret<br />
# chown root:gitlab /etc/webapps/gitlab-shell/secret<br />
# chmod 640 /etc/webapps/gitlab-shell/secret<br />
<br />
# hexdump -v -n 64 -e '1/1 "%02x"' /dev/urandom > /etc/webapps/gitlab/secret<br />
# chown root:gitlab /etc/webapps/gitlab/secret<br />
# chmod 640 /etc/webapps/gitlab/secret<br />
<br />
==See also==<br />
*[https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md Official Documentation]<br />
*[https://gitlab.com/gitlab-org/gitlab-recipes Gitlab recipes with further documentation on running it with several webservers]<br />
*[https://github.com/gitlabhq/gitlabhq GitLab source code]</div>Krukaihttps://wiki.archlinux.org/index.php?title=GitLab&diff=488886GitLab2017-09-06T18:31:49Z<p>Krukai: /* Redis */ Fixed broken section link</p>
<hr />
<div>[[Category:Version Control System]]<br />
[[Category:Web applications]]<br />
[[ja:Gitlab]]<br />
{{Related articles start}}<br />
{{Related|Gitolite}}<br />
{{Related|Ruby on Rails}}<br />
{{Related articles end}}<br />
<br />
From [https://about.gitlab.com/ GitLab's homepage:]<br />
<br />
:GitLab offers git repository management, code reviews, issue tracking, activity feeds and wikis. Enterprises install GitLab on-premise and connect it with LDAP and Active Directory servers for secure authentication and authorization. A single GitLab server can handle more than 25,000 users but it is also possible to create a high availability setup with multiple active servers.<br />
<br />
An example live version can be found at [https://gitlab.com/ GitLab.com].<br />
<br />
== Installation ==<br />
{{Note|If you want to use RVM refer to the article [[#Running GitLab with rvm]] before starting with the installation}}<br />
<br />
{{Note|This article covers installing and configuring GitLab without HTTPS at first. If needed, see [[#Advanced Configuration]] to set up SSL}}<br />
<br />
GitLab requires [[Redis]] and a database backend. If you plan to run it on the same machine, first install either [[MySQL]] or [[PostgreSQL]].<br />
<br />
[[Install]] the {{pkg|gitlab}} package.<br />
<br />
In order to receive mail notifications, a mail server must be installed and configured. See the following for more information: [[:Category:Mail server]]<br />
<br />
== Configuration ==<br />
<br />
=== Preliminary Notes ===<br />
The {{pkg|gitlab}} package installs GitLab's files in a manner that more closely follows standard Linux conventions:<br />
<br />
{| class="wikitable"<br />
! Description <br />
! [https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md GitLab's Official] <br />
! {{pkg|gitlab}} <br />
|----------------------------------------------------------<br />
| Configuration File GitShell<br />
| {{ic|/home/git/gitlab-shell/config.yml}}<br />
| {{ic|/etc/webapps/gitlab-shell/config.yml}}<br />
|----------------------------------------------------------<br />
| Configuration File GitLab<br />
| {{ic|/home/git/gitlab/config/gitlab.yml}}<br />
| {{ic|/etc/webapps/gitlab/gitlab.yml}}<br />
|----------------------------------------------------------<br />
| User (Home Directory)<br />
| {{ic|git}} ({{ic|/home/git}})<br />
| {{ic|gitlab}} ({{ic|/var/lib/gitlab}})<br />
|}<br />
<br />
{{tip|If you are familiar with the [[Arch Build System]] you can edit the PKGBUILD and relevant files to change gitlab's home directory to a place of your liking.}}<br />
<br />
===GitLab===<br />
Edit {{ic|/etc/webapps/gitlab/gitlab.yml}} and setup at least the following parameters:<br />
<br />
{{Tip|The hostname and port are used for the {{ic|git clone http://hostname:port}} as example.}}<br />
<br />
'''Hostname:''' In the {{ic|gitlab:}} section set {{ic|host:}} - replacing {{ic|localhost}} to {{ic|yourdomain.com}} ('''note:''' no 'http://' or trailing slash) - into your fully qualified domain name.<br />
<br />
'''Port:''' {{ic|port:}} can be confusing. This is not the port that the gitlab server (unicorn) runs on; it's the port that users will initially access through in their browser. Basically, if you intend for users to visit 'yourdomain.com' in their browser, without appending a port number to the domain name, leave {{ic|port:}} as {{ic|80}}. If you intend your users to type something like 'yourdomain.com:3425' into their browsers, then you'd set {{ic|port:}} to {{ic|3425}}. You will also have to '''configure your webserver''' to listen on that port.<br />
<br />
'''Timezone (optional):''' The {{ic|time_zone:}} parameter is optional, but may be useful to force the zone of GitLab applications.<br />
<br />
Finally set the correct permissions to the ''uploads'' directory:<br />
<br />
# chmod 700 /var/lib/gitlab/uploads<br />
<br />
===GitLab Shell===<br />
{{Out of date|Configuration variables in this section are no longer in config.yml}}<br />
{{Note|You can leave the {{ic|gitlab_url}} with default value if you intend to host GitLab on the same host.}} <br />
<br />
Edit {{ic|/etc/webapps/gitlab-shell/config.yml}} and set {{ic|gitlab_url:}} to the prefer url and port:<br />
{{hc|/etc/webapps/gitlab-shell/config.yml|2=<br />
# GitLab user. git by default<br />
user: gitlab<br />
<br />
# Url to gitlab instance. Used for api calls. Should end with a slash.<br />
# Default: http://localhost:8080/<br />
# You only have to change the default if you have configured Unicorn<br />
# to listen on a custom port, or if you have configured Unicorn to<br />
# only listen on a Unix domain socket.<br />
gitlab_url: "http://localhost:8080/" #<br />
<br />
http_settings:<br />
# user: someone<br />
# password: somepass<br />
...<br />
}}<br />
<br />
Update the {{ic|/etc/webapps/gitlab/unicorn.rb}} configuration if the port and/or hostname is different from the default:<br />
{{hc|/etc/webapps/gitlab/unicorn.rb|2=<br />
listen "/run/gitlab/gitlab.socket", :backlog => 1024<br />
listen "'''127.0.0.1:8080'''", :tcp_nopush => true<br />
}}<br />
<br />
===Redis===<br />
<br />
In order to provide sufficient performance you will need a cache database. [[Redis#Installation|Install]] and [[Redis#Configuration|configure]] a Redis instance, being careful to the section dedicated to listening via a socket.<br />
<br />
* Add the user ''git'' and ''gitlab'' to the ''redis'' [[group]].<br />
<br />
* Update the configuration files:<br />
{{hc|/etc/webapps/gitlab/resque.yml|2=<br />
development: unix:/run/redis/redis.sock<br />
test: unix:/run/redis/redis.sock<br />
production: unix:/run/redis/redis.sock<br />
}}<br />
<br />
{{hc|/etc/webapps/gitlab-shell/config.yml|2=<br />
# Redis settings used for pushing commit notices to gitlab<br />
redis:<br />
bin: /usr/bin/redis-cli<br />
host: 127.0.0.1<br />
port: 6379<br />
# pass: redispass # Allows you to specify the password for Redis<br />
database: 5 # Use different database, default up to 16<br />
socket: /run/redis/redis.sock # '''uncomment''' this line<br />
namespace: resque:gitlab<br />
}}<br />
<br />
=== Database backend ===<br />
A Database backend will be required before Gitlab can be run. Currently GitLab supports [[MariaDB]] and [[PostgreSQL]]. By default, GitLab assumes you will use MySQL. Extra work is needed if you plan to use PostgreSQL.<br />
<br />
==== MariaDB ====<br />
To set up MySQL (MariaDB) you need to create a database called {{ic|gitlabhq_production}} along with a user (default: {{ic|gitlab}}) who has full privileges to the database:<br />
<br />
{{hc|$ mysql -u root -p|2=<br />
mysql> CREATE DATABASE `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY 'password';<br />
mysql> GRANT ALL ON `gitlabhq_production`.* TO 'gitlab'@'localhost';<br />
mysql> \q<br />
}}<br />
<br />
Try connecting to the new database with the new user:<br />
<br />
$ mysql -u '''gitlab''' -p -D gitlabhq_production<br />
<br />
Copy the MySQL template file before configuring it:<br />
<br />
# cp /usr/share/doc/gitlab/database.yml.mysql /etc/webapps/gitlab/database.yml<br />
<br />
Next you will need to open {{ic|/etc/webapps/gitlab/database.yml}} and set {{ic|username:}} and {{ic|password:}} for the {{ic|gitlabhq_production}}:<br />
<br />
{{hc|/etc/webapps/gitlab/database.yml|<br />
#<br />
# PRODUCTION<br />
#<br />
production:<br />
adapter: mysql2<br />
encoding: utf8<br />
collation: utf8_general_ci<br />
reconnect: false<br />
database: gitlabhq_production<br />
pool: 10<br />
username: '''username'''<br />
password: '''"password"'''<br />
# host: localhost<br />
# socket: /run/mysqld/mysqld.sock # If running MariaDB as socket<br />
...<br />
}}<br />
<br />
It should not be set as world readable, e.g. only processes running under the {{ic|gitlab}} user should have read/write access:<br />
<br />
# chmod 600 /etc/webapps/gitlab/database.yml<br />
# chown gitlab:gitlab /etc/webapps/gitlab/database.yml<br />
<br />
For more info and other ways to create/manage MySQL databases, see the [https://mariadb.org/docs/ MariaDB documentation] and the [https://github.com/gitlabhq/gitlabhq/blob/6-5-stable/doc/install/installation.md GitLab official (generic) install guide].<br />
<br />
==== PostgreSQL ====<br />
Login to PostgreSQL and create the {{ic|gitlabhq_production}} database with along with it's user. Remember to change {{ic|your_username_here}} and {{ic|your_password_here}} to the real values:<br />
<br />
# psql -d template1<br />
<br />
{{bc|1=<br />
template1=# CREATE USER your_username_here WITH PASSWORD 'your_password_here';<br />
template1=# ALTER USER your_username_here SUPERUSER;<br />
template1=# CREATE DATABASE gitlabhq_production OWNER your_username_here;<br />
template1=# \q<br />
}}<br />
<br />
{{Note|The reason for creating the user as a superuser is that GitLab is trying to be "smart" and install extensions (not just create them in it's own userspace). And this is only allowed by superusers in Postgresql.}}<br />
<br />
Try connecting to the new database with the new user to verify it works:<br />
<br />
# psql -d gitlabhq_production<br />
<br />
Copy the PostgreSQL template file before configuring it (overwriting the default MySQL configuration file):<br />
<br />
# cp /usr/share/doc/gitlab/database.yml.postgresql /etc/webapps/gitlab/database.yml<br />
<br />
Open the new {{ic|/etc/webapps/gitlab/database.yml}} and set the values for {{ic|username:}} and {{ic|password:}}. For example:<br />
<br />
{{hc|/etc/webapps/gitlab/database.yml|<br />
#<br />
# PRODUCTION<br />
#<br />
production:<br />
adapter: postgresql<br />
encoding: unicode<br />
database: gitlabhq_production<br />
pool: 10<br />
username: your_username_here<br />
password: "your_password_here"<br />
# host: localhost<br />
# port: 5432<br />
# socket: /tmp/postgresql.sock<br />
...<br />
}}<br />
<br />
For our purposes (unless you know what you are doing), you do not need to worry about configuring the other databases listed in {{ic|/etc/webapps/gitlab/database.yml}}. We only need to set up the production database to get GitLab working.<br />
<br />
=== Firewall ===<br />
<br />
If you want to give direct access to your Gitlab installation through an [[iptables]] firewall, you may need to adjust the port and the network address:<br />
<br />
# iptables -A tcp_inbound -p TCP -s '''192.168.1.0/24''' --destination-port '''80''' -j ACCEPT<br />
<br />
To enable API-access:<br />
<br />
# iptables -A tcp_inbound -p TCP -s '''192.168.1.0/24''' --destination-port '''8080''' -j ACCEPT<br />
<br />
If you are behind a router, do not forget to forward this port to the running GitLab server host, if you want to allow WAN-access.<br />
<br />
=== Initialize Gitlab database ===<br />
<br />
Start the [[Redis]] server before we create the database.<br />
<br />
Initialize the database and activate advanced features:<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake gitlab:setup RAILS_ENV=production"<br />
<br />
Finally run the following commands to check your installation:<br />
<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake gitlab:env:info RAILS_ENV=production"<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake gitlab:check RAILS_ENV=production"<br />
<br />
{{note|<br />
*The ''gitlab:env:info'' and ''gitlab:check'' commands will show a fatal error related to git. This is OK.<br />
*If ''gitlab:check'' fails with ''Check GitLab API access: FAILED. code: 401'', see [[#401 Unauthorized on all API access]] and [[#/etc/webapps/gitlab/secret is empty]] of the troubleshoot section to resolve this.<br />
*The ''gitlab:check'' will complain about missing initscripts. This is nothing to worry about, as [[systemd]] service files are used instead (which GitLab does not recognize).<br />
}}<br />
<br />
=== Configure Git User ===<br />
# cd /usr/share/webapps/gitlab<br />
# sudo -u gitlab -H git config --global user.name "GitLab"<br />
# sudo -u gitlab -H git config --global user.email "example@example.com"<br />
# sudo -u gitlab -H git config --global core.autocrlf "input"<br />
<br />
=== Adjust modifier bits ===<br />
(The gitlab check won't pass if the user and group ownership isn't configured properly)<br />
<br />
# chmod -R ug+rwX,o-rwx /var/lib/gitlab/repositories/<br />
# chmod -R ug-s /var/lib/gitlab/repositories<br />
# find /var/lib/gitlab/repositories/ -type d -print0 | xargs -0 chmod g+s<br />
<br />
== Start and test GitLab ==<br />
{{note|See [[#Troubleshooting]] and log files inside the {{ic|/usr/share/webapps/gitlab/log}} directory for troubleshooting.}}<br />
<br />
Make sure [[MySQL]] or [[PostgreSQL]] and [[Redis]] are running and setup correctly.<br />
<br />
After starting the database backends, we can start GitLab with its webserver (Unicorn) by [[start]]ing both the {{ic|gitlab-sidekiq}} and {{ic|gitlab-unicorn}} systemd units.<br />
<br />
To automatically launch GitLab at startup, enable the {{ic|gitlab.target}}, {{ic|gitlab-sidekiq}} and {{ic|gitlab-unicorn}} services.<br />
<br />
Now test your GitLab instance by visiting http://localhost:8080 or http://yourdomain.com, you should be prompted to create a password:<br />
<br />
{{bc|<br />
username: root<br />
password: You'll be prompted to create one on your first visit.<br />
}}<br />
<br />
== Upgrade database on updates ==<br />
After updating the {{Pkg|gitlab}} package, it is required to upgrade the database:<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:migrate RAILS_ENV=production"<br />
<br />
Afterwards, restart gitlab-related services:<br />
# systemctl daemon-reload<br />
# systemctl restart gitlab-sidekiq gitlab-unicorn gitlab-workhorse gitlab-gitaly<br />
<br />
== Advanced Configuration ==<br />
<br />
=== Custom SSH Connection ===<br />
If you are running SSH on a non-standard port, you must change the GitLab user's SSH config:<br />
{{hc|/var/lib/gitlab/.ssh/config|2=<br />
host localhost # Give your setup a name (here: override localhost)<br />
user gitlab # Your remote git user<br />
port 2222 # Your port number<br />
hostname 127.0.0.1; # Your server name or IP<br />
}}<br />
<br />
You also need to change the corresponding options (e.g. ssh_user, ssh_host, admin_uri) in the {{ic|/etc/webapps/gitlab/gitlab.yml}} file.<br />
<br />
=== HTTPS/SSL ===<br />
<br />
==== Change GitLab configs ====<br />
Modify {{ic|/etc/webapps/gitlab/shell.yml}} so the url to your GitLab site starts with {{ic|https://}}.<br />
Modify {{ic|/etc/webapps/gitlab/gitlab.yml}} so that {{ic|https:}} setting is set to {{ic|true}}.<br />
<br />
See also [[Apache HTTP Server#TLS/SSL]] and [[Let’s Encrypt]].<br />
<br />
==== Let's Encrypt ====<br />
<br />
To validate your URL, the Let's Encrypt process will try to access your gitlab server with something like {{ic|<nowiki>https://gitlab.</nowiki>''YOUR_SERVER_FQDN''/.well-known/acme-challenge/''A_LONG_ID''}}. But, due to gitlab configuration, every request to {{ic|gitlab.''YOUR_SERVER_FQDN''}} will be redirected to a proxy (gitlab-workhorse) that will not be able to deal with this URL.<br />
<br />
To bypass this issue, you can use the Let's Encrypt webroot configuration, setting the webroot at {{ic|/srv/http/letsencrypt/}}.<br />
<br />
Additionally, force the Let's Encrypt request for gitlab to be redirected to this webroot by adding the following:<br />
<br />
{{hc|/etc/http/conf/extra/gitlab.conf|<br />
Alias "/.well-known" "/srv/http/letsencrypt/.well-known"<br />
RewriteCond %{REQUEST_URI} !/\.well-known/.*<br />
}}<br />
<br />
===Web server configuration===<br />
If you want to integrate Gitlab into a running web server instead of using its build-in http server Unicorn, then follow these instructions.<br />
<br />
===== Node.js =====<br />
You can easily set up an http proxy on port 443 to proxy traffic to the GitLab application on port 8080 using http-master for Node.js. After you have creates your domain's OpenSSL keys and have gotten you CA certificate (or self signed it), then go to https://github.com/CodeCharmLtd/http-master to learn how easy it is to proxy requests to GitLab using HTTPS. http-master is built on top of [https://github.com/nodejitsu/node-http-proxy node-http-proxy].<br />
<br />
==== Nginx and unicorn ====<br />
Copy {{ic|/usr/share/doc/gitlab/nginx.conf.example}} or {{ic|/usr/share/doc/gitlab/nginx-ssl.conf.example}} to {{ic|/etc/nginx/servers-available/gitlab}}. See [[Nginx#Managing server entries]] for more information.<br />
<br />
Update the {{ic|/etc/nginx/servers-available/gitlab}} file and [[restart]] the nginx service.<br />
<br />
If you are unable to authenticate, add the following headers to {{ic|/etc/nginx/servers-available/gitlab}}:<br />
proxy_set_header X-Forwarded-Ssl on; # Only when using SSL<br />
proxy_set_header X-Frame-Options SAMEORIGIN; <br />
<br />
===== Alternative Example =====<br />
{{Note|You may need to change {{ic|localhost:8080}} with the correct gitlab address and {{ic|example.com}} to your desired server name.}}<br />
{{Tip|See [[Nginx#TLS.2FSSL|Nginx#TLS/SSL]] before enabling SSL.}}<br />
Create a file {{ic|/etc/nginx/servers-available/gitlab}} with the following content:<br />
<br />
{{hc|/etc/nginx/servers-available/gitlab|2=<br />
# Created by: Sameer Naik<br />
# Contributor: francoism90<br />
# Source: https://gist.github.com/sameersbn/becd1c976c3dc4866ef8<br />
<br />
upstream gitlab-workhorse {<br />
server unix:/run/gitlab/gitlab-workhorse.socket fail_timeout=0;<br />
}<br />
<br />
<br />
server {<br />
listen 80;<br />
#listen 443 ssl; # uncomment to enable ssl<br />
keepalive_timeout 70;<br />
server_name example.com<br />
server_tokens off;<br />
#ssl_certificate ssl/example.com.crt;<br />
#ssl_certificate_key ssl/example.com.key;<br />
charset utf-8;<br />
root /dev/null;<br />
<br />
# Increase this if you want to upload larger attachments<br />
client_max_body_size 20m;<br />
<br />
location / {<br />
proxy_read_timeout 300;<br />
proxy_connect_timeout 300;<br />
proxy_redirect off;<br />
<br />
proxy_set_header X-Forwarded-Proto $scheme;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-Ssl on;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header X-Forwarded-Proto $scheme;<br />
proxy_set_header X-Frame-Options SAMEORIGIN;<br />
<br />
proxy_pass http://gitlab-workhorse;<br />
} <br />
}<br />
}}<br />
<br />
==== Apache and unicorn ====<br />
<br />
[[Install]] {{Pkg|apache}} from the [[official repositories]].<br />
<br />
=====Configure Unicorn=====<br />
<br />
As the official installation guide instructs, copy the unicorn configuration file:<br />
# sudo -u git -H cp /usr/share/webapps/gitlab/config/unicorn.rb.example /usr/share/webapps/gitlab/config/unicorn.rb<br />
<br />
Now edit {{ic|config/unicorn.rb}} and add a listening port by uncommenting the following line:<br />
listen "127.0.0.1:8080"<br />
<br />
{{Tip| You can set a custom port if you want. Just remember to also include it in Apache's virtual host. See below.}}<br />
<br />
=====Create a virtual host for Gitlab=====<br />
<br />
Create a configuration file for Gitlab’s virtual host and insert the lines below adjusted accordingly. For the ssl section see [[LAMP#SSL]]{{Broken section link}}. If you do not need it, remove it. Notice that the SSL virtual host needs a specific IP instead of generic. Also if you set a custom port for Unicorn, do not forget to set it at the BalanceMember line.<br />
<br />
You can use these [https://gitlab.com/gitlab-org/gitlab-recipes/blob/079f70dd2c091434a8dd04ed5b1a0d0e937cd361/web-server/apache/gitlab-ssl-apache2.4.conf examples] to get you started.<br />
<br />
=====Enable host and start unicorn=====<br />
<br />
Enable your Gitlab virtual host and reload [[Apache]]:<br />
{{hc|/etc/httpd/conf/httpd.conf| Include /etc/httpd/conf/extra/gitlab.conf}}<br />
<br />
Copy the Apache gitlab.conf file<br />
<br />
# cp /usr/share/doc/gitlab/apache.conf.example /etc/httpd/conf/extra/gitlab.conf<br />
<br />
Finally [[start]] {{ic|gitlab-unicorn.service}}.<br />
<br />
=== Gitlab-workhorse ===<br />
<br />
{{Expansion|This section needs configuration instructions.}}<br />
<br />
Since 8.0 GitLab uses separate HTTP server {{Pkg|gitlab-workhorse}} for large HTTP requests like Git push/pull. If you want to use this instead of SSH, install the {{Pkg|gitlab-workhorse}} package, enable {{ic|gitlab-workhorse.service}} and configure web server for this. {{Pkg|gitlab-workhorse}} should now be preferred over {{ic|gitlab-unicorn}} according to the GitLab team: https://gitlab.com/gitlab-org/gitlab-ce/issues/22528#note_16036216<br />
<br />
{{Note|Unicorn is still needed so don't disable or stop {{ic|gitlab-unicorn.service}}. If you've changed the port Unicorn listens at, [[edit]] the {{ic|-authBackend}} setting in {{ic|gitlab-workhorse.service}} accordingly}}<br />
<br />
By default {{Pkg|gitlab-workhorse}} listens on {{ic|/run/gitlab/gitlab-workhorse.socket}}. You can [[edit]] {{ic|gitlab-workhorse.service}} and change the parameter {{ic|-listenAddr}} to make it listen on an address, for example {{ic|-listenAddr 127.0.0.1:8181}}. If listening on an address you also need to set the network type to {{ic|-listenNetwork tcp}}<br />
<br />
When using nginx remember to edit your nginx configuration file. To switch from gitlab-unicorn to gitlab-workhorse edit the two following settings accordingly<br />
{{hc|/etc/nginx/servers-available/gitlab|2=<br />
upstream gitlab {<br />
server unix:/run/gitlab/gitlab-workhorse.socket fail_timeout=0;<br />
}<br />
<br />
...<br />
<br />
proxy_pass http://unix:/run/gitlab/gitlab-workhorse.socket;<br />
} <br />
}<br />
}}<br />
<br />
==Useful Tips==<br />
<br />
===Fix Rake Warning===<br />
When running rake tasks for the gitlab project, this error will occur: {{ic|fatal: Not a git repository (or any of the parent directories): .git}}. This is a bug in bundler, and it can be safely ignored. However, if you want to git rid of the error, the following method can be used:<br />
<br />
{{bc|1=<br />
# cd /usr/share/webapps/gitlab<br />
# sudo -u gitlab git init<br />
# sudo -u gitlab git commit -m "initial commit" --allow-empty<br />
}}<br />
<br />
===Hook into /var===<br />
{{bc|1=<br />
# mkdir -m700 /var/log/gitlab /var/tmp/gitlab<br />
# chown gitlab:gitlab /var/log/gitlab /var/tmp/gitlab<br />
# sudo -u gitlab -i<br />
# cd ~/gitlab<br />
# d=log; mv $d/* /var/$d/gitlab; rm -f $d/.gitkeep; rm -r $d && ln -s /var/$d/gitlab $d<br />
# d=tmp; mv $d/* /var/$d/gitlab; rm -f $d/.gitkeep; rm -r $d && ln -s /var/$d/gitlab $d<br />
}}<br />
<br />
===Hidden options===<br />
Go to Gitlab's home directory:<br />
# cd /usr/share/webapps/gitlab<br />
<br />
and run:<br />
{{hc|<nowiki># rake -T | grep gitlab</nowiki>|<nowiki><br />
rake gitlab:app:check # GITLAB | Check the configuration of the GitLab Rails app<br />
rake gitlab:backup:create # GITLAB | Create a backup of the GitLab system<br />
rake gitlab:backup:restore # GITLAB | Restore a previously created backup<br />
rake gitlab:check # GITLAB | Check the configuration of GitLab and its environment<br />
rake gitlab:cleanup:block_removed_ldap_users # GITLAB | Cleanup | Block users that have been removed in LDAP<br />
rake gitlab:cleanup:dirs # GITLAB | Cleanup | Clean namespaces<br />
rake gitlab:cleanup:repos # GITLAB | Cleanup | Clean repositories<br />
rake gitlab:env:check # GITLAB | Check the configuration of the environment<br />
rake gitlab:env:info # GITLAB | Show information about GitLab and its environment<br />
rake gitlab:generate_docs # GITLAB | Generate sdocs for project<br />
rake gitlab:gitlab_shell:check # GITLAB | Check the configuration of GitLab Shell<br />
rake gitlab:import:all_users_to_all_groups # GITLAB | Add all users to all groups (admin users are added as owners)<br />
rake gitlab:import:all_users_to_all_projects # GITLAB | Add all users to all projects (admin users are added as masters)<br />
rake gitlab:import:repos # GITLAB | Import bare repositories from gitlab_shell -> repos_path into GitLab project instance<br />
rake gitlab:import:user_to_groups[email] # GITLAB | Add a specific user to all groups (as a developer)<br />
rake gitlab:import:user_to_projects[email] # GITLAB | Add a specific user to all projects (as a developer)<br />
rake gitlab:satellites:create # GITLAB | Create satellite repos<br />
rake gitlab:setup # GITLAB | Setup production application<br />
rake gitlab:shell:build_missing_projects # GITLAB | Build missing projects<br />
rake gitlab:shell:install[tag,repo] # GITLAB | Install or upgrade gitlab-shell<br />
rake gitlab:shell:setup # GITLAB | Setup gitlab-shell<br />
rake gitlab:sidekiq:check # GITLAB | Check the configuration of Sidekiq<br />
rake gitlab:test # GITLAB | Run all tests<br />
rake gitlab:web_hook:add # GITLAB | Adds a web hook to the projects<br />
rake gitlab:web_hook:list # GITLAB | List web hooks<br />
rake gitlab:web_hook:rm # GITLAB | Remove a web hook from the projects<br />
rake setup # GITLAB | Setup gitlab db<br />
</nowiki>}}<br />
<br />
===Backup and restore===<br />
<br />
Create a backup of the gitlab system:<br />
# sudo -u gitlab -H rake RAILS_ENV=production gitlab:backup:create<br />
<br />
Restore the previously created backup file {{ic|/home/gitlab/gitlab/tmp/backups/20130125_11h35_1359131740_gitlab_backup.tar}}:<br />
# sudo -u gitlab -H rake RAILS_ENV=production gitlab:backup:restore BACKUP=/home/gitlab/gitlab/tmp/backups/20130125_11h35_1359131740<br />
<br />
{{Note| Backup folder is set in {{ic|config/gitlab.yml}}. GitLab backup and restore is documented [https://github.com/gitlabhq/gitlabhq/blob/master/doc/raketasks/backup_restore.md here].}}<br />
<br />
===Migrate from sqlite to mysql===<br />
<br />
Get latest code as described in [[#Update Gitlab]]{{Broken section link}}.<br />
Save data.<br />
# cd /home/gitlab/gitlab<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:data:dump RAILS_ENV=production"<br />
<br />
Follow [[#Mysql]]{{Broken section link}} instructions and then setup the database.<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:setup RAILS_ENV=production"<br />
<br />
Finally restore old data.<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:data:load RAILS_ENV=production"<br />
<br />
===Running GitLab with rvm===<br />
<br />
To run gitlab with rvm first you have to set up an rvm:<br />
<br />
curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3<br />
<br />
{{Note|Version 1.9.3 is currently recommended to avoid some compatibility issues.}}<br />
<br />
For the complete installation you will want to be the final user (e.g. {{ic|git}}) so make sure to switch to this user and activate your rvm:<br />
<br />
su - git<br />
source "$HOME/.rvm/scripts/rvm"<br />
<br />
Then continue with the installation instructions from above. However, the systemd scripts will not work this way, because the environment for the rvm is not activated. The recommendation here is to create to separate shell scripts for {{ic|unicorn}} and {{ic|sidekiq}} to activate the environment and then start the service:<br />
<br />
{{hc|gitlab.sh|<nowiki><br />
#!/bin/sh<br />
source `/home/git/.rvm/bin/rvm 1.9.3 do rvm env --path`<br />
bundle-2.3 exec "unicorn_rails -c /usr/share/webapps/gitlab/config/unicorn.rb -E production"</nowiki><br />
}}<br />
<br />
{{hc|sidekiq.sh|<nowiki><br />
#!/bin/sh<br />
source `/home/git/.rvm/bin/rvm 1.9.3 do rvm env --path`<br />
case $1 in<br />
start)<br />
bundle-2.3 exec rake sidekiq:start RAILS_ENV=production<br />
;;<br />
stop)<br />
bundle-2.3 exec rake sidekiq:stop RAILS_ENV=production<br />
;;<br />
*)<br />
echo "Usage $0 {start|stop}"<br />
esac<br />
</nowiki>}}<br />
<br />
Then modify the above systemd files so they use these scripts. Modify the given lines:<br />
<br />
{{hc|gitlab.service|<nowiki><br />
ExecStart=/home/git/bin/gitlab.sh<br />
</nowiki>}}<br />
{{hc|sidekiq.service|<nowiki><br />
ExecStart=/home/git/bin/sidekiq.sh start<br />
ExecStop=/home/git/bin/sidekiq.sh stop<br />
</nowiki>}}<br />
<br />
===Sending mails from Gitlab via SMTP===<br />
<br />
You might want to use a gmail (or other mail service) to send mails from your gitlab server. This avoids the need to install a mail daemon on the gitlab server.<br />
<br />
Adjust {{ic|smtp_settings.rb}} according to your mail server settings:<br />
<br />
{{hc|/usr/share/webapps/gitlab/config/initializers/smtp_settings.rb|<nowiki><br />
if Rails.env.production?<br />
Gitlab::Application.config.action_mailer.delivery_method = :smtp<br />
<br />
Gitlab::Application.config.action_mailer.smtp_settings = {<br />
address: 'smtp.gmail.com',<br />
port: 587,<br />
domain: 'gmail.com',<br />
user_name: 'username@gmail.com',<br />
password: 'application password',<br />
authentication: 'plain',<br />
enable_starttls_auto: true<br />
}<br />
end</nowiki>}}<br />
<br />
Gmail will reject mails received this way (and send you a mail that it did). You will need to disable secure authentication (follow the link in the rejection mail) to work around this. The more secure approach is to enable two-factor authentication for username@gmail.com and to set up an application password for this configuration file.<br />
<br />
==Troubleshooting==<br />
<br />
Sometimes things may not work as expected. Be sure to visit the [https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide Trouble Shooting Guide].<br />
<br />
=== HTTPS is not green (gravatar not using https) ===<br />
Redis caches gravatar images, so if you have visited your GitLab with http, then enabled https, gravatar will load up the non-secure images. You can clear the cache by doing<br />
<br />
cd /usr/share/webapps/gitlab<br />
RAILS_ENV=production bundle-2.3 exec rake cache:clear<br />
<br />
as the gitlab user.<br />
<br />
=== 401 Unauthorized on all API access ===<br />
Make 100% sure, that the files {{ic|/etc/webapps/gitlab/secret}} and {{ic|/etc/webapps/gitlab-shell/secret}} files contain something!<br />
<br />
=== Error at push bad line length character: API ===<br />
If you get the following error while trying to push<br />
fatal: protocol error: bad line length character: API<br />
<br />
Check that your {{ic|/etc/webapps/gitlab-shell/secret}} matches {{ic|/usr/share/webapps/gitlab/.gitlab_shell_secret}}<br />
<br />
If it is not the same, recreate the file with the following command<br />
ln -s /etc/webapps/gitlab-shell/secret /usr/share/webapps/gitlab/.gitlab_shell_secret<br />
<br />
=== Errors after updating ===<br />
After updating the package from the AUR, the database migrations and asset updates will sometimes fail. These steps may resolve the issue, if a simple reboot does not.<br />
<br />
First, move to the gitlab installation directory.<br />
# cd /usr/share/webapps/gitlab<br />
<br />
If every gitlab page gives a 500 error, then the database migrations and the assets are probably stale. If not, skip this step.<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:migrate RAILS_ENV=production"<br />
<br />
If gitlab is constantly waiting for the deployment to finish, then the assets have probably not been recompiled.<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake gitlab:assets:clean gitlab:assets:compile cache:clear RAILS_ENV=production"<br />
<br />
Finally, restart the gitlab services and test your site.<br />
# systemctl restart gitlab-unicorn gitlab-sidekiq gitlab-workhorse<br />
<br />
=== /etc/webapps/gitlab/secret is empty ===<br />
This file is usually generated while installing the {{pkg|gitlab-shell}} and the {{pkg|gitlab}} packages, but in some cases it may need to be generated manually.<br />
# hexdump -v -n 64 -e '1/1 "%02x"' /dev/urandom > /etc/webapps/gitlab-shell/secret<br />
# chown root:gitlab /etc/webapps/gitlab-shell/secret<br />
# chmod 640 /etc/webapps/gitlab-shell/secret<br />
<br />
# hexdump -v -n 64 -e '1/1 "%02x"' /dev/urandom > /etc/webapps/gitlab/secret<br />
# chown root:gitlab /etc/webapps/gitlab/secret<br />
# chmod 640 /etc/webapps/gitlab/secret<br />
<br />
==See also==<br />
*[https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md Official Documentation]<br />
*[https://gitlab.com/gitlab-org/gitlab-recipes Gitlab recipes with further documentation on running it with several webservers]<br />
*[https://github.com/gitlabhq/gitlabhq GitLab source code]</div>Krukaihttps://wiki.archlinux.org/index.php?title=Talk:GitLab&diff=488877Talk:GitLab2017-09-06T15:18:05Z<p>Krukai: /* Regarding 'Running GitLab with rvm' */ indentation</p>
<hr />
<div>== Missing Section? ==<br />
It might just be me, but it seems like a section is missing. In start and test it says visit your domain, however unless I am missing something pretty major that shouldn't work since neither apache nor nginx are ever setup / pointed to the webapp.--[[User:Theflyingfool|Theflyingfool]] ([[User talk:Theflyingfool|talk]]) 08:15, 8 April 2014 (UTC)<br />
<br />
I don't have neither of them on my server, Gitlab uses own one, Unicorn, to deal with webapp.<br />
[[User:Kosciak9|Kosciak9]] ([[User talk:Kosciak9|talk]]) 12:17, 6 December 2015 (UTC)<br />
<br />
== Resolving dependencies and testing gitlab on remote server ==<br />
This is a reply to the question above, as well some things that was missed during the installation I made.<br />
<br />
I'm not sure if it should be added, so I'm putting it here for discussion:<br />
<br />
You should install the following packages, ''before'' installing the GitLab from AUR:<br />
* https://aur.archlinux.org/packages/ruby-bundler/<br />
* https://aur.archlinux.org/packages/gitlab-shell/<br />
<br />
Also, after finally starting the gitlab with unicorn, if you have installed gitlab on a remote server and not locally, you won't be able to access it using domain:8080. It is even mentioned in /etc/webapps/gitlab/unicorn.rb. In order to be able to access it, I have changed 127.0.0.1 to the servers IP, and made sure that shell.yml reflect the change as well (including the port).<br />
<br />
After restarting the daemons, I was able to access giltab using domain:8080.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== nginx ==<br />
After completing the steps above I continued to nginx installation, however, being not familiar with nginx it took me some time, so I'll put it here for discussion as well. This is the full guide, I know that some things are already mentioned in the page, just not very organized.<br />
<br />
After installing nginx, it is mentioned that you should make the following command:<br />
<br />
# ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab<br />
<br />
However, it will not work, since there is no site-available or sites-enabled directories, with include section in nginx.conf. It is true however in debian installations, but since we're in arch everything comes with no changes from the distro side.<br />
<br />
Since there was no site-available file to copy the vhosts from, I read the official gitlab guide, and found that the file is located in /usr/share/webapps/gitlab/lib/support/nginx/ after installing the gitlab package.<br />
<br />
I just put everything inside the file to nginx.conf inside the ''http'' section, just before the last {{ic|<nowiki>}</nowiki>}}, and changed the following:<br />
* {{ic|server_name}} to reflect my server's domain.<br />
* Set {{ic|proxy_pass}} config to reflect unicorn listening address. I just put {{ic|localhost:8080}} in nginx.conf and set back unicorn.rb to point to 127.0.0.1 as it was before (including the port 8080).<br />
* Inside {{ic|upstream gitlab}} set {{ic|server}} to point to {{ic|unix:/usr/share/webapps/gitlab/tmp/sockets/gitlab.socket;}} - I'm NOT sure about this. I also had a permissions problem, so I changed group permission to http for the sockets folder.<br />
* Point the config {{ic|root}} to {{ic|/usr/share/webapps/gitlab/public}};<br />
* Comment out the ''gzip'' section - it was not working for me, and made the site with no assets, so I didn't bother with it.<br />
<br />
Edit shell.yml as follows:<br />
<br />
{{ic|gitlab_url: "http://domain/"}} - domain is the same as server_name in nginx.conf.<br />
<br />
Also make sure that in gitlab.yml the host is set to your domain and the port is the same as in nginx.conf.<br />
<br />
Restart the daemons:<br />
$ systemctl restart gitlab-sidekiq gitlab-unicorn nginx<br />
<br />
Should be working now.<br />
<br />
As I said, this is my rough way of installing it, so before I put it on the page, would like to know if that's the right steps.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== Using Sudo instead of su - ==<br />
<br />
I don't have any root password on my pi, only my user password (for sudo). As the rest of the documentation uses sudo, it would be better to use sudo <br />
here too :<br />
https://wiki.archlinux.org/index.php?title=Gitlab&section=13<br />
<br />
For some reason all sudo - commands fail for me, not sure why. [[User:ElectricPrism|ElectricPrism]] ([[User talk:ElectricPrism|talk]]) 08:10, 21 December 2015 (UTC)<br />
:I'm also having issues without being root, unfortunately there are more issues, and I couldn't install (the latest version) at all.<br />
:Going to add Stub template, because more commands listed doesn't seem to work (correctly).<br />
:[[User:Beta990|Beta990]] ([[User talk:Beta990|talk]]) 11:42, 21 December 2015 (UTC)<br />
<br />
{{Note|Regarding the `su - gitlab` users have gotten a update because they kept failing for me too.}}<br />
<br />
== Very confusing ==<br />
<br />
I went through the install, I didn't make it work yet but I have a few questions on confusing instructions:<br />
<br />
-I want to use my already set-up nginx webserver. Should I still use reddis, and the gem/bundle install commands ?<br />
:Yes, you should proxy-pass nginx to unicorn. Redis is used for internal communication, gem/bundle for setup. You can find good explanations at the GitLab website. [[User:DenBrahe|DenBrahe]] ([[User talk:DenBrahe|talk]]) 21:43, 19 April 2016 (UTC)<br />
<br />
-What are the pros/cons to use the AUR package v. using the official package ?<br />
:AUR package is finetuned for Arch to work with systemd and linux conventions and things like that (don't know exactly). Basically if you're not an expert, you're better off with the AUR package. Wiki page should get an update though. [[User:DenBrahe|DenBrahe]] ([[User talk:DenBrahe|talk]]) 21:43, 19 April 2016 (UTC)<br />
<br />
-How can we uninstall the components installed by the gem/bundle install commands ?<br />
<br />
-the su - gitlab command is not working but sudo -u gitlab works (as mentionned in this thread), is that ok ?<br />
<br />
-I don't have any shell.yml file, which is mentionned only once for the HTTPS configuration, is it normal ?<br />
<br />
-what is /dev/null in the nginx config ?<br />
<br />
-how do I setup resque.timer ? I can't load it? ('unit resque.timer not found).<br />
<br />
<br />
[[User:Mentatf|Mentatf]] ([[User talk:Mentatf|talk]]) 22:41, 7 April 2016 (UTC)<br />
<br />
== Check that the secret file exists ==<br />
<br />
The Initialize Gitlab database section tells us to check if there's a secret file at /etc/webapps/gitlab/secret, while the file is found at /etc/webapps/gitlab/secrets.yml now. [[User:Sava|Sava]] ([[User talk:Sava|talk]]) 08:21, 25 September 2016 (UTC)<br />
<br />
== Regarding 'Running GitLab with rvm' ==<br />
<br />
<br />
According to [[Gitlab#Running_GitLab_with_rvm]], Ruby version 1.9.3 is recommended. However, GitLab seems to recommend 2.3 since at least v9.2.1: [https://gitlab.com/gitlab-org/gitlab-ce/blob/v9.2.1/README.md].<br />
Also, the section is not very clear whether rvm should be downloaded as the new user or not. It seems that this should be the case, but the section only mentions it after the first step.<br />
Finally, it refers to the user {{ic|git}}, while Arch installs Gitlab for the user {{ic|gitlab}} by default.<br />
Does the section need to be updated, or am I missing something here? Right now, I feel like installing GitLab without rvm. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 09:50, 6 September 2017 (UTC)<br />
<br />
: This section still needs to be updated. I haven't performed a test of that topic yet. Feel free to update that section as I don't plan to use Gitlab with rvm any time soon (at least professionally). Regards. -- [[User:wget|wget]] ([[User talk:wget|talk]]) 14:54, 6 September 2017 (UTC)<br />
<br />
:: Thanks for the heads-up, but I don't see any reason right now to use rvm, either, as the package depends on exactly the Ruby version needed. I assume that once GitLab moved to Ruby 2.4, the package maintainer will as well. Perhaps the section could use a note indication something along those lines. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 15:17, 6 September 2017 (UTC)</div>Krukaihttps://wiki.archlinux.org/index.php?title=Talk:GitLab&diff=488876Talk:GitLab2017-09-06T15:17:23Z<p>Krukai: /* Regarding 'Running GitLab with rvm' */</p>
<hr />
<div>== Missing Section? ==<br />
It might just be me, but it seems like a section is missing. In start and test it says visit your domain, however unless I am missing something pretty major that shouldn't work since neither apache nor nginx are ever setup / pointed to the webapp.--[[User:Theflyingfool|Theflyingfool]] ([[User talk:Theflyingfool|talk]]) 08:15, 8 April 2014 (UTC)<br />
<br />
I don't have neither of them on my server, Gitlab uses own one, Unicorn, to deal with webapp.<br />
[[User:Kosciak9|Kosciak9]] ([[User talk:Kosciak9|talk]]) 12:17, 6 December 2015 (UTC)<br />
<br />
== Resolving dependencies and testing gitlab on remote server ==<br />
This is a reply to the question above, as well some things that was missed during the installation I made.<br />
<br />
I'm not sure if it should be added, so I'm putting it here for discussion:<br />
<br />
You should install the following packages, ''before'' installing the GitLab from AUR:<br />
* https://aur.archlinux.org/packages/ruby-bundler/<br />
* https://aur.archlinux.org/packages/gitlab-shell/<br />
<br />
Also, after finally starting the gitlab with unicorn, if you have installed gitlab on a remote server and not locally, you won't be able to access it using domain:8080. It is even mentioned in /etc/webapps/gitlab/unicorn.rb. In order to be able to access it, I have changed 127.0.0.1 to the servers IP, and made sure that shell.yml reflect the change as well (including the port).<br />
<br />
After restarting the daemons, I was able to access giltab using domain:8080.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== nginx ==<br />
After completing the steps above I continued to nginx installation, however, being not familiar with nginx it took me some time, so I'll put it here for discussion as well. This is the full guide, I know that some things are already mentioned in the page, just not very organized.<br />
<br />
After installing nginx, it is mentioned that you should make the following command:<br />
<br />
# ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab<br />
<br />
However, it will not work, since there is no site-available or sites-enabled directories, with include section in nginx.conf. It is true however in debian installations, but since we're in arch everything comes with no changes from the distro side.<br />
<br />
Since there was no site-available file to copy the vhosts from, I read the official gitlab guide, and found that the file is located in /usr/share/webapps/gitlab/lib/support/nginx/ after installing the gitlab package.<br />
<br />
I just put everything inside the file to nginx.conf inside the ''http'' section, just before the last {{ic|<nowiki>}</nowiki>}}, and changed the following:<br />
* {{ic|server_name}} to reflect my server's domain.<br />
* Set {{ic|proxy_pass}} config to reflect unicorn listening address. I just put {{ic|localhost:8080}} in nginx.conf and set back unicorn.rb to point to 127.0.0.1 as it was before (including the port 8080).<br />
* Inside {{ic|upstream gitlab}} set {{ic|server}} to point to {{ic|unix:/usr/share/webapps/gitlab/tmp/sockets/gitlab.socket;}} - I'm NOT sure about this. I also had a permissions problem, so I changed group permission to http for the sockets folder.<br />
* Point the config {{ic|root}} to {{ic|/usr/share/webapps/gitlab/public}};<br />
* Comment out the ''gzip'' section - it was not working for me, and made the site with no assets, so I didn't bother with it.<br />
<br />
Edit shell.yml as follows:<br />
<br />
{{ic|gitlab_url: "http://domain/"}} - domain is the same as server_name in nginx.conf.<br />
<br />
Also make sure that in gitlab.yml the host is set to your domain and the port is the same as in nginx.conf.<br />
<br />
Restart the daemons:<br />
$ systemctl restart gitlab-sidekiq gitlab-unicorn nginx<br />
<br />
Should be working now.<br />
<br />
As I said, this is my rough way of installing it, so before I put it on the page, would like to know if that's the right steps.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== Using Sudo instead of su - ==<br />
<br />
I don't have any root password on my pi, only my user password (for sudo). As the rest of the documentation uses sudo, it would be better to use sudo <br />
here too :<br />
https://wiki.archlinux.org/index.php?title=Gitlab&section=13<br />
<br />
For some reason all sudo - commands fail for me, not sure why. [[User:ElectricPrism|ElectricPrism]] ([[User talk:ElectricPrism|talk]]) 08:10, 21 December 2015 (UTC)<br />
:I'm also having issues without being root, unfortunately there are more issues, and I couldn't install (the latest version) at all.<br />
:Going to add Stub template, because more commands listed doesn't seem to work (correctly).<br />
:[[User:Beta990|Beta990]] ([[User talk:Beta990|talk]]) 11:42, 21 December 2015 (UTC)<br />
<br />
{{Note|Regarding the `su - gitlab` users have gotten a update because they kept failing for me too.}}<br />
<br />
== Very confusing ==<br />
<br />
I went through the install, I didn't make it work yet but I have a few questions on confusing instructions:<br />
<br />
-I want to use my already set-up nginx webserver. Should I still use reddis, and the gem/bundle install commands ?<br />
:Yes, you should proxy-pass nginx to unicorn. Redis is used for internal communication, gem/bundle for setup. You can find good explanations at the GitLab website. [[User:DenBrahe|DenBrahe]] ([[User talk:DenBrahe|talk]]) 21:43, 19 April 2016 (UTC)<br />
<br />
-What are the pros/cons to use the AUR package v. using the official package ?<br />
:AUR package is finetuned for Arch to work with systemd and linux conventions and things like that (don't know exactly). Basically if you're not an expert, you're better off with the AUR package. Wiki page should get an update though. [[User:DenBrahe|DenBrahe]] ([[User talk:DenBrahe|talk]]) 21:43, 19 April 2016 (UTC)<br />
<br />
-How can we uninstall the components installed by the gem/bundle install commands ?<br />
<br />
-the su - gitlab command is not working but sudo -u gitlab works (as mentionned in this thread), is that ok ?<br />
<br />
-I don't have any shell.yml file, which is mentionned only once for the HTTPS configuration, is it normal ?<br />
<br />
-what is /dev/null in the nginx config ?<br />
<br />
-how do I setup resque.timer ? I can't load it? ('unit resque.timer not found).<br />
<br />
<br />
[[User:Mentatf|Mentatf]] ([[User talk:Mentatf|talk]]) 22:41, 7 April 2016 (UTC)<br />
<br />
== Check that the secret file exists ==<br />
<br />
The Initialize Gitlab database section tells us to check if there's a secret file at /etc/webapps/gitlab/secret, while the file is found at /etc/webapps/gitlab/secrets.yml now. [[User:Sava|Sava]] ([[User talk:Sava|talk]]) 08:21, 25 September 2016 (UTC)<br />
<br />
== Regarding 'Running GitLab with rvm' ==<br />
<br />
<br />
According to [[Gitlab#Running_GitLab_with_rvm]], Ruby version 1.9.3 is recommended. However, GitLab seems to recommend 2.3 since at least v9.2.1: [https://gitlab.com/gitlab-org/gitlab-ce/blob/v9.2.1/README.md].<br />
Also, the section is not very clear whether rvm should be downloaded as the new user or not. It seems that this should be the case, but the section only mentions it after the first step.<br />
Finally, it refers to the user {{ic|git}}, while Arch installs Gitlab for the user {{ic|gitlab}} by default.<br />
Does the section need to be updated, or am I missing something here? Right now, I feel like installing GitLab without rvm. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 09:50, 6 September 2017 (UTC)<br />
<br />
: This section still needs to be updated. I haven't performed a test of that topic yet. Feel free to update that section as I don't plan to use Gitlab with rvm any time soon (at least professionally). Regards. -- [[User:wget|wget]] ([[User talk:wget|talk]]) 14:54, 6 September 2017 (UTC)<br />
<br />
: : Thanks for the heads-up, but I don't see any reason right now to use rvm, either, as the package depends on exactly the Ruby version needed. I assume that once GitLab moved to Ruby 2.4, the package maintainer will as well.<br />
Perhaps the section could use a note indication something along those lines. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 15:17, 6 September 2017 (UTC)</div>Krukaihttps://wiki.archlinux.org/index.php?title=Talk:GitLab&diff=488853Talk:GitLab2017-09-06T09:50:12Z<p>Krukai: /* Regarding 'Running GitLab with rvm' */ new section</p>
<hr />
<div>== Missing Section? ==<br />
It might just be me, but it seems like a section is missing. In start and test it says visit your domain, however unless I am missing something pretty major that shouldn't work since neither apache nor nginx are ever setup / pointed to the webapp.--[[User:Theflyingfool|Theflyingfool]] ([[User talk:Theflyingfool|talk]]) 08:15, 8 April 2014 (UTC)<br />
<br />
I don't have neither of them on my server, Gitlab uses own one, Unicorn, to deal with webapp.<br />
[[User:Kosciak9|Kosciak9]] ([[User talk:Kosciak9|talk]]) 12:17, 6 December 2015 (UTC)<br />
<br />
== Resolving dependencies and testing gitlab on remote server ==<br />
This is a reply to the question above, as well some things that was missed during the installation I made.<br />
<br />
I'm not sure if it should be added, so I'm putting it here for discussion:<br />
<br />
You should install the following packages, ''before'' installing the GitLab from AUR:<br />
* https://aur.archlinux.org/packages/ruby-bundler/<br />
* https://aur.archlinux.org/packages/gitlab-shell/<br />
<br />
Also, after finally starting the gitlab with unicorn, if you have installed gitlab on a remote server and not locally, you won't be able to access it using domain:8080. It is even mentioned in /etc/webapps/gitlab/unicorn.rb. In order to be able to access it, I have changed 127.0.0.1 to the servers IP, and made sure that shell.yml reflect the change as well (including the port).<br />
<br />
After restarting the daemons, I was able to access giltab using domain:8080.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== nginx ==<br />
After completing the steps above I continued to nginx installation, however, being not familiar with nginx it took me some time, so I'll put it here for discussion as well. This is the full guide, I know that some things are already mentioned in the page, just not very organized.<br />
<br />
After installing nginx, it is mentioned that you should make the following command:<br />
<br />
# ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab<br />
<br />
However, it will not work, since there is no site-available or sites-enabled directories, with include section in nginx.conf. It is true however in debian installations, but since we're in arch everything comes with no changes from the distro side.<br />
<br />
Since there was no site-available file to copy the vhosts from, I read the official gitlab guide, and found that the file is located in /usr/share/webapps/gitlab/lib/support/nginx/ after installing the gitlab package.<br />
<br />
I just put everything inside the file to nginx.conf inside the ''http'' section, just before the last {{ic|<nowiki>}</nowiki>}}, and changed the following:<br />
* {{ic|server_name}} to reflect my server's domain.<br />
* Set {{ic|proxy_pass}} config to reflect unicorn listening address. I just put {{ic|localhost:8080}} in nginx.conf and set back unicorn.rb to point to 127.0.0.1 as it was before (including the port 8080).<br />
* Inside {{ic|upstream gitlab}} set {{ic|server}} to point to {{ic|unix:/usr/share/webapps/gitlab/tmp/sockets/gitlab.socket;}} - I'm NOT sure about this. I also had a permissions problem, so I changed group permission to http for the sockets folder.<br />
* Point the config {{ic|root}} to {{ic|/usr/share/webapps/gitlab/public}};<br />
* Comment out the ''gzip'' section - it was not working for me, and made the site with no assets, so I didn't bother with it.<br />
<br />
Edit shell.yml as follows:<br />
<br />
{{ic|gitlab_url: "http://domain/"}} - domain is the same as server_name in nginx.conf.<br />
<br />
Also make sure that in gitlab.yml the host is set to your domain and the port is the same as in nginx.conf.<br />
<br />
Restart the daemons:<br />
$ systemctl restart gitlab-sidekiq gitlab-unicorn nginx<br />
<br />
Should be working now.<br />
<br />
As I said, this is my rough way of installing it, so before I put it on the page, would like to know if that's the right steps.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== Using Sudo instead of su - ==<br />
<br />
I don't have any root password on my pi, only my user password (for sudo). As the rest of the documentation uses sudo, it would be better to use sudo <br />
here too :<br />
https://wiki.archlinux.org/index.php?title=Gitlab&section=13<br />
<br />
For some reason all sudo - commands fail for me, not sure why. [[User:ElectricPrism|ElectricPrism]] ([[User talk:ElectricPrism|talk]]) 08:10, 21 December 2015 (UTC)<br />
:I'm also having issues without being root, unfortunately there are more issues, and I couldn't install (the latest version) at all.<br />
:Going to add Stub template, because more commands listed doesn't seem to work (correctly).<br />
:[[User:Beta990|Beta990]] ([[User talk:Beta990|talk]]) 11:42, 21 December 2015 (UTC)<br />
<br />
{{Note|Regarding the `su - gitlab` users have gotten a update because they kept failing for me too.}}<br />
<br />
== Very confusing ==<br />
<br />
I went through the install, I didn't make it work yet but I have a few questions on confusing instructions:<br />
<br />
-I want to use my already set-up nginx webserver. Should I still use reddis, and the gem/bundle install commands ?<br />
:Yes, you should proxy-pass nginx to unicorn. Redis is used for internal communication, gem/bundle for setup. You can find good explanations at the GitLab website. [[User:DenBrahe|DenBrahe]] ([[User talk:DenBrahe|talk]]) 21:43, 19 April 2016 (UTC)<br />
<br />
-What are the pros/cons to use the AUR package v. using the official package ?<br />
:AUR package is finetuned for Arch to work with systemd and linux conventions and things like that (don't know exactly). Basically if you're not an expert, you're better off with the AUR package. Wiki page should get an update though. [[User:DenBrahe|DenBrahe]] ([[User talk:DenBrahe|talk]]) 21:43, 19 April 2016 (UTC)<br />
<br />
-How can we uninstall the components installed by the gem/bundle install commands ?<br />
<br />
-the su - gitlab command is not working but sudo -u gitlab works (as mentionned in this thread), is that ok ?<br />
<br />
-I don't have any shell.yml file, which is mentionned only once for the HTTPS configuration, is it normal ?<br />
<br />
-what is /dev/null in the nginx config ?<br />
<br />
-how do I setup resque.timer ? I can't load it? ('unit resque.timer not found).<br />
<br />
<br />
[[User:Mentatf|Mentatf]] ([[User talk:Mentatf|talk]]) 22:41, 7 April 2016 (UTC)<br />
<br />
== Check that the secret file exists ==<br />
<br />
The Initialize Gitlab database section tells us to check if there's a secret file at /etc/webapps/gitlab/secret, while the file is found at /etc/webapps/gitlab/secrets.yml now. [[User:Sava|Sava]] ([[User talk:Sava|talk]]) 08:21, 25 September 2016 (UTC)<br />
<br />
== Regarding 'Running GitLab with rvm' ==<br />
<br />
<br />
According to [[Gitlab#Running_GitLab_with_rvm]], Ruby version 1.9.3 is recommended. However, GitLab seems to recommend 2.3 since at least v9.2.1: [https://gitlab.com/gitlab-org/gitlab-ce/blob/v9.2.1/README.md].<br />
Also, the section is not very clear whether rvm should be downloaded as the new user or not. It seems that this should be the case, but the section only mentions it after the first step.<br />
Finally, it refers to the user {{ic|git}}, while Arch installs Gitlab for the user {{ic|gitlab}} by default.<br />
Does the section need to be updated, or am I missing something here? Right now, I feel like installing GitLab without rvm. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 09:50, 6 September 2017 (UTC)</div>Krukaihttps://wiki.archlinux.org/index.php?title=Talk:Mouse_acceleration&diff=467857Talk:Mouse acceleration2017-02-07T00:31:39Z<p>Krukai: /* Reworking this article */</p>
<hr />
<div>== Reworking the article ==<br />
This article seems to be a mess, but I don't exactly know where to start, especially since this may quickly turn into a general mouse configuration article.<br />
However, here are some notes:<br />
<br />
* Arch currently seems to put its X config files in {{ic|/usr/share/X11/xorg.conf.d/}}, rather than {{ic|/etc/X11/xorg.conf.d/}}.<br />
* Arch seems to use libinput by default now (can't say this for sure, might just be my [[LXQt]] setup).<br />
<br />
Here is some stuff that I was considering to add but held back for the reason stated above; feedback is appreciated:<br />
<br />
=== Distinguishing between multiple pointer devices ===<br />
<br />
If you have multiple pointer devices connected, but you want to configure them separately, you may distinguish between them by their vendor and product name.<br />
<br />
First, list the xinput devices:<br />
<br />
$ xinput --list<br />
<br />
Note down the name (e.g. 'Logitech USB Optical Mouse').<br />
This name has to be split into a vendor and a product string.<br />
It seems that the first space always acts as a separator, regardless of what appears to make more sense.<br />
<br />
Now, apart from {{ic|MatchIsPointer}}, add {{ic|MatchVendor}} and {{ic|MatchProduct}} to the section of your pointer device:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/50-mouse-acceleration.conf|2=<br />
Section "InputClass"<br />
Identifier "Logitech Mouse 1000dpi"<br />
MatchVendor "Logitech"<br />
MatchProduct "USB Optical Mouse"<br />
Driver "libinput"<br />
MatchIsPointer "yes"<br />
Option "AccelProfile" "flat"<br />
Option "AccelSpeed" "-0.6"<br />
EndSection<br />
}}<br />
<br />
Restart X and make sure that the settings are still applied correctly.<br />
<br />
=== Matching speed of different mice (libinput)===<br />
<br />
When you are switching mice, you may want to ease the transition by having them move the pointer at the same speed, regardless of their DPI settings.<br />
<br />
In this example, a Logitech mouse with a sensitivity of 1000 DPI is used along with ZOWIE gaming mouse with a sensitivity of 400 DPI.<br />
This means that in order to match the ZOWIE mouse, the Logitech mouse has to move 40% slower (keep in mind that an acceleration greater than 0 may lead to pixels being skipped):<br />
<br />
{{hc|/etc/X11/xorg.conf.d/50-mouse-acceleration.conf|2=<br />
Section "InputClass"<br />
Identifier "Logitech Mouse 1000dpi"<br />
MatchVendor "Logitech"<br />
MatchProduct "USB Optical Mouse"<br />
Driver "libinput"<br />
MatchIsPointer "yes"<br />
Option "AccelProfile" "flat"<br />
Option "AccelSpeed" "-0.6"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Zowie Mouse 400dpi"<br />
MatchVendor "Kingsis"<br />
MatchProduct "Peripherals ZOWIE Gaming mouse"<br />
Driver "libinput"<br />
MatchIsPointer "yes"<br />
Option "AccelProfile" "flat"<br />
Option "AccelSpeed" "0.0"<br />
EndSection<br />
}}<br />
<br />
--[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 00:30, 7 February 2017 (UTC)</div>Krukaihttps://wiki.archlinux.org/index.php?title=Mouse_acceleration&diff=467856Mouse acceleration2017-02-07T00:22:09Z<p>Krukai: /* Disabling mouse acceleration */ Moved to the right section, my bad</p>
<hr />
<div>[[Category:Mice]]<br />
[[Category:X server]]<br />
[[ja:マウスのアクセラレーション]]<br />
[[zh-hans:Mouse acceleration]]<br />
{{Related articles start}}<br />
{{Related|Mouse buttons}}<br />
{{Related|Mouse polling rate}}<br />
{{Related articles end}}<br />
<br />
{{Accuracy|Configuration depends on the input driver, libinput can be used in [[Xorg]]. Each subsection should explicitly state which driver is assumed.}}<br />
<br />
Setting the mouse acceleration depends on the windowing protocol you are using: either [[Xorg]] or [[Wayland]]. <br />
<br />
* On [[Xorg]], there are several ways of setting mouse acceleration<br />
:* by editing Xorg configuration files<br />
:* {{Pkg|xorg-server-utils}} which provides ''xset'' and ''xinput''<br />
:* and configuration interfaces common in [[desktop environments]].<br />
<br />
* If you are using [[Wayland]], the events are controlled via [[libinput]]. It is the compositor's job to expose the settings brought by libinput. There is currently not standard way to change settings across compositors.[https://www.reddit.com/r/gnome/comments/3upay2/wayland_where_are_the_mouse_acceleration_options/]<br />
<br />
== Setting mouse acceleration ==<br />
<br />
=== In Xorg configuration ===<br />
<br />
{{Style|Don't use comments in code blocks, provide more description in the wiki text instead.}}<br />
<br />
See {{ic|man xorg.conf}} for details.<br />
<br />
Examples:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/50-mouse-acceleration.conf|2=<br />
Section "InputClass"<br />
Identifier "My Mouse"<br />
MatchIsPointer "yes"<br />
# set the following to 1 1 0 respectively to disable acceleration.<br />
Option "AccelerationNumerator" "2"<br />
Option "AccelerationDenominator" "1"<br />
Option "AccelerationThreshold" "4"<br />
EndSection<br />
}}<br />
<br />
{{hc|/etc/X11/xorg.conf.d/50-mouse-deceleration.conf|2=<br />
Section "InputClass"<br />
Identifier "My Mouse"<br />
MatchIsPointer "yes"<br />
# some curved deceleration<br />
# Option "AdaptiveDeceleration" "2"<br />
# linear deceleration (mouse speed reduction)<br />
Option "ConstantDeceleration" "2"<br />
EndSection<br />
}}<br />
<br />
You can also assign settings to specific hardware by using "MatchProduct", "MatchVendor" and other matches inside class sections. Run {{ic|lsusb}} to find out the product name and vendor to match:<br />
<br />
$ lsusb -v | grep -e idProduct -e idVendor<br />
<br />
If you are unable to identify your device, try running {{ic|xinput list}}. Some devices the use Logitech Unifying Recceiver share the same USB connection therefore, the mouse don't appear using {{ic|lsusb}}<br />
<br />
=== Using xset ===<br />
<br />
{{Note|xset does not use libinput.}}<br />
<br />
To get the current values, use:<br />
<br />
$ xset q | grep -A 1 Pointer<br />
<br />
To set new values, type:<br />
<br />
$ xset m ''acceleration'' ''threshold''<br />
<br />
where ''acceleration'' defines how many times faster the cursor will move than the default speed. ''threshold'' is the velocity required for acceleration to become effective, usually measured in device units per 10ms. ''acceleration'' can be a fraction, so if you want to slow down the mouse you can use 1/2, 1/3, 1/4, ... if you want to make it faster you can use 2/1, 3/1, 4/1, ... <br />
<br />
''Threshold'' defines the point at which acceleration should occur in pixels per 10 ms. If threshold is zero, e.g. if you use: <br />
<br />
$ xset m 3/2 0<br />
<br />
as suggested in the man page, then acceleration is treated as "the exponent of a more natural and continuous formula."<br />
<br />
To get the default settings back:<br />
<br />
$ xset m default<br />
<br />
For more info see {{ic|man xset}}.<br />
<br />
Commands may be stored in [[Xinitrc]] or [[Xprofile]]. Alternatively, create a [[Desktop entry]] in {{ic|.config/autostart}}:<br />
<br />
[Desktop Entry]<br />
Name=Disable mouse acceleration<br />
Exec=xset m 0 0<br />
Type=Application<br />
<br />
This technique may be more desirable than employing the xorg configuration technique described above; latter may interfere with setting mouse speed in a display manager.<br />
<br />
=== Using xinput ===<br />
<br />
First, get a list of devices plugged in (ignore any virtual pointers):<br />
<br />
$ xinput list<br />
<br />
Take note of the ID. You may also use the full name in commands if the ID is prone to changing.<br />
<br />
Get a list of available properties and their current values available for modification with<br />
<br />
$ xinput list-props 9<br />
<br />
where {{ic|9}} is the ID of the device you wish to use. Or<br />
<br />
$ xinput list-props ''mouse brand''<br />
<br />
where ''mouse brand'' is the name of your mouse given by {{ic|$ xinput list}}<br />
<br />
Example, changing the property of {{ic|Constant Deceleration}} to 2:<br />
<br />
{{hc|$ xinput list-props 9|<br />
Device &#39;''mouse brand''&#39;:<br />
Device Enabled (121): 1<br />
Device Accel Profile (240): 0<br />
Device Accel Constant Deceleration (241): 1.000000<br />
Device Accel Adaptive Deceleration (243): 1.000000<br />
Device Accel Velocity Scaling (244): 10.000000<br />
}}<br />
$ xinput --set-prop &#39;''mouse brand''&#39; 'Device Accel Constant Deceleration' 2<br />
<br />
To make it permanent, edit xorg configuration (see above) or add commands to [[xprofile]]. The latter won't affect speed in a [[Display manager]].<br />
<br />
=== Configuration example ===<br />
<br />
You may need to resort to using more than one method to achieve your desired mouse settings. Here's what I did to configure a generic optical mouse:<br />
First, slow down the default movement speed 3 times so that it's more precise.<br />
<br />
$ xinput --set-prop 9 'Device Accel Constant Deceleration' 3 &<br />
<br />
Then, enable acceleration and make it 3 times faster after moving past 6 units.<br />
<br />
$ xset mouse 3 6 &<br />
<br />
If you are satisfied of the results, store the preceding commands in {{ic|~/.xinitrc}}.<br />
<br />
== Disabling mouse acceleration ==<br />
<br />
Mouse acceleration has changed dramatically in recent X server versions; using {{Ic|xset}} to disable acceleration doesn't work as it used to and is not recommended anymore. Recent changes on {{ic|PointerAcceleration}} can be read [http://xorg.freedesktop.org/wiki/Development/Documentation/PointerAcceleration#Introduction here].<br />
<br />
Disabling the mouse acceleration means that a linear function will be used to map from physical to virtual mouse movements. The mouse speed setting controls the inclination of this linear function.<br />
<br />
To completely disable any sort of acceleration/deceleration, create the following file:<br />
{{hc|/etc/X11/xorg.conf.d/50-mouse-acceleration.conf|2=<br />
Section "InputClass"<br />
Identifier "My Mouse"<br />
MatchIsPointer "yes"<br />
Option "AccelerationProfile" "-1"<br />
Option "AccelerationScheme" "none"<br />
Option "AccelSpeed" "-1"<br />
EndSection<br />
}}<br />
and restart X.<br />
<br />
=== with libinput ===<br />
<br />
Alternatively, since {{Pkg|libinput}}-1.1.0-1 and {{Pkg|xf86-input-libinput}}-0.15.0-1 you can use a flat acceleration profile. To enable it create the following file:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/50-mouse-acceleration.conf|2=<br />
Section "InputClass"<br />
Identifier "My Mouse"<br />
Driver "libinput"<br />
MatchIsPointer "yes"<br />
Option "AccelProfile" "flat"<br />
EndSection<br />
}}<br />
and restart X.<br />
<br />
To confirm that acceleration has been disabled, enter the following:<br />
<br />
$ xinput list-props {1..50} 2>/dev/null | fgrep 'libinput Accel Profile Enabled ('<br />
<br />
The profile should read {{ic|0, 1}}.<br />
<br />
== Mouse speed with libinput ==<br />
<br />
The speed setting {{ic|libinput Accel Speed}} is the same as before, taking values in the [-1, 1] range. The Speed setting is a fraction that is added (or subtracted) to 100%, e.g. -0.3 is 70% of the normal speed, and 0.5 is 150%. For example, to adjust the mouse speed down to 50%, use<br />
<br />
$ xinput --set-prop 9 'libinput Accel Speed' -0.5</div>Krukaihttps://wiki.archlinux.org/index.php?title=Mouse_acceleration&diff=467855Mouse acceleration2017-02-07T00:21:09Z<p>Krukai: /* Disabling mouse acceleration */ Added a simple check to confirm that acceleration is turned off</p>
<hr />
<div>[[Category:Mice]]<br />
[[Category:X server]]<br />
[[ja:マウスのアクセラレーション]]<br />
[[zh-hans:Mouse acceleration]]<br />
{{Related articles start}}<br />
{{Related|Mouse buttons}}<br />
{{Related|Mouse polling rate}}<br />
{{Related articles end}}<br />
<br />
{{Accuracy|Configuration depends on the input driver, libinput can be used in [[Xorg]]. Each subsection should explicitly state which driver is assumed.}}<br />
<br />
Setting the mouse acceleration depends on the windowing protocol you are using: either [[Xorg]] or [[Wayland]]. <br />
<br />
* On [[Xorg]], there are several ways of setting mouse acceleration<br />
:* by editing Xorg configuration files<br />
:* {{Pkg|xorg-server-utils}} which provides ''xset'' and ''xinput''<br />
:* and configuration interfaces common in [[desktop environments]].<br />
<br />
* If you are using [[Wayland]], the events are controlled via [[libinput]]. It is the compositor's job to expose the settings brought by libinput. There is currently not standard way to change settings across compositors.[https://www.reddit.com/r/gnome/comments/3upay2/wayland_where_are_the_mouse_acceleration_options/]<br />
<br />
== Setting mouse acceleration ==<br />
<br />
=== In Xorg configuration ===<br />
<br />
{{Style|Don't use comments in code blocks, provide more description in the wiki text instead.}}<br />
<br />
See {{ic|man xorg.conf}} for details.<br />
<br />
Examples:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/50-mouse-acceleration.conf|2=<br />
Section "InputClass"<br />
Identifier "My Mouse"<br />
MatchIsPointer "yes"<br />
# set the following to 1 1 0 respectively to disable acceleration.<br />
Option "AccelerationNumerator" "2"<br />
Option "AccelerationDenominator" "1"<br />
Option "AccelerationThreshold" "4"<br />
EndSection<br />
}}<br />
<br />
{{hc|/etc/X11/xorg.conf.d/50-mouse-deceleration.conf|2=<br />
Section "InputClass"<br />
Identifier "My Mouse"<br />
MatchIsPointer "yes"<br />
# some curved deceleration<br />
# Option "AdaptiveDeceleration" "2"<br />
# linear deceleration (mouse speed reduction)<br />
Option "ConstantDeceleration" "2"<br />
EndSection<br />
}}<br />
<br />
You can also assign settings to specific hardware by using "MatchProduct", "MatchVendor" and other matches inside class sections. Run {{ic|lsusb}} to find out the product name and vendor to match:<br />
<br />
$ lsusb -v | grep -e idProduct -e idVendor<br />
<br />
If you are unable to identify your device, try running {{ic|xinput list}}. Some devices the use Logitech Unifying Recceiver share the same USB connection therefore, the mouse don't appear using {{ic|lsusb}}<br />
<br />
=== Using xset ===<br />
<br />
{{Note|xset does not use libinput.}}<br />
<br />
To get the current values, use:<br />
<br />
$ xset q | grep -A 1 Pointer<br />
<br />
To set new values, type:<br />
<br />
$ xset m ''acceleration'' ''threshold''<br />
<br />
where ''acceleration'' defines how many times faster the cursor will move than the default speed. ''threshold'' is the velocity required for acceleration to become effective, usually measured in device units per 10ms. ''acceleration'' can be a fraction, so if you want to slow down the mouse you can use 1/2, 1/3, 1/4, ... if you want to make it faster you can use 2/1, 3/1, 4/1, ... <br />
<br />
''Threshold'' defines the point at which acceleration should occur in pixels per 10 ms. If threshold is zero, e.g. if you use: <br />
<br />
$ xset m 3/2 0<br />
<br />
as suggested in the man page, then acceleration is treated as "the exponent of a more natural and continuous formula."<br />
<br />
To get the default settings back:<br />
<br />
$ xset m default<br />
<br />
For more info see {{ic|man xset}}.<br />
<br />
Commands may be stored in [[Xinitrc]] or [[Xprofile]]. Alternatively, create a [[Desktop entry]] in {{ic|.config/autostart}}:<br />
<br />
[Desktop Entry]<br />
Name=Disable mouse acceleration<br />
Exec=xset m 0 0<br />
Type=Application<br />
<br />
This technique may be more desirable than employing the xorg configuration technique described above; latter may interfere with setting mouse speed in a display manager.<br />
<br />
=== Using xinput ===<br />
<br />
First, get a list of devices plugged in (ignore any virtual pointers):<br />
<br />
$ xinput list<br />
<br />
Take note of the ID. You may also use the full name in commands if the ID is prone to changing.<br />
<br />
Get a list of available properties and their current values available for modification with<br />
<br />
$ xinput list-props 9<br />
<br />
where {{ic|9}} is the ID of the device you wish to use. Or<br />
<br />
$ xinput list-props ''mouse brand''<br />
<br />
where ''mouse brand'' is the name of your mouse given by {{ic|$ xinput list}}<br />
<br />
Example, changing the property of {{ic|Constant Deceleration}} to 2:<br />
<br />
{{hc|$ xinput list-props 9|<br />
Device &#39;''mouse brand''&#39;:<br />
Device Enabled (121): 1<br />
Device Accel Profile (240): 0<br />
Device Accel Constant Deceleration (241): 1.000000<br />
Device Accel Adaptive Deceleration (243): 1.000000<br />
Device Accel Velocity Scaling (244): 10.000000<br />
}}<br />
$ xinput --set-prop &#39;''mouse brand''&#39; 'Device Accel Constant Deceleration' 2<br />
<br />
To make it permanent, edit xorg configuration (see above) or add commands to [[xprofile]]. The latter won't affect speed in a [[Display manager]].<br />
<br />
=== Configuration example ===<br />
<br />
You may need to resort to using more than one method to achieve your desired mouse settings. Here's what I did to configure a generic optical mouse:<br />
First, slow down the default movement speed 3 times so that it's more precise.<br />
<br />
$ xinput --set-prop 9 'Device Accel Constant Deceleration' 3 &<br />
<br />
Then, enable acceleration and make it 3 times faster after moving past 6 units.<br />
<br />
$ xset mouse 3 6 &<br />
<br />
If you are satisfied of the results, store the preceding commands in {{ic|~/.xinitrc}}.<br />
<br />
== Disabling mouse acceleration ==<br />
<br />
Mouse acceleration has changed dramatically in recent X server versions; using {{Ic|xset}} to disable acceleration doesn't work as it used to and is not recommended anymore. Recent changes on {{ic|PointerAcceleration}} can be read [http://xorg.freedesktop.org/wiki/Development/Documentation/PointerAcceleration#Introduction here].<br />
<br />
Disabling the mouse acceleration means that a linear function will be used to map from physical to virtual mouse movements. The mouse speed setting controls the inclination of this linear function.<br />
<br />
To completely disable any sort of acceleration/deceleration, create the following file:<br />
{{hc|/etc/X11/xorg.conf.d/50-mouse-acceleration.conf|2=<br />
Section "InputClass"<br />
Identifier "My Mouse"<br />
MatchIsPointer "yes"<br />
Option "AccelerationProfile" "-1"<br />
Option "AccelerationScheme" "none"<br />
Option "AccelSpeed" "-1"<br />
EndSection<br />
}}<br />
and restart X.<br />
<br />
To confirm that acceleration has been disabled, enter the following:<br />
<br />
$ xinput list-props {1..50} 2>/dev/null | fgrep 'libinput Accel Profile Enabled ('<br />
<br />
The profile should read {{ic|0, 1}}.<br />
<br />
=== with libinput ===<br />
<br />
Alternatively, since {{Pkg|libinput}}-1.1.0-1 and {{Pkg|xf86-input-libinput}}-0.15.0-1 you can use a flat acceleration profile. To enable it create the following file:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/50-mouse-acceleration.conf|2=<br />
Section "InputClass"<br />
Identifier "My Mouse"<br />
Driver "libinput"<br />
MatchIsPointer "yes"<br />
Option "AccelProfile" "flat"<br />
EndSection<br />
}}<br />
and restart X.<br />
<br />
== Mouse speed with libinput ==<br />
<br />
The speed setting {{ic|libinput Accel Speed}} is the same as before, taking values in the [-1, 1] range. The Speed setting is a fraction that is added (or subtracted) to 100%, e.g. -0.3 is 70% of the normal speed, and 0.5 is 150%. For example, to adjust the mouse speed down to 50%, use<br />
<br />
$ xinput --set-prop 9 'libinput Accel Speed' -0.5</div>Krukaihttps://wiki.archlinux.org/index.php?title=Talk:Skype&diff=467234Talk:Skype2017-01-30T20:50:36Z<p>Krukai: /* Skype legacy version incompatible with new version */ additional client malfunction</p>
<hr />
<div>== Skype phones ==<br />
<br />
What about skype phones? Is there a way to make them work with Linux? For instance, I have a Philips voip0801B/37. Are there open source drivers for these sort of things? -- [[User:Kc8tpz|Kc8tpz]] 11:58, October 1, 2007<br />
<br />
:Hey look if you can make it work as a generic kind/device type.<br />
<br />
:In regards to the other Linux distributions which would be the most likely to work with Arch? If you look at skype.com you will find packages for Debian, etc.. I've managed to get Flash Player in Arch x64 from using the ndiswrapper scripts from Ubuntu, any idea?<br />
:-- [[User:Dextrose|Dextrose]] 19:11, September 11, 2008<br />
<br />
== %wheel ALL=(skype) NOPASSWD: /usr/bin/skype ==<br />
<br />
I have found that Skype runs as a special user if '%skype' is used instead of '%wheel'. <br />
<br />
{{Unsigned|11:05, 13 October 2012|Slr}}<br />
<br />
== Tomoyo ==<br />
<br />
I tried to secure Skype following the [https://wiki.archlinux.org/index.php/Skype#TOMOYO instructions in the article]. Unfortunately it didn't work. Now i fixed it. For me to work, I needed a few modifications:<br />
<br />
I added the following content to {{ic|/etc/tomoyo/domain_policy.conf}}<br />
{{bc|<br />
file read /usr/share/locale/\*/LC_MESSAGES/\*<br />
file read /usr/lib/gconv/\*}}<br />
Otherwise skype doesn't adapt to the system language.<br />
<br />
Furthermore just appending the in the article mentioned entries to {{ic|/etc/tomoyo/exception_policy.conf}} doesn't work. Tomoyo didn't respect the lines {{bc|initialize_domain /usr/bin/skype from any<br />
initialize_domain /usr/lib32/skype/skype from any}} Therefore I moved them to the already existing entries of the form {{ic|initialize_domain *}} in the configuration file. If this is also true for others, it might be a good idea to modify the article at least mentioning the latter one. Or perhaps it's a bug in tomoyo? --[[User:Marcus-aurelius|Marcus-aurelius]] ([[User talk:Marcus-aurelius|talk]]) 09:50, 8 June 2013 (UTC)<br />
<br />
== systemd-nspawn ==<br />
<br />
I fixed systemd-nspawn script a bit but I still can't make PulseAudio and my webcam work in the container. -- [[User:Yellow block|Yellow block]] ([[User talk:Yellow block|talk]]) 20:05, 19 October 2015 (UTC)<br />
<br />
== grsec profile ==<br />
<br />
Is there any grsec profile available? Thanks in advance,--[[User:Xan|Xan]] ([[User talk:Xan|talk]]) 18:09, 13 March 2015 (UTC)<br />
If you whitelist "em" for /usr/share/skypeforlinux/skypeforlinux, the GUI loads just fine. Video calls and everything load no problem [[User:tancrackers|tancrackers]] ([[User talk:tancrackers|talk]]) 23:20, October 25, 2016 (UTC)<br />
<br />
== Skype hangs while logging in - missing dependency ==<br />
<br />
Not sure if this is the right place to post this.<br />
<br />
Skype might hang while logging in - the wheel will spin showing it's working, but it won't log in or display the main window. This is because it's missing libgnomeui - if you install this package it works perfectly. This should thus probably be a dependency.<br />
<br />
:Please file a bug: https://bugs.archlinux.org -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 07:08, 21 August 2015 (UTC)<br />
<br />
== <s>Docker</s> ==<br />
<br />
I think Docker could also be used to run skype in a save environment. What do you think? {{Unsigned|27 August 2015|Ph1r3ph0x}}<br />
<br />
:See [https://wiki.archlinux.org/index.php?title=Skype&diff=390529&oldid=389735]. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 07:56, 28 August 2015 (UTC)<br />
<br />
::Skype runs unprivileged within the container and the article talks about privileged processes. If we find this way insecure because base container system can be exploited, "systemd-nspawn" and "Use Skype with special user" sections should also be removed. Personally I think this level of sandboxing is good enough for many people. We can put a warning that the sandboxing is not 100% bullet-proof though. — [[User:Yellow block|Yellow block]] ([[User talk:Yellow block|talk]]) 07:07, 26 October 2015 (UTC)<br />
<br />
:::I agree with you, honestly I also think that generic warnings about vulnerabilities are a bit useless, after all they can be everywhere... Maybe some words should be better spent in the [[Docker]] article itself. What about also reintroducing the [https://wiki.archlinux.org/index.php?title=Skype&oldid=389735#Docker previous] instructions as an alternative? — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 10:33, 27 October 2015 (UTC)<br />
<br />
:::: Okay, I expanded the section a little. I can add some information about security into "Securing Skype" introduction after I collect relevant URLs. — [[User:Yellow block|Yellow block]] ([[User talk:Yellow block|talk]]) 08:18, 28 October 2015 (UTC)<br />
<br />
:::::Uh thanks, although actually I don't see the need to duplicate the detailed installation instructions in this article, personally I liked it better when there was just a link to the image and the upstream instructions. Also, there are [https://hub.docker.com/search/?q=skype&page=1&isAutomated=0&isOfficial=0&pullCount=0&starCount=0 many] Skype images, maybe it's more fair to give more generalized instructions here and point users to the external manuals.<br />
:::::That said, it will be very interesting if you expand the article on security.<br />
:::::— [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 14:56, 30 October 2015 (UTC)<br />
<br />
::::::I made the suggested corrections but left info about sameersbn image. I tried a few others and they didn't work very well or required separate container with Pulseaudio. This one is tested and offers more features and he even fixed a bug for me quickly. — [[User:Yellow block|Yellow block]] ([[User talk:Yellow block|talk]]) 20:04, 1 November 2015 (UTC)<br />
<br />
:::::::Looks good to me, well done :) Do you still want to further expand the article? Otherwise you can close this discussion. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 13:53, 3 November 2015 (UTC)<br />
<br />
::::::::No follow-up, closing. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:53, 9 August 2016 (UTC)<br />
<br />
== Sound ==<br />
<br />
I'd like to add something like this at the end of the section:<br />
<br />
"If you're using an application launcher that uses the $PATH (like dmenu) variables, you might want to change exec line in the file /usr/bin/skype directly like this (remember to make a backup before!):<br />
<br />
exec /usr/bin/apulse "$LIBDIR/skype/skype" "$@"<br />
<br />
[[User:Freebe|Freebe]] ([[User talk:Freebe|talk]]) 11:12, 11 November 2015 (UTC)<br />
<br />
:Hi, I suppose you're referring to the [[Skype#Skype sound]] section. The modification you suggest would not survive a package upgrade, if I were you I'd use a shell alias for the ''skype'' command, maybe that's something worth adding to the article. See [[Dmenu#Support_for_shell_aliases]] for having dmenu see aliases (you may want to reupload the package to AUR). Alternatively, you can try to put a new wrapping script in the PATH, like {{ic|/usr/local/bin/paskype}} that in turn launches skype with apulse. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:05, 12 November 2015 (UTC)<br />
<br />
== Skype web version as a Chromium app ==<br />
<br />
What do you think of adding a new short section, after "Skype for Linux Alpha", that mentions the possibility and details to run "chromium --app='https://web.skype.com/'" as an alternative to the new client? This may be useful to people who do not want to install a binary blob from AUR. [[User:Andreyv|Andreyv]] ([[User talk:Andreyv|talk]]) 09:25, 17 August 2016 (UTC)<br />
<br />
== Skype legacy version incompatible with new version ==<br />
<br />
According to https://wiki.debian.org/skype, legacy Skype can not message or call anybody using the new version on any platform. If so, this note should be added to the wiki page here and enough to kill off using the legacy client completely. [[User:Bulletmark|Bulletmark]] ([[User talk:Bulletmark|talk]]) 01:57, 25 October 2016 (UTC)<br />
<br />
* This seems false. I'm using the legacy version, and I can still call and message people on the most recent OS X version. [[User:Ostiensis|Ostiensis]] ([[User talk:Ostiensis|talk]]) 01:54, 25 October 2016 (UTC)<br />
<br />
: The old Skype client cannot join [https://support.skype.com/en/faq/FA12361/what-s-new-with-skype-group-chats new style] group chats. There are also some reports of one-on-one video and voice chat no longer working between the old Linux client and some newer clients, but I'm not sure about that. [[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 14:26, 25 October 2016 (UTC)<br />
<br />
After installing it today and logging in alongside the up-to-date Android client, I made the following observations:<br />
* Messages that I send on the mobile client do not show up on desktop and vice versa.<br />
* Contacts can still receive messages from both clients.<br />
* Most recent messages are synced, but only received messages (seems to be ~20 days).<br />
* Group chats do not show up at all on desktop, even when a new message should be received (I don't know if all grup chats have been converted to new ones).<br />
Not being able to have reliable cross-platform chat history, or participating in group chats anymore should be noted in the main article, given someone can confirm my findings.<br />
--[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 19:12, 30 January 2017 (UTC)<br />
<br />
:I propose to archive this article, it seems that support gets progressively worse. The web client is not documented on this article besides installing some AUR package, probably due to it being a "wrapper for web.skype.com". -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:19, 30 January 2017 (UTC)<br />
<br />
:One additional observation: messages that the desktop client 'catches' first are not synced to mobile as well. Given how all messages are properly synced across devices otherwise, it seems that the old protocol messes with server-side data in ways it should not be able to. At this point any further server update might silently break other features, until the client is completely unusable. --[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 20:50, 30 January 2017 (UTC)<br />
<br />
== Systemd-nspawn security ==<br />
<br />
Hello, can someone provide me more details on how secure systemd-nspawn is?<br />
I have limited knowledge about this but since there is a warning message saying that it is not fully secure, can someone point out a link or something more specific? Maybe a syntax example?<br />
Thank you. [[User:Alex.theoto|Alex.theoto]] ([[User talk:Alex.theoto|talk]]) 18:19, 14 November 2016 (UTC)</div>Krukaihttps://wiki.archlinux.org/index.php?title=Talk:Skype&diff=467223Talk:Skype2017-01-30T19:12:23Z<p>Krukai: /* Skype legacy version incompatible with new version */ recent observations with different clients</p>
<hr />
<div>== Skype phones ==<br />
<br />
What about skype phones? Is there a way to make them work with Linux? For instance, I have a Philips voip0801B/37. Are there open source drivers for these sort of things? -- [[User:Kc8tpz|Kc8tpz]] 11:58, October 1, 2007<br />
<br />
:Hey look if you can make it work as a generic kind/device type.<br />
<br />
:In regards to the other Linux distributions which would be the most likely to work with Arch? If you look at skype.com you will find packages for Debian, etc.. I've managed to get Flash Player in Arch x64 from using the ndiswrapper scripts from Ubuntu, any idea?<br />
:-- [[User:Dextrose|Dextrose]] 19:11, September 11, 2008<br />
<br />
== %wheel ALL=(skype) NOPASSWD: /usr/bin/skype ==<br />
<br />
I have found that Skype runs as a special user if '%skype' is used instead of '%wheel'. <br />
<br />
{{Unsigned|11:05, 13 October 2012|Slr}}<br />
<br />
== Tomoyo ==<br />
<br />
I tried to secure Skype following the [https://wiki.archlinux.org/index.php/Skype#TOMOYO instructions in the article]. Unfortunately it didn't work. Now i fixed it. For me to work, I needed a few modifications:<br />
<br />
I added the following content to {{ic|/etc/tomoyo/domain_policy.conf}}<br />
{{bc|<br />
file read /usr/share/locale/\*/LC_MESSAGES/\*<br />
file read /usr/lib/gconv/\*}}<br />
Otherwise skype doesn't adapt to the system language.<br />
<br />
Furthermore just appending the in the article mentioned entries to {{ic|/etc/tomoyo/exception_policy.conf}} doesn't work. Tomoyo didn't respect the lines {{bc|initialize_domain /usr/bin/skype from any<br />
initialize_domain /usr/lib32/skype/skype from any}} Therefore I moved them to the already existing entries of the form {{ic|initialize_domain *}} in the configuration file. If this is also true for others, it might be a good idea to modify the article at least mentioning the latter one. Or perhaps it's a bug in tomoyo? --[[User:Marcus-aurelius|Marcus-aurelius]] ([[User talk:Marcus-aurelius|talk]]) 09:50, 8 June 2013 (UTC)<br />
<br />
== systemd-nspawn ==<br />
<br />
I fixed systemd-nspawn script a bit but I still can't make PulseAudio and my webcam work in the container. -- [[User:Yellow block|Yellow block]] ([[User talk:Yellow block|talk]]) 20:05, 19 October 2015 (UTC)<br />
<br />
== grsec profile ==<br />
<br />
Is there any grsec profile available? Thanks in advance,--[[User:Xan|Xan]] ([[User talk:Xan|talk]]) 18:09, 13 March 2015 (UTC)<br />
If you whitelist "em" for /usr/share/skypeforlinux/skypeforlinux, the GUI loads just fine. Video calls and everything load no problem [[User:tancrackers|tancrackers]] ([[User talk:tancrackers|talk]]) 23:20, October 25, 2016 (UTC)<br />
<br />
== Skype hangs while logging in - missing dependency ==<br />
<br />
Not sure if this is the right place to post this.<br />
<br />
Skype might hang while logging in - the wheel will spin showing it's working, but it won't log in or display the main window. This is because it's missing libgnomeui - if you install this package it works perfectly. This should thus probably be a dependency.<br />
<br />
:Please file a bug: https://bugs.archlinux.org -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 07:08, 21 August 2015 (UTC)<br />
<br />
== <s>Docker</s> ==<br />
<br />
I think Docker could also be used to run skype in a save environment. What do you think? {{Unsigned|27 August 2015|Ph1r3ph0x}}<br />
<br />
:See [https://wiki.archlinux.org/index.php?title=Skype&diff=390529&oldid=389735]. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 07:56, 28 August 2015 (UTC)<br />
<br />
::Skype runs unprivileged within the container and the article talks about privileged processes. If we find this way insecure because base container system can be exploited, "systemd-nspawn" and "Use Skype with special user" sections should also be removed. Personally I think this level of sandboxing is good enough for many people. We can put a warning that the sandboxing is not 100% bullet-proof though. — [[User:Yellow block|Yellow block]] ([[User talk:Yellow block|talk]]) 07:07, 26 October 2015 (UTC)<br />
<br />
:::I agree with you, honestly I also think that generic warnings about vulnerabilities are a bit useless, after all they can be everywhere... Maybe some words should be better spent in the [[Docker]] article itself. What about also reintroducing the [https://wiki.archlinux.org/index.php?title=Skype&oldid=389735#Docker previous] instructions as an alternative? — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 10:33, 27 October 2015 (UTC)<br />
<br />
:::: Okay, I expanded the section a little. I can add some information about security into "Securing Skype" introduction after I collect relevant URLs. — [[User:Yellow block|Yellow block]] ([[User talk:Yellow block|talk]]) 08:18, 28 October 2015 (UTC)<br />
<br />
:::::Uh thanks, although actually I don't see the need to duplicate the detailed installation instructions in this article, personally I liked it better when there was just a link to the image and the upstream instructions. Also, there are [https://hub.docker.com/search/?q=skype&page=1&isAutomated=0&isOfficial=0&pullCount=0&starCount=0 many] Skype images, maybe it's more fair to give more generalized instructions here and point users to the external manuals.<br />
:::::That said, it will be very interesting if you expand the article on security.<br />
:::::— [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 14:56, 30 October 2015 (UTC)<br />
<br />
::::::I made the suggested corrections but left info about sameersbn image. I tried a few others and they didn't work very well or required separate container with Pulseaudio. This one is tested and offers more features and he even fixed a bug for me quickly. — [[User:Yellow block|Yellow block]] ([[User talk:Yellow block|talk]]) 20:04, 1 November 2015 (UTC)<br />
<br />
:::::::Looks good to me, well done :) Do you still want to further expand the article? Otherwise you can close this discussion. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 13:53, 3 November 2015 (UTC)<br />
<br />
::::::::No follow-up, closing. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:53, 9 August 2016 (UTC)<br />
<br />
== Sound ==<br />
<br />
I'd like to add something like this at the end of the section:<br />
<br />
"If you're using an application launcher that uses the $PATH (like dmenu) variables, you might want to change exec line in the file /usr/bin/skype directly like this (remember to make a backup before!):<br />
<br />
exec /usr/bin/apulse "$LIBDIR/skype/skype" "$@"<br />
<br />
[[User:Freebe|Freebe]] ([[User talk:Freebe|talk]]) 11:12, 11 November 2015 (UTC)<br />
<br />
:Hi, I suppose you're referring to the [[Skype#Skype sound]] section. The modification you suggest would not survive a package upgrade, if I were you I'd use a shell alias for the ''skype'' command, maybe that's something worth adding to the article. See [[Dmenu#Support_for_shell_aliases]] for having dmenu see aliases (you may want to reupload the package to AUR). Alternatively, you can try to put a new wrapping script in the PATH, like {{ic|/usr/local/bin/paskype}} that in turn launches skype with apulse. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:05, 12 November 2015 (UTC)<br />
<br />
== Skype web version as a Chromium app ==<br />
<br />
What do you think of adding a new short section, after "Skype for Linux Alpha", that mentions the possibility and details to run "chromium --app='https://web.skype.com/'" as an alternative to the new client? This may be useful to people who do not want to install a binary blob from AUR. [[User:Andreyv|Andreyv]] ([[User talk:Andreyv|talk]]) 09:25, 17 August 2016 (UTC)<br />
<br />
== Skype legacy version incompatible with new version ==<br />
<br />
According to https://wiki.debian.org/skype, legacy Skype can not message or call anybody using the new version on any platform. If so, this note should be added to the wiki page here and enough to kill off using the legacy client completely. [[User:Bulletmark|Bulletmark]] ([[User talk:Bulletmark|talk]]) 01:57, 25 October 2016 (UTC)<br />
<br />
* This seems false. I'm using the legacy version, and I can still call and message people on the most recent OS X version. [[User:Ostiensis|Ostiensis]] ([[User talk:Ostiensis|talk]]) 01:54, 25 October 2016 (UTC)<br />
<br />
: The old Skype client cannot join [https://support.skype.com/en/faq/FA12361/what-s-new-with-skype-group-chats new style] group chats. There are also some reports of one-on-one video and voice chat no longer working between the old Linux client and some newer clients, but I'm not sure about that. [[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 14:26, 25 October 2016 (UTC)<br />
<br />
After installing it today and logging in alongside the up-to-date Android client, I made the following observations:<br />
* Messages that I send on the mobile client do not show up on desktop and vice versa.<br />
* Contacts can still receive messages from both clients.<br />
* Most recent messages are synced, but only received messages (seems to be ~20 days).<br />
* Group chats do not show up at all on desktop, even when a new message should be received (I don't know if all grup chats have been converted to new ones).<br />
Not being able to have reliable cross-platform chat history, or participating in group chats anymore should be noted in the main article, given someone can confirm my findings.<br />
--[[User:Krukai|Krukai]] ([[User talk:Krukai|talk]]) 19:12, 30 January 2017 (UTC)<br />
<br />
== Systemd-nspawn security ==<br />
<br />
Hello, can someone provide me more details on how secure systemd-nspawn is?<br />
I have limited knowledge about this but since there is a warning message saying that it is not fully secure, can someone point out a link or something more specific? Maybe a syntax example?<br />
Thank you. [[User:Alex.theoto|Alex.theoto]] ([[User talk:Alex.theoto|talk]]) 18:19, 14 November 2016 (UTC)</div>Krukai