aboutsummaryrefslogtreecommitdiff
path: root/content/blog/2022-03-23-nextcloud-on-ubuntu.md
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2024-04-29 14:18:55 -0500
committerChristian Cleberg <hello@cleberg.net>2024-04-29 14:18:55 -0500
commitfdd80eadcc2f147d0198d94b7b908764778184a2 (patch)
treefbec9522ea9aa13e8105efc413d2498c3c5b4cd6 /content/blog/2022-03-23-nextcloud-on-ubuntu.md
parentd6c80fdc1dea9ff242a4d3c7d3939d2727a8da56 (diff)
downloadcleberg.net-fdd80eadcc2f147d0198d94b7b908764778184a2.tar.gz
cleberg.net-fdd80eadcc2f147d0198d94b7b908764778184a2.tar.bz2
cleberg.net-fdd80eadcc2f147d0198d94b7b908764778184a2.zip
format line wrapping and fix escaped characters
Diffstat (limited to 'content/blog/2022-03-23-nextcloud-on-ubuntu.md')
-rw-r--r--content/blog/2022-03-23-nextcloud-on-ubuntu.md62
1 files changed, 27 insertions, 35 deletions
diff --git a/content/blog/2022-03-23-nextcloud-on-ubuntu.md b/content/blog/2022-03-23-nextcloud-on-ubuntu.md
index 66f6a82..93d539f 100644
--- a/content/blog/2022-03-23-nextcloud-on-ubuntu.md
+++ b/content/blog/2022-03-23-nextcloud-on-ubuntu.md
@@ -7,8 +7,8 @@ draft = false
# What is Nextcloud?
-[Nextcloud](https://nextcloud.com/) is a self-hosted solution for
-storage, communications, editing, calendar, contacts, and more.
+[Nextcloud](https://nextcloud.com/) is a self-hosted solution for storage,
+communications, editing, calendar, contacts, and more.
This tutorial assumes that you have an Ubuntu server and a domain name
configured to point toward the server.
@@ -25,16 +25,14 @@ sudo apt install php7.4-gmp php7.4-bcmath php-imagick php7.4-xml php7.4-zip
# Set Up MySQL
-Next, you will need to log in to MySQL as the `root` user of
-the machine.
+Next, you will need to log in to MySQL as the `root` user of the machine.
```sh
sudo mysql -uroot -p
```
-Once you\'ve logged in, you must create a new user so that Nextcloud can
-manage the database. You will also create a `nextcloud`
-database and assign privileges:
+Once you've logged in, you must create a new user so that Nextcloud can manage
+the database. You will also create a `nextcloud` database and assign privileges:
``` sql
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
@@ -47,14 +45,12 @@ quit;
# Download & Install Nextcloud
To download Nextcloud, go the [Nextcloud downloads
-page](https://nextcloud.com/install/#instructions-server), click on
-`Archive File` and right-click the big blue button to copy
-the link.
+page](https://nextcloud.com/install/#instructions-server), click on `Archive
+File` and right-click the big blue button to copy the link.
-Then, go to your server and enter the following commands to download,
-unzip, and move the files to your destination directory. This example
-uses `example.com` as the destination, but you can put it
-wherever you want to server your files from.
+Then, go to your server and enter the following commands to download, unzip, and
+move the files to your destination directory. This example uses `example.com` as
+the destination, but you can put it wherever you want to server your files from.
```sh
wget https://download.nextcloud.com/server/releases/nextcloud-23.0.3.zip
@@ -65,9 +61,9 @@ sudo cp -r nextcloud /var/www/example.com
# Configure the Apache Web Server
-Now that the database is set up and Nextcloud is installed, you need to
-set up the Apache configuration files to tell the server how to handle
-requests for `example.com/nextcloud`.
+Now that the database is set up and Nextcloud is installed, you need to set up
+the Apache configuration files to tell the server how to handle requests for
+`example.com/nextcloud`.
First, open the following file in the editor:
@@ -75,8 +71,8 @@ First, open the following file in the editor:
sudo nano /etc/apache2/sites-available/nextcloud.conf
```
-Once the editor is open, paste the following information in. Then, save
-and close the file.
+Once the editor is open, paste the following information in. Then, save and
+close the file.
``` config
<VirtualHost *:80>
@@ -111,16 +107,15 @@ Next, enable the Apache mods required by Nextcloud:
sudo a2enmod rewrite headers env dir mime
```
-Finally, restart Apache. If any errors arise, you must solve those
-before continuing.
+Finally, restart Apache. If any errors arise, you must solve those before
+continuing.
```sh
sudo systemctl restart apache2
```
For the app to work, you must have the correct file permissions on your
-`nextcloud` directory. Set the owner to be
-`www-data`:
+`nextcloud` directory. Set the owner to be `www-data`:
```sh
sudo chown -R www-data:www-data /var/www/example.com/nextcloud/
@@ -129,17 +124,15 @@ sudo chown -R www-data:www-data /var/www/example.com/nextcloud/
# DNS
If you do not have a static IP address, you will need to update your DNS
-settings (at your DNS provider) whenever your dynamic IP address
-changes.
+settings (at your DNS provider) whenever your dynamic IP address changes.
-For an example on how I do that with Cloudflare, see my other post:
-[Updating Dynamic DNS with Cloudflare
-API](../updating-dynamic-dns-with-cloudflare-api/)
+For an example on how I do that with Cloudflare, see my other post: [Updating
+Dynamic DNS with Cloudflare API](../updating-dynamic-dns-with-cloudflare-api/)
# Certbot
-If you want to serve Nextcloud from HTTPS rather than plain HTTP, use
-the following commands to issue Let\'s Encrypt SSL certificates:
+If you want to serve Nextcloud from HTTPS rather than plain HTTP, use the
+following commands to issue Let's Encrypt SSL certificates:
```sh
sudo apt install snapd
@@ -152,12 +145,11 @@ sudo certbot --apache
# Results
-VoilĂ ! You\'re all done and should be able to access Nextcloud from your
-domain or IP address.
+VoilĂ ! You're all done and should be able to access Nextcloud from your domain
+or IP address.
-See the screenshots below for the dashboard and a settings page on my
-instance of Nextcloud, using the `Breeze Dark` theme I
-installed from the Apps page.
+See the screenshots below for the dashboard and a settings page on my instance
+of Nextcloud, using the `Breeze Dark` theme I installed from the Apps page.
![Nextcloud
Dashboard](https://img.cleberg.net/blog/20220323-installing-nextcloud-on-ubuntu/nextcloud_dashboard.png)