stuff/containers/Bastille/Nextcloud/Nextcloud.md
Moni Ghaoui 47aa1a3484 FC
2025-04-14 19:51:40 +02:00

73 lines
No EOL
1.6 KiB
Markdown

# Nextcloud
My standard setup:
```sh
bastille create alcatraz 14.2-RELEASE 192.168.1.201 em0
bastille mount alcatraz /var/cache/pkg/ /var/cache/pkg/ nullfs rw 0 0
bastille pkg alcatraz install -y tmux git neovim sudo
```
## Trying it my way
```sh
bastille pkg alcatraz install -y php83 nextcloud-php83 php83-pecl-APCu php83-extensions sd nginx
```
Repeat the message:
```sh
bastille pkg alcatraz info -D www/nextcloud
```
Additional:
```sh
bastille cmd alcatraz cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
bastille cmd alcatraz sd 'memory_limit = 128M' 'memory_limit = -1' /usr/local/etc/php.ini
```
We need to go in and out of the console for this one:
```sh
bastille console alcatraz
echo 'apc.enable_cli = 1' >> /usr/local/etc/php.ini
exit
```
Follow the instructions for [MariaDB](../MariaDB.md).
Now run the installer
```sh
bastille cmd alcatraz sudo -u www php /usr/local/www/nextcloud/occ maintenance:install \
--database='mysql' --database-host='127.0.0.1' --database-name='nextcloud' \
--database-user='nextcloud' --database-pass='1234sys!' \
--admin-user='admin' --admin-pass='1234sys!'
```
You should see:
```
[alcatraz]:
Nextcloud was successfully installed
[alcatraz]: 0
```
Edit nginx.conf for nextcloud.
```sh
bastille cmd alcatraz nvim /usr/local/etc/nginx/nginx.conf
```
Use [this file](./nginx.conf).
It's based on: https://docs.nextcloud.com/server/stable/admin_manual/installation/nginx.html#nextcloud-in-the-webroot-of-nginx
```sh
bastille service alcatraz php_fpm enable
bastille service alcatraz php_fpm start
bastille service alcatraz nginx enable
bastille service alcatraz nginx start
```