Просмотр исходного кода

0154: Roll Your Own Google Docs with NextCloud and OnlyOffice in Docker

i12bretro 2 лет назад
Родитель
Сommit
a011da512c
1 измененных файлов с 102 добавлено и 0 удалено
  1. 102 0
      0154.html

+ 102 - 0
0154.html

@@ -0,0 +1,102 @@
+    <!DOCTYPE html>
+    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>Roll Your Own Google Docs with NextCloud and OnlyOffice in Docker</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <meta charset="UTF-8">
+        <meta name="keywords" content="Browser Based,Docker Made Easy,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Cloud Solution,Container,Containerization,Docker,Docker Container,Docker Host,Docker How To,Docker Installation Tutorial,Docker Made Simple,OnlyOffice,Nextcloud,Ubuntu,Self-Hosted Google Docs Alternative,Linux,MariaDB,Free Software,Docker Simplified,How To,Tutorial,i12bretro">
+        <meta name="author" content="i12bretro">
+        <meta name="description" content="Roll Your Own Google Docs with NextCloud and OnlyOffice in Docker">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="revised" content="08/29/2022 08:42:41 AM" />
+				          <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
+				  <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
+				        <script type="text/javascript" src="includes/js/steps.js"></script>
+        <link href="css/steps.css" rel="stylesheet" type="text/css" />
+      </head>
+      <body>
+        <div id="gridContainer">
+          <div class="topMargin"></div>
+          <div id="listName" class="topMargin">
+            <h1>Roll Your Own Google Docs with NextCloud and OnlyOffice in Docker</h1>
+          </div>
+          <div></div>
+          <div id="content">
+          <h2>What is Nextcloud?</h2>
+
+<blockquote><em>Nextcloud is a suite of client-server software for creating and using file hosting services. It is enterprise-ready with comprehensive support options. Being free and open-source software, anyone is allowed to install and operate it on their own private server devices. -<a href="https://en.wikipedia.org/wiki/Nextcloud" target="_blank">https://en.wikipedia.org/wiki/Nextcloud</a></em></blockquote>
+
+<h2>What is ONLYOFFICE Document Server?</h2>
+
+<blockquote><em>ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time. -<a href="https://github.com/ONLYOFFICE/DocumentServer" target="_blank">https://github.com/ONLYOFFICE/DocumentServer</a></em></blockquote>
+
+<h2>Installing Docker</h2>
+
+<ol>
+	<li>Log into the Linux based device</li>
+	<li>Run the following commands in the terminal
+	<div class="codeBlock"># install prerequisites<br />
+	sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y<br />
+	# add docker gpg key<br />
+	curl -fsSL https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release)/gpg | sudo apt-key add -<br />
+	# add docker software repository<br />
+	sudo add-apt-repository &quot;deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release) $(lsb_release -cs) stable&quot;<br />
+	# install docker<br />
+	sudo apt install docker-ce docker-compose containerd.io -y<br />
+	# enable and start docker service<br />
+	sudo systemctl enable docker &amp;&amp; sudo systemctl start docker<br />
+	# add the current user to the docker group<br />
+	sudo usermod -aG docker $USER<br />
+	# reauthenticate for the new group membership to take effect<br />
+	su - $USER</div>
+	</li>
+</ol>
+
+<h2>Running Nextcloud and ONLYOFFICE</h2>
+
+<ol>
+	<li>Now that Docker is installed, run the following commands to setup the Nextcloud Docker container and run it
+	<div class="codeBlock"># create working directories<br />
+	mkdir ~/docker/mariadb -p &amp;&amp; mkdir ~/docker/nextcloud -p &amp;&amp; mkdir ~/docker/onlyoffice/{logs,data,lib,db} -p<br />
+	# set owner of working directories<br />
+	sudo chown &quot;$USER&quot;:&quot;$USER&quot; /home/&quot;$USER&quot;/docker -R<br />
+	# create nextcloud network<br />
+	docker network create nextcloud<br />
+	# run the mariadb docker container<br />
+	docker run -d --name mariadb --network nextcloud --network-alias db -e MYSQL_ROOT_PASSWORD=r00tp@ss -e MYSQL_USER=nextcloud_rw -e MYSQL_PASSWORD=N3xtCl0ud! -e MYSQL_DATABASE=nextcloud -v /home/$USER/docker/mariadb:/var/lib/mysql --restart=unless-stopped mariadb:latest<br />
+	# run the nextcloud docker container<br />
+	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<br />
+	# generate a 32 character random string<br />
+	echo $(head /dev/urandom | LC_ALL=C tr -dc &#39;A-Za-z0-9&#39; | head -c 32)<br />
+	# copy the output string to the clipboard<br />
+	# run the onlyoffice document server container<br />
+	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=&#39;&lt;% random string from clipboard %&gt;&#39; --restart=unless-stopped onlyoffice/documentserver</div>
+	</li>
+	<li>Open a web browser and navigate to http://DNSorIP:8080</li>
+	<li>The Nextcloud setup screen should be displayed</li>
+	<li>Enter a username and password to create an admin account</li>
+	<li>Click the Install button</li>
+	<li>Choose to Install recommended apps or select Cancel to skip them</li>
+	<li>Welcome to Nextcloud</li>
+</ol>
+
+<h2>Setting Up ONLYOFFICE</h2>
+
+<ol>
+	<li>Click the user avatar &gt; Apps</li>
+	<li>Select Office &amp; text from the left navigation</li>
+	<li>Scroll down to find the OnlyOffice app &gt; Click Download and enable</li>
+	<li>After the download completes, click the user avatar &gt; Settings</li>
+	<li>Click ONLYOFFICE in the left navigation</li>
+	<li>Enter the document server URL (http://DNSorIP:8081) in the Document Editing Service address field and paste the JWT_SECRET generated earlier into the Secret Key field &gt; Click Save</li>
+	<li>Once Nextcloud has connected to the document server successfully, click on Files in the top navigation</li>
+	<li>Click the + icon &gt; Select New Document</li>
+	<li>Give the document a name and press Enter</li>
+	<li>The new document should load in a word processor inside the web browser and be ready for editing</li>
+</ol>
+
+<p>Documentation: <a href="https://hub.docker.com/_/nextcloud" target="_blank">https://hub.docker.com/_/nextcloud</a>, <a href="https://hub.docker.com/r/onlyoffice/documentserver" target="_blank">https://hub.docker.com/r/onlyoffice/documentserver</a></p>          </div>
+        </div>
+      </body>
+    </html>
+