filmov
tv
Roll Your Own Google Docs with NextCloud and OnlyOffice in Docker
Показать описание
#Nextcloud #Docker #OnlyOffice #SelfHosted
What is Nextcloud?
What is ONLYOFFICE Document Server?
Installing Docker
01. Log into the Linux based device
02. Run the following commands in the terminal
# install prerequisites
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
# add docker gpg key
# add docker software repository
# install docker
# enable and start docker service
sudo systemctl enable docker && sudo systemctl start docker
# add the current user to the docker group
sudo usermod -aG docker $USER
# reauthenticate for the new group membership to take effect
su - $USER
Running Nextcloud and ONLYOFFICE
01. Now that Docker is installed, run the following commands to setup the Nextcloud Docker container and run it
# create working directories
mkdir ~/docker/mariadb -p && mkdir ~/docker/nextcloud -p && mkdir ~/docker/onlyoffice/{logs,data,lib,db} -p
# set owner of working directories
sudo chown "$USER":"$USER" /home/"$USER"/docker -R
# create nextcloud network
docker network create nextcloud
# run the mariadb docker container
# run the nextcloud docker container
docker run -d --name nextcloud --network nextcloud -p 8080:80 -e MYSQL_HOST=db -e MYSQL_USER=nextcloud_rw -e MYSQL_PASSWORD=N3xtCl0ud! -e MYSQL_DATABASE=nextcloud -v /home/$USER/docker/nextcloud:/var/www/html --restart=unless-stopped nextcloud:latest
# generate a 32 character random string
echo $(head /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9' | head -c 32)
# copy the output string to the clipboard
# run the onlyoffice document server container
docker run -d --name onlyoffice --network nextcloud -p 8081:80 -v ~/docker/onlyoffice/logs:/var/log/onlyoffice -v ~/docker/onlyoffice/data:/var/www/onlyoffice/Data -v ~/docker/onlyoffice/lib:/var/lib/onlyoffice -v ~/docker/onlyoffice/db:/var/lib/postgresql -e JWT_ENABLED=true -e JWT_SECRET='≪% random string from clipboard %≫' --restart=unless-stopped onlyoffice/documentserver
03. The Nextcloud setup screen should be displayed
04. Enter a username and password to create an admin account
05. Click the Install button
06. Choose to Install recommended apps or select Cancel to skip them
07. Welcome to Nextcloud
Setting Up ONLYOFFICE
01. Click the user avatar ≫ Apps
02. Select Office & text from the left navigation
03. Scroll down to find the OnlyOffice app ≫ Click Download and enable
04. After the download completes, click the user avatar ≫ Settings
05. Click ONLYOFFICE in the left navigation
07. Once Nextcloud has connected to the document server successfully, click on Files in the top navigation
08. Click the + icon ≫ Select New Document
09. Give the document a name and press Enter
10. The new document should load in a word processor inside the web browser and be ready for editing
### Connect with me and others ###
What is Nextcloud?
What is ONLYOFFICE Document Server?
Installing Docker
01. Log into the Linux based device
02. Run the following commands in the terminal
# install prerequisites
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
# add docker gpg key
# add docker software repository
# install docker
# enable and start docker service
sudo systemctl enable docker && sudo systemctl start docker
# add the current user to the docker group
sudo usermod -aG docker $USER
# reauthenticate for the new group membership to take effect
su - $USER
Running Nextcloud and ONLYOFFICE
01. Now that Docker is installed, run the following commands to setup the Nextcloud Docker container and run it
# create working directories
mkdir ~/docker/mariadb -p && mkdir ~/docker/nextcloud -p && mkdir ~/docker/onlyoffice/{logs,data,lib,db} -p
# set owner of working directories
sudo chown "$USER":"$USER" /home/"$USER"/docker -R
# create nextcloud network
docker network create nextcloud
# run the mariadb docker container
# run the nextcloud docker container
docker run -d --name nextcloud --network nextcloud -p 8080:80 -e MYSQL_HOST=db -e MYSQL_USER=nextcloud_rw -e MYSQL_PASSWORD=N3xtCl0ud! -e MYSQL_DATABASE=nextcloud -v /home/$USER/docker/nextcloud:/var/www/html --restart=unless-stopped nextcloud:latest
# generate a 32 character random string
echo $(head /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9' | head -c 32)
# copy the output string to the clipboard
# run the onlyoffice document server container
docker run -d --name onlyoffice --network nextcloud -p 8081:80 -v ~/docker/onlyoffice/logs:/var/log/onlyoffice -v ~/docker/onlyoffice/data:/var/www/onlyoffice/Data -v ~/docker/onlyoffice/lib:/var/lib/onlyoffice -v ~/docker/onlyoffice/db:/var/lib/postgresql -e JWT_ENABLED=true -e JWT_SECRET='≪% random string from clipboard %≫' --restart=unless-stopped onlyoffice/documentserver
03. The Nextcloud setup screen should be displayed
04. Enter a username and password to create an admin account
05. Click the Install button
06. Choose to Install recommended apps or select Cancel to skip them
07. Welcome to Nextcloud
Setting Up ONLYOFFICE
01. Click the user avatar ≫ Apps
02. Select Office & text from the left navigation
03. Scroll down to find the OnlyOffice app ≫ Click Download and enable
04. After the download completes, click the user avatar ≫ Settings
05. Click ONLYOFFICE in the left navigation
07. Once Nextcloud has connected to the document server successfully, click on Files in the top navigation
08. Click the + icon ≫ Select New Document
09. Give the document a name and press Enter
10. The new document should load in a word processor inside the web browser and be ready for editing
### Connect with me and others ###
Комментарии