Project

General

Profile

BrutusSetup » History » Version 11

Anonymous, 09/12/2024 11:45 AM
adding dynamic dns section

1 1
h1. brutus Server Setup
2
3
h2. History
4
5 2
Who needs "the cloud", I've got gigabit fiber running directly to my house! 
6
-- Me
7 1
8 2
I've been running a local file server for 16ish years.
9
10 1
|=. *Date* |=. *Note* |
11 2
| *9/11/2024* | Swtiched to "Dynu":https://www.dynu.com/en-US/ for dynamic DNS and used "Let's Encrypt":https://letsencrypt.org/ for a proper SSL/TLS cert.|
12 1
| *9/8/2024* | Retired @phalanx@ and replaced it with @brutus@ (hardware details in the section below).|
13
| *5/27/2022* | Wipe and install Ubuntu 22.04|
14
| *7/8/2019* | Change Dynamic DNS provider to http://freedns.afraid.org. |
15
| *1/9/2019* | Added 10G Ethernet interface. |
16
| *1/4/2019* | Replaced mobo/proc/RAM with parts salvaged from work. Proc i7-4790 (Haswell); RAM 32GB DDR3L.|
17
| *6/2/2018* | Upgraded boot drive to 500 GB SSD. Also installed Ubuntu 18.04 LTS. |
18
| *1/16/2017*| Upgraded server added 2 x 3 TB additional HDDs (via PCIe SATA expansion card), new power supply, and new (slightly used) case.  After adding the new disks to the RAID and growing the file system, total usable storage on the array is now 11.18 TB.|
19
| *11/18/2016* |Updated (wipe and reinstall) to Ubuntu Server 16.04.1 LTS|
20
| *9/2015* | I recently decided to pay for dynamic DNS service from "Dyn":http://dyn.com.  The cost was $30 (after 25% coupon) for a year w/ 30 hostnames. Server is now reachable at https://baranovich.homelinux.org:3268|
21
| *8/2014* | Both of the my original 3TB HDDs started acting funny and died within a week of each other after about 1.8 years of continuous use.  Fortunately I reacted immediately and I was able to back up all of my data onto other disks. Although I regularly back up all of my critical data I decided that I really don't want to have to deal with losing any of my data.  I promptly purchased another HDD and a HW RAID card (an LSI MegaRAID SAS 9240-8i) and set out to build a RAID 5 array.  I quickly ran into problems with the RAID card.  I was only able to get the computer to boot with it installed once.  During that boot I upgraded the card's firmware with the hope that it would fix all my issues, but it did not and I was never able to fully boot with the card installed again.  After a little googling I discovered someone in my same position who claimed to have called LSI tech support and was told that LSI cards are "not compatible with newer motherboards".  The guy didn't elaborate as to what that meant but I assume it means LSI cards don't work in UEFI motherboards. I was disappointed but I started reading about software raid (device mapper raid) and decided that it should work perfectly for my little fileserver.  I also decided that btrfs is not really ready for prime time and I should use some other file system.|
22 2
| *??/2008* | Created first version of @phalanx@ with Dell desktop that was Kab's college computer.|
23 1
24
h2. Hardware Details
25 3
26
* Dell r730xd server 2U 
27
** 2x Intel E5-2680v4 CPUs
28
** 128 GB DDR4 2400
29
** 24x 1 TB mSATA PM-851 
30
** Dell HBA H330
31
** LSI SAS 9300-8E 8-Port 12Gb/s 12Gbps External HBA Controller Bus Card
32
* Netapp DS2246 Storage Expansion Array 24 Bay 2.5" SAS Trays 2x IOM6 Controllers
33
** 24x 1 TB mSATA PM-851
34
35
Total raw storage capacity: 44 TB
36
Total usable storage capacity (RAID-6): 42.84 TB
37
38
h3. Price Breakdown
39
40
Components purchased from e-Bay.
41
42
|=. *Component* |=. *Description* |=. *Price* |
43
|Dell r730xd server|2x Intel E5-2680v4 CPUs; 128 GB DDR4|$413.39|
44
|24x 2.5" 8FKXC/08FKXC| SAS SATA Drive Caddy For Dell PowerEdge|$88.79|
45
|Dell TRJ5G |Optical SATA power cable SFF R730|$13.73|
46
|Dell 0P2R3R|HBA H330 12gbps SAS SATA Mini Mono|$15.90|
47
|LSI SAS 9300-8E|8-Port 12Gb/s 12Gbps External HBA Controller Bus Card|$37.09|
48
|Netapp DS2246|Storage Expansion Array 24 Bay 2.5" SAS Trays 2x IOM6 Controllers|$149.94|
49
|2x External SAS Cable|SFF-8436 QSFP to SFF-8644 HD Hybrid SAS Cable 1.64 ft.|$41.54|
50
51
Total price: $797.47 (mSATA drives and adapter cards salvaged)
52 4
53
h2. Network Interfaces
54
55
|*Interface*    | *MAC*                | *Reserved IP*  | *Notes*  |
56
|eno1             |c8:1f:66:dd:6a:24|192.168.8.10    |primary gigabit interface|
57
|eno2             |c8:1f:66:dd:6a:25|--                       |secondary gigabit (unused)|
58
|eno3             |c8:1f:66:dd:6a:26|--                       |third gigabit interface (unused)|
59
|eno4             |c8:1f:66:dd:6a:27|--                       |fourth gigabit interface (unused)|
60
|enp132s0     |24:8a:07:e3:14:80|--                      |10G fiber interface (unused)|
61
|enp132s0d1 |24:8a:07:e3:14:81|10.250.1.6       |10G fiber interface|
62
|ipmi               |18:66:da:a2:a0:3b|192.168.208.4|IPMI interface|
63
64
Note: 10G interface provided by Mellanox 10G PCIe card.
65 5
66
h2. Storage Configuration
67
68
The r730xd has 24x 1TB drives and the attached Netapp shelf has an additional 24x 1TB drives connected via the LSI SAS 9300-8E card for a total of 44 TB.  T
69
70
* Script to partition each device (add additional drives to the list to partition more)
71
<pre>
72
for device in sdar; do echo $device; parted --script /dev/$device \
73
    mklabel gpt \
74
    mkpart primary 0% 100%; done
75
</pre>
76
* Command to create the RAID-6 array (Note: do not copy verbatim as the device names may change):
77
<pre>
78
$ sudo mdadm --create --verbose /dev/md0 --level=6 --raid-devices=48 /dev/sda1 /dev/sdaa1 /dev/sdab1 /dev/sdad1 /dev/sdae1 /dev/sdaf1 /dev/sdag1 /dev/sdah1 /dev/sdai1 /dev/sdaj1 /dev/sdak1 /dev/sdal1 /dev/sdam1 /dev/sdan1 /dev/sdao1 /dev/sdap1 /dev/sdaq1 /dev/sdar1 /dev/sdas1 /dev/sdat1 /dev/sdau1 /dev/sdav1 /dev/sdaw1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1 /dev/sdl1 /dev/sdm1 /dev/sdn1 /dev/sdo1 /dev/sdp1 /dev/sdq1 /dev/sdr1 /dev/sds1 /dev/sdt1 /dev/sdu1 /dev/sdv1 /dev/sdw1 /dev/sdx1 /dev/sdy1 /dev/sdz1
79
</pre>
80
* The create command above takes a significant amount of time to create a new array (20+ hrs).  Use this command to monitory status:
81
<pre>
82
$ watch cat /proc/mdstat
83
</pre>
84
* The following are miscellaneous mdadm commands for reference:
85
<pre>
86
$ sudo mdadm --stop /dev/md0
87
$ sudo mdadm --assemble --scan
88
$ sudo mdadm --manage /dev/md0 --add /dev/sdas1
89
</pre>
90
* Use this command to store the array information to the mdadm configuration file:
91
<pre>
92
$ sudo su
93
# mdadm --detail --scan >> /etc/mdadm/mdadm.conf
94
# update-initramfs -u
95
</pre>
96 6
97
h2. NFS setup:
98
99
* Install NFS (note be sure to configure the firewall first):
100
<pre>
101
$ sudo apt install nfs-kernel-server
102
</pre>
103
* Edit @/etc/exports@:
104
<pre>
105
/storage    192.168.8.0/24(rw,nohide,insecure,no_subtree_check,async)
106
/storage    192.168.4.0/24(rw,nohide,insecure,no_subtree_check,async)
107
108
/storage    10.250.1.0/24(rw,nohide,insecure,no_subtree_check,async)
109
</pre>
110
* Restart NFS:
111
<pre>
112
$ sudo systemctl restart nfs-kernel-server
113
</pre>
114
* Export filesystems:
115
<pre>
116
$ sudo exportfs
117
</pre>
118
119
h2. Firewall Configuration
120
121
|*Port*|*Description*|
122
|22|ssh|
123
|80|http|
124
|111|SUN rpc|
125
|443|https|
126
|2049|NFS|
127
|3142|apt-cacher-ng|
128
|4045|lockd|
129
|17641|NFS connect|
130
|61993|bt|
131
132
It was a bit annoying to get NFS working when the firewall was enabled but I found some good instructions and got them to work.  The issue was that some of the important rpc/NFS daemons use random ports when they boot up.
133
134
* Edit @/etc/default/nfs-kernel-server@ comment out this line:
135
<pre>
136
RPCMOUNTDOPTS=--manage-gids
137
</pre>
138
 add this line
139
<pre>
140
RPCMOUNTDOPTS="--port 17641"
141
</pre>
142
* Edit/create @/etc/modprobe.d/options.conf@:
143
<pre>
144
options lockd nlm_udpport=4045 nlm_tcpport=4045
145
</pre>
146
* Edit @/etc/modules@ and add @lockd@ on its own line:
147
<pre>
148
...
149
lockd
150
</pre>
151
* Now create the firewall rules (only allow incoming access for the local network), for each port in the table above:
152
<pre>
153
$ sudo ufw allow from 192.168.8.0/24 to any port <PORT>
154
</pre>
155
* Add external allow rules (i.e. up these ports to the outside world) for ssh, https, and bt :
156
<pre>
157
$ sudo ufw allow <PORT>
158
</pre>
159
* Start ufw:
160
<pre>
161
$ sudo ufw enable
162
</pre>
163
Overview of added rules:
164
<pre>
165
sudo ufw allow proto tcp to 0.0.0.0/0 port 22
166
sudo ufw allow proto tcp to 0.0.0.0/0 port 443
167
sudo ufw allow proto tcp to 0.0.0.0/0 port 61993
168
169
sudo ufw allow from 192.168.4.0/24 to any port 111
170
sudo ufw allow from 192.168.4.0/24 to any port 2049
171
sudo ufw allow from 192.168.4.0/24 to any port 4045
172
sudo ufw allow from 192.168.4.0/24 to any port 17641
173
174
sudo ufw allow from 192.168.8.0/24 to any port 111
175
sudo ufw allow from 192.168.8.0/24 to any port 2049
176
sudo ufw allow from 192.168.8.0/24 to any port 4045
177
sudo ufw allow from 192.168.8.0/24 to any port 17641
178
179
sudo ufw allow from 10.250.1.0/24 to any port 111
180
sudo ufw allow from 10.250.1.0/24 to any port 2049
181
sudo ufw allow from 10.250.1.0/24 to any port 4045
182
sudo ufw allow from 10.250.1.0/24 to any port 17641
183
</pre>
184 7
185
h2. Apache
186
187 8
The Apache config (see repo) is the really important part here. Below is a section on each application that's running on/from Apache.  I am using https with a permanent redirect from port 80 along with a Let's Encrypt provided SSL/TLS certificate.  Most of the sections below are password protected using mod_auth_digest.  The appropriate digest file is created and managed with the "htdigest":http://httpd.apache.org/docs/2.2/programs/htdigest.html tool. *NOTE:* make sure the password digest file (e.g. @/home/dsorber/web_users@) is owned by @www-data:www-data@ and permissions are set to @600@.
188 7
189
* Install apache2 itself:
190
<pre>
191
$ sudo apt install apache2
192
</pre>
193
* Enable apache modules:
194
<pre>
195
$ sudo a2enmod ssl proxy proxy_http auth_digest
196
</pre>
197
* Copy backed up apache configs to their location:
198
<pre>
199
$ sudo cp apache_configs/* /etc/apache2/sites-available/
200
</pre>
201 1
* Turn on main site (also disable default apache2 site):
202
<pre>
203
$ sudo a2ensite main
204
</pre>
205
206 11
h3. Dynamic DNS
207
208
Free Dynamic DNS is provided by "https://www.dynu.com/en-US/":Dynu
209
210
* Install @ddclient@
211
<pre>
212
$ sudo apt install ddclient
213
</pre>
214
* Edit @/etc/ddclient@:
215
<pre>
216
daemon=60                                                    # Check every 60 seconds.
217
syslog=yes                                                   # Log update msgs to syslog.
218
mail=root                                                    # Mail all msgs to root.
219
mail-failure=root                                            # Mail failed update msgs to root.
220
pid=/var/run/ddclient.pid                                    # Record PID in file.
221
use=web, web=checkip.dynu.com/, web-skip='IP Address'        # Get ip from server.
222
server=api.dynu.com                                          # IP update server.
223
protocol=dyndns2
224
login=baranovich                                             # Your username
225
password=PASSWORD_GOES_HERE                                  # Your password or MD5/SHA256 hash of password
226
brutus.gleeze.com                                            # Update IP address for alias of your domain name       
227
</pre>
228
* Restart @ddclient@:
229
<pre>
230
$ sudo systemctl restart ddclient
231
</pre>
232
233 8
h3. Let's Encrypt Setup
234 1
235 8
* Install @cerbot@ in a VirtualEnv and create a link
236
<pre>
237
$ sudo apt install python3.12-venv
238
$ sudo python3 -m venv /opt/certbot
239
$ sudo /opt/certbot/bin/pip install --upgrade pip
240
$ sudo /opt/certbot/bin/pip install certbot
241
$ sudo /opt/certbot/bin/pip install certbot-dns-dynu
242
$ sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot
243
</pre>
244
* Create @dynu-credentials.ini@ see below for instructions for getting token
245
<pre>
246
dns_dynu_auth_token = [REDACTED]
247
</pre>
248
* Run @certbot@
249
<pre>
250
$ sudo certbot --authenticator dns-dynu --dns-dynu-credentials ./dynu-credentials.ini certonly
251
</pre>
252
* Update Apache configuration @main.conf@
253
* Add cronjob for automated renewal:
254
<pre>
255
$ echo "0 0,12 * * * root /opt/certbot/bin/python -c 'import random; import time; time.sleep(random.random() * 3600)' && sudo certbot renew -q" | sudo tee -a /etc/crontab > /dev/null
256
</pre>
257 7
258 9
*Resources*
259
* https://www.dynu.com/Resources/Tutorials/DynamicDNS/Advancedfeatures/Lets-Encrypt
260
* https://certbot.eff.org/instructions?ws=other&os=pip
261
* https://community.letsencrypt.org/t/apache-configuration-example/2338
262
263 8
h3. Transmission
264 7
265 8
I use "Transmission":http://www.transmissionbt.com/ to download Linux .isos ( _wink_ ) and give back to the community by sharing them using my own bandwidth. Transmission with its webui runs as a separate daemon so apache is configured to act as reverse proxy.
266
267 7
* Install transmission daemon:
268
<pre>
269
$ sudo apt install transmission-daemon
270
</pre>
271
* Copy over configuration:
272
<pre>
273
$ sudo systemctl stop transmission-daemon.service
274
$ sudo cp settings.json /etc/transmission-daemon
275
$ sudo systemctl start transmission-daemon.service
276
</pre>
277
* Make sure the user digest file is in place (NOTE: be sure to change use directory permissions to 755 or Apache will not be able to read the web_users file):
278
<pre>
279
$ cd /home/dsorber
280
$ cp web_users .
281
$ cd /home
282
$ sudo chmod 755 dsorber
283
</pre>
284
* Enable site:
285
<pre>
286
$ sudo a2ensite transmission
287 1
</pre>
288
289
h3. Redmine + Git
290 7
291
Unfortunately Trac completely stagnated and never completed moving to Python 3. Therefore I switched to Redmine + Git which (at least as of now) is still maintained.  Note the following uses PostgresQL for the backend database (which is also used for nextcloud).
292
293
# Install prereqs:
294
<pre>
295
 $ sudo apt install apache2 pbzip2 zip unzip postgresql libpq-dev build-essential ruby ruby-dev
296
</pre>
297
# Download Redmine:
298
<pre>
299
$ cd /srv/
300 8
$ sudo wget https://www.redmine.org/releases/redmine-5.1.4.tar.gz
301
$ sudo tar xf redmine-5.1.4.tar.gz
302
$ sudo mv redmine-5.1.4 redmine
303 7
$ sudo chown -R root:root redmine
304
</pre>
305
# Setup postgres database for Redmine:
306
<pre>
307
$ sudo -u postgres psql postgres
308
> CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'password_goes_here' NOINHERIT VALID UNTIL 'infinity';
309
> CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;
310
Ctrl+D
311
</pre>
312
# Create database config
313
<pre>
314
$ cd /srv/redmine/config
315
$ sudo cp database.yml.example database.yml
316
</pre>
317
** Edit @database.yml@:
318
<pre>
319
production:
320
  adapter: postgresql
321
  database: redmine
322
  host: localhost
323
  username: redmine
324
  password: "PASSWORD_GOES_HERE"
325
326
# PostgreSQL configuration example
327
#production:
328
#  adapter: postgresql
329
#  database: redmine
330
#  host: localhost
331
#  username: postgres
332
#  password: "postgres"
333
334
# SQLite3 configuration example
335
#production:
336
#  adapter: sqlite3
337
#  database: db/redmine.sqlite3
338
339
# SQL Server configuration example
340
#production:
341
#  adapter: sqlserver
342
#  database: redmine
343
#  host: localhost
344
#  username: jenkins
345
#  password: jenkins
346
</pre>
347
# Install bundle and dependencies:
348
<pre>
349
$ sudo gem install bundler
350
$ cd /srv/redmine
351
$ sudo bundle config set --local without 'development test'
352
$ sudo bundle install 
353
</pre>
354
# Configure Redmine database:
355
<pre>
356
$ sudo rake generate_secret_token
357
$ sudo RAILS_ENV=production rake db:migrate
358
$ sudo RAILS_ENV=production rake redmine:load_default_data
359
</pre>
360
# Configure permissions:
361
<pre>
362
$ sudo chown -R www-data:www-data files log tmp public/plugin_assets
363
$ sudo chmod -R 755 files log tmp public/plugin_assets
364
</pre>
365
# Setup webserver:
366
<pre>
367
$ sudo chown www-data:www-data /srv/redmine/config/environment.rb
368
$ sudo ln -s /srv/redmine/public /var/www/redmine
369
</pre>
370
# Install Passenger:
371
<pre>
372
$ sudo apt install libcurl4-openssl-dev libssl-dev apache2-dev libapr1-dev libaprutil1-dev zlib1g-dev
373
</pre>
374
** Create file @Gemfile.local@:
375
<pre>
376
gem 'passenger'
377
</pre>
378
** Continue with install:
379
<pre>
380
$ sudo bundle install
381
$ sudo passenger-install-apache2-module (follow instructions)
382
$ sudo vim /etc/apache2/mods-available/passenger.load
383
-------------------------------------------------------------------------------
384
LoadModule passenger_module /var/lib/gems/3.0.0/gems/passenger-6.0.14/buildout/apache2/mod_passenger.so
385
-------------------------------------------------------------------------------
386
387
$ sudo vim /etc/apache2/mods-available/passenger.conf
388
-------------------------------------------------------------------------------
389
  <IfModule mod_passenger.c>
390
     PassengerRoot /var/lib/gems/3.0.0/gems/passenger-6.0.14
391
     PassengerDefaultRuby /usr/bin/ruby3.0
392
   </IfModule>
393
-------------------------------------------------------------------------------
394
395
$ sudo a2enmod passenger
396
$ sudo systemctl restart apache2
397
</pre>
398
# Setup Apache config. Note the Redmine section is now included in @main.conf@ and should be commented out until this step is reached.
399
# Install theme(s):
400
<pre>
401
$ cd /srv/redmine/public/themes
402
$ git clone https://github.com/koppen/redmine-pepper-theme.git
403
$ git clone https://github.com/makotokw/redmine-theme-gitmike
404
</pre>
405
406
h3. Redmine Backup
407
408
There are two items that need to be backed up, the database and any attached files:
409
410
* Backup:
411
<pre>
412
$ /usr/bin/pg_dump -U redmine -h localhost -Fc --file=redmine.sqlc redmine
413
414
$ cd /srv/redmine/
415
$ tar cjf redmine_files.tar.bz2 files
416
</pre>
417
418
* Restore:
419
<pre>
420
$ pg_restore -U redmine -h localhost -d redmine redmine.sqlc
421
422
$ tar xf redmine_files.tar.bz2
423
$ sudo cp -r files/ /srv/redmine/files
424
</pre>
425
426
h3. Git Integration
427
428
# Install prereqs:
429
<pre>
430
$ sudo apt install libapache2-mod-perl2 libdbi-perl libdbd-pg-perl
431
</pre>
432
# Configure:
433
<pre>
434
$ sudo ln -s /srv/redmine/extra/svn/Redmine.pm /usr/lib/x86_64-linux-gnu/perl5/5.34/Apache2/Redmine.pm
435
$ sudo a2enmod perl dav dav_fs
436
</pre>
437
# Setup git repo. Note if using an existing repo then just copy it into path: @/srv/git@
438
<pre>
439
$ sudo mkdir -p /srv/git
440
$ cd /srv
441
$ sudo chown -R dsorber:dsorber git
442
(optional used to test below)
443
$ cd git 
444
$ mkdir test; cd test
445
 $ git init --bare
446
</pre>
447
# Setup grack:
448
<pre>
449
$ cd /var/www
450
$ sudo git clone https://github.com/grackorg/grack.git
451
$ sudo vim grack/config.ru
452
-------------------------------------------------------------------------------
453
require 'grack/app'
454
require 'grack/git_adapter'
455
456
config = {
457
  :root => '/srv/git',
458
  :allow_push => true,
459
  :allow_pull => true,
460 1
  :git_adapter_factory => ->{ Grack::GitAdapter.new }
461 7
}
462
463
run Grack::App.new(config)
464
465
-------------------------------------------------------------------------------
466
467
$ sudo chown -R www-data:www-data grack
468
$ cd /var/www/grack
469
$ sudo mkdir public
470
$ sudo mkdir tmp
471
$ sudo chown -R www-data:www-data .
472
$ sudo bundle install
473
</pre>
474 8
# Configure apache. Note the git section is now included in @main.conf@ and should be commented out until this step is reached.
475 7
<pre>
476
$ sudo a2ensite git 
477
$ sudo systemctl restart apache2
478
</pre>
479
480
h3. Nextcloud
481
482
"Nextcloud":https://nextcloud.com/|Nextcloud is a self-hosted "cloud". It allows easy file viewing and sharing as well as CardDav and CalDav servers:
483
484
# Install prereqs:
485
<pre>
486
$ sudo apt install apache2 libapache2-mod-php php-gd php-pgsql php-curl php-mbstring php-intl php-gmp php-bcmath php-xml php-imagick php-zip
487
</pre>
488 1
# Download and move into place:
489 7
<pre>
490
$ wget https://download.nextcloud.com/server/releases/latest.tar.bz2
491
$ tar xf latest.tar.bz2
492
$ sudo mv nextcloud /var/www/nextcloud
493
$ cd /var/www
494
$ sudo chown -R www-data:www-data nextcloud
495
</pre>
496
# Config database (use postgresql; same as redmine):
497
<pre>
498
$ sudo -u postgres psql postgres
499 1
> CREATE ROLE nextcloud LOGIN ENCRYPTED PASSWORD 'password_goes_here' NOINHERIT VALID UNTIL 'infinity';
500 7
> CREATE DATABASE nextcloud WITH ENCODING='UTF8' OWNER=nextcloud;
501
Ctrl+D
502
</pre>
503 8
# Setup Apache config. Note the Nextcloud section is now included in @main.conf@ and should be commented out until this step is reached.
504 7
<pre>
505
$ sudo a2enmod rewrite headers env dir mime
506
$ sudo vim /etc/apache2/envvars
507
-------------------------------------------------------------------------------
508
## Uncomment the following line to use the system default locale instead:
509
510
. /etc/default/local here
511
-------------------------------------------------------------------------------
512
513
$ sudo systemctl restart apache2
514
</pre>
515 8
# Complete configuration by navigating to https://brutus.gleeze.com/nextcloud in a web browser and following the instructions.
516 7
517
h4. Other configuration
518
519
* To setup local storage: go to Apps > Disabled Apps > External Storage (click Enable)
520
* To setup pretty URLS:
521
 * https://docs.nextcloud.com/server/13/admin_manual/installation/source_installation.html#pretty-urls
522
** Edit @/var/www/nextcloud/config/config.php@:
523
<pre>
524
  'htaccess.RewriteBase' => '/nextcloud',
525
  'default_phone_region' => 'US',
526
  'maintenance_window_start' => 1,
527
</pre>
528
**  Edit @/etc/php/8.3/apache2/php.ini@ change line to:
529
<pre>
530
memory_limit = 1024M
531
opcache.interned_strings_buffer=64
532
opcache.revalidate_freq=60
533
</pre>
534
** Add missing indices:
535
<pre>
536
$ cd /var/www/nextcloud
537
$ sudo -u www-data php occ db:add-missing-indice
538
</pre>
539
** Restart apache:
540
<pre>
541
$ sudo systemctl restart apache2 
542
</pre>
543 10
544
h2. Misc
545
546
* Setup the display script:
547
 * Edit @~/.profile@ and add @./repo/software/misc/display.py@
548
* Setup checker script:
549
 * 
550
<pre>
551
$ sudo su
552
# crontab -e
553
</pre>
554
 add this line:
555
<pre>
556
0 * * * *       /home/dsorber/repo/software/misc/checker.py
557
</pre>