Last modified by Alexandru Pentilescu on 2023/06/25 18:56

From version 55.1
edited by Alexandru Pentilescu
on 2022/06/15 22:58
Change comment: There is no comment for this version
To version 58.1
edited by Alexandru Pentilescu
on 2023/06/25 18:56
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -4,7 +4,7 @@
4 4  
5 5  * You have sudo rights on the machine where you're trying to install the XWiki server on
6 6  * This machine already has docker fully installed and properly configured on it. Please perform a test installation of any random image from docker hub to ensure that everything works appropriately
7 -* You already own and are in control of a domain name for which you wish to make the XWiki server accessible through. This domain name is already pre-configured to point to the server that you wish to install XWiki on. In my particular case, I already have pentilescu.com configured to point to my VPS and, what I wished to accomplish was to have a subdomain via which I could access XWiki. In this particular case, this subdomain was wiki.pentilescu.com. To that end, you must have nginx also configured and running on the same server in the background, to have it redirect connections whose destination is a specific port to a subdomain
7 +* You already own and are in control of a domain name for which you wish to make the XWiki server accessible through. This domain name is already pre-configured to point to the server that you wish to install XWiki on. In my particular case, I already have transistor.one configured to point to my VPS and, what I wished to accomplish was to have a subdomain via which I could access XWiki. In this particular case, this subdomain was wiki.transistor.one. To that end, you must have nginx also configured and running on the same server in the background, to have it redirect connections whose destination is a specific port to a subdomain
8 8  * Finally, it's recommended (although not mandatory) to have an SMTP email server running somewhere accessible to the docker instance. XWiki will need to use this server to relay account activation emails as well as password reset emails to its users
9 9  
10 10  With all of these details in mind, let's begin!
... ... @@ -60,6 +60,7 @@
60 60   # The container that runs XWiki + Tomcat
61 61   web:
62 62   image: "xwiki:lts-mariadb-tomcat"
63 + restart: always
63 63   container_name: xwiki-mariadb-tomcat-web
64 64   depends_on:
65 65   - db
... ... @@ -83,6 +83,7 @@
83 83   # The container that runs the database (mariadb)
84 84   db:
85 85   image: "mariadb:10.5"
87 + restart: always
86 86   container_name: xwiki-mariadb-db
87 87   # - We provide a xwiki.cnf file in order to configure the mysql db to support UTF8 and be case-insensitive
88 88   # We have to do it here since we use an existing image and that's how this image allows customizations.
... ... @@ -105,13 +105,6 @@
105 105   networks:
106 106   - internal_xwiki_network
107 107  
108 -networks:
109 - internal_xwiki_network:
110 - driver: bridge
111 - ipam:
112 - driver: default
113 - config:
114 - - subnet: 192.168.80.0/24
115 115  {{/code}}
116 116  
117 117  There are many different configurations you can use to have an XWiki server. For one, mariadb is NOT required to install XWiki, it's simply one of many database solutions that XWiki is compatible with. Alternatively, you may use MySQL or even PostgreSQL, instead. To see docker-compose configuration options for those, please reference the full official docker reference guide for XWiki at the "External references" section of this page for more details. **Keep in mind, though, in case you do decide to use an alternative to mariadb, to download a different init.sql file than the one mentioned in the previous step!**
... ... @@ -144,7 +144,7 @@
144 144  
145 145  Take your time and don't rush!
146 146  
147 -When you want to see the status of your installation, visit the domain name pointing to your server at port 8081. In my case, I would visit http://pentilescu.com:8081/
142 +When you want to see the status of your installation, visit the domain name pointing to your server at port 8081. In my case, I would visit http://transistor.one:8081/
148 148  
149 149  You might see a page indicating that XWiki is initializing, as well as a percentage counter indicating its progress. Let the server finish doing its thing.
150 150  
... ... @@ -158,13 +158,13 @@
158 158  
159 159  = [OPTIONAL] Nginx reverse proxy configuration =
160 160  
161 -We assume you already have Nginx installed and properly configured on your machine. Also, we will assume you have an X.509 certificate whose Subject Alt Names includes both your domain name, as well as the subdomain for your wiki (i.e. in my case for pentilescu.com and wiki.pentilescu.com, respectively) and you've configured Nginx to utilize both of them! If this is not the case or you're unsure how to perform these configurations, please check the internal "How to setup an Nginx reverse proxy and also provide a global X.509 certificate for it" guide at the bottom of this page.
156 +We assume you already have Nginx installed and properly configured on your machine. Also, we will assume you have an X.509 certificate whose Subject Alt Names includes both your domain name, as well as the subdomain for your wiki (i.e. in my case for transistor.one and wiki.transistor.one, respectively) and you've configured Nginx to utilize both of them! If this is not the case or you're unsure how to perform these configurations, please check the internal "How to setup an Nginx reverse proxy and also provide a global X.509 certificate for it" guide at the bottom of this page.
162 162  
163 163  In "/etc/nginx/sites-available/", please create a "xwiki.conf" file with the following contents:
164 164  
165 165  {{code language="nginx"}}
166 166  server {
167 - server_name wiki.pentilescu.com;
162 + server_name wiki.transistor.one;
168 168  
169 169   listen [::]:443 ssl http2; # managed by Certbot
170 170   listen 443 ssl http2; # managed by Certbot
... ... @@ -177,9 +177,9 @@
177 177  }
178 178  {{/code}}
179 179  
180 -Please replace "wiki.pentilescu.com" with the domain and subdomains that you desire for your particular website. Also, please adapt "/etc/nginx/snippets/ssl.conf" to reference the X.509 Nginx configuration file on your particular server. If you do not wish to support TLS at all, you may remove this line, as well as the "listen" directives from above.
175 +Please replace "wiki.transistor.one" with the domain and subdomains that you desire for your particular website. Also, please adapt "/etc/nginx/snippets/ssl.conf" to reference the X.509 Nginx configuration file on your particular server. If you do not wish to support TLS at all, you may remove this line, as well as the "listen" directives from above.
181 181  
182 -Effectively, what this configuration file will do is tell Nginx to redirect all HTTP/HTTPS connection verbs directed at wiki.pentilescu.com to localhost port 8081, optionally also injecting the TLS certificates into the connection to secure it as well. By doing this, instead of having to connect to port 8081 on your server manually, future users of your XWiki instance will have to type the subdomain in their browser's address bar instead, which is usually more human readable and more memorable for most people. Typing in "wiki.pentilescu.com" into your browser's address bar is more human friendly than typing "pentilescu.com:8081". Not only are numeric port numbers difficult to remember, but Nginx will also inject TLS into the connection to secure it if you configured the X.509 certificates properly, effectively securing your visitors' connection every time so that their login credentials are protected even against network sniffers.
177 +Effectively, what this configuration file will do is tell Nginx to redirect all HTTP/HTTPS connection verbs directed at wiki.transistor.one to localhost port 8081, optionally also injecting the TLS certificates into the connection to secure it as well. By doing this, instead of having to connect to port 8081 on your server manually, future users of your XWiki instance will have to type the subdomain in their browser's address bar instead, which is usually more human readable and more memorable for most people. Typing in "wiki.transistor.one" into your browser's address bar is more human friendly than typing "transistor.one:8081". Not only are numeric port numbers difficult to remember, but Nginx will also inject TLS into the connection to secure it if you configured the X.509 certificates properly, effectively securing your visitors' connection every time so that their login credentials are protected even against network sniffers.
183 183  
184 184  Once you've done this, create a symbolic link with the following command to activate your new configuration:
185 185  
... ... @@ -269,7 +269,7 @@
269 269  To configure an SMTP server, go to the "Administer Wiki" section of the hamburger menu again, then expand the "Mail" section of the options on the left side and finally click on the "Mail Sending" menu option.
270 270  [[image:Mail.png]]
271 271  Of course, the exact configuration options you have to enter depend on your SMTP server's configuration. If you configured mandatory authentication on your SMTP server, you will have to enter login credentials here. I don't have to do that, personally.
272 -The "EMAIL ADDRESS TO SEND FROM" can be any email address you wish to configure. Preferrably, it should be under the domain name of the machine where you're running your XWiki from (in my case, under "pentilescu.com").
267 +The "EMAIL ADDRESS TO SEND FROM" can be any email address you wish to configure. Preferrably, it should be under the domain name of the machine where you're running your XWiki from (in my case, under "transistor.one").
273 273  The "EMAIL SERVER" option is a bit trickier. Assuming you're using postfix as your SMTP server, this should be an email configured in the "inet_interfaces" setting from the "/etc/postfix/main.cf" configuration file.
274 274  Also, if your postfix is not configured to accept email relays from outside its network, as mine does, you must remember to edit "/etc/postfix/main.cf" to add "192.168.80.3" to its "mynetworks" configuration, to, essentially, whitelist your docker container as a valid relay source, otherwise it will deny any email sending requests from it.
275 275  Please be sure to use the appropriate IP address as configured in your "docker-compose.yml" file for your xwiki service.
... ... @@ -299,5 +299,5 @@
299 299  = External references =
300 300  
301 301  [[Official docker guide for installing XWiki>>https://github.com/xwiki/xwiki-docker/blob/master/README.md]]
302 -[[How to setup an Nginx reverse proxy and also provide a global X.509 certificate for it>>https://wiki.pentilescu.com/bin/view/Guides/How%20to%20setup%20an%20Nginx%20reverse%20proxy%20and%20also%20provide%20a%20global%20X.509%20certificate%20for%20it/]]
303 -[[How to setup a postfix SMTP server>>https://wiki.pentilescu.com/bin/view/Guides/How%20to%20setup%20a%20postfix%20SMTP%20server/]]
297 +[[How to setup an Nginx reverse proxy and also provide a global X.509 certificate for it>>https://wiki.transistor.one/bin/view/Guides/How%20to%20setup%20an%20Nginx%20reverse%20proxy%20and%20also%20provide%20a%20global%20X.509%20certificate%20for%20it/]]
298 +[[How to setup a postfix SMTP server>>https://wiki.transistor.one/bin/view/Guides/How%20to%20setup%20a%20postfix%20SMTP%20server/]]