helpcenter/Web/Controls/Help/Server/Document/Podman/Podman.ascx

275 lines
16 KiB
Plaintext

<%@ Control Language="C#" Inherits="BaseContentUserControls"%>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Running ONLYOFFICE Docs with Podman on Fedora";
MetaKeyWords = "";
MetaDescription = "";
var guides = new GuidesModel();
guides.TitleVideo = "How to deploy ONLYOFFICE Docs with Podman on Fedora";
(Page as BasePage).Guides = guides;
}
</script>
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Running ONLYOFFICE Docs <%= ((BasePage)Page).EditionVersion %> with Podman on Fedora</h1>
<cc:localizecontent runat="Server" controlname="~/Controls/Help/VariousControls/Versions/DocumentServer/DocumentServerDocker_Current.ascx" />
<div class="keyword_block">
<ul>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/local-server/local-server.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/server-version/server-version.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/install-ONLYOFFICE/install-ONLYOFFICE.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/document-server/document-server.ascx" /></li>
<li class="enterprise_display">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/docs-enterprise/docs-enterprise.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/linux-version/linux-version.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/podman-version/podman-version.ascx" /></li>
</ul>
</div>
<div class="video_ground video_trips">
<h2 id="introduction">Introduction</h2>
<div class="block_of_step">
<div class="video_text">
<p><b><%= ((BasePage)Page).EditionVersion %></b> allows you to install <b>ONLYOFFICE Docs</b> on your local server and integrate the online editors with <span class="developer_display">your web application</span><span class="community_enterprise_display">the <a href="<%=VirtualPathUtility.ToAbsolute("~/installation/groups-index.aspx")%>">ONLYOFFICE collaboration platform</a> or <a href="<%=VirtualPathUtility.ToAbsolute("~/integration.aspx")%>">other popular systems</a></span>.</p>
<p><b>ONLYOFFICE Docs</b> is an online office suite that comprises viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats (.docx, .xlsx, .pptx) and enables collaborative editing in real time.</p>
<p><b>Functionality</b></p>
<ul>
<li>Document Editor</li>
<li>Spreadsheet Editor</li>
<li>Presentation Editor</li>
<li>Mobile web viewers</li>
<li class="developer_enterprise_display">Mobile web editors</li>
<li>Collaborative editing</li>
<li>Hieroglyph support</li>
<li>Support for all the popular formats: DOC, DOCX, TXT, ODT, RTF, ODP, EPUB, ODS, XLS, XLSX, CSV, PPTX, HTML</li>
</ul>
<div class="developer_enterprise_display">
<p><b>Pro features</b></p>
<ul>
<li>Document comparison</li>
<li>Content Controls insertion</li>
<li>Sheet Views</li>
</ul>
</div>
<p>See the <a target="_blank" href="https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-document-server-editions">detailed list of features</a> available for <b>ONLYOFFICE Docs</b> <b><%= ((BasePage)Page).EditionVersion %></b>.</p>
<div class="community_enterprise_display">
<p>By integrating it with <b>ONLYOFFICE Groups</b>, you will be able to:</p>
<ul>
<li>share files;</li>
<li>manage access rights for documents;</li>
<li>embed documents on a website;</li>
<li>view and edit files stored on Drive, Box, Dropbox, OneDrive, OwnCloud connected to ONLYOFFICE.</li>
</ul>
</div>
<p>This guide will show you how to install the Linux version of <b>ONLYOFFICE Docs</b> <b><%= ((BasePage)Page).EditionVersion %></b> with Podman on Fedora. <a target="_blank" href="https://podman.io/">Podman</a> is a tool for running and managing Linux containers.</p>
</div>
</div>
</div>
<h2 id="SystemRequirements">System requirements</h2>
<div class="block_of_step">
<div class="screen_text">
<ul>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/SystemRequirements/SysReqs_CPU/SysReqs_CPU.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/SystemRequirements/SysReqs_RAM1/SysReqs_RAM1.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/SystemRequirements/SysReqs_HDD3/SysReqs_HDD3.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/SystemRequirements/SysReqs_Add_Hard/SysReqs_Add_Hard.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/SystemRequirements/SysReqs_OS2/SysReqs_OS2.ascx" /></li>
</ul>
</div>
</div>
<h2 id="Installing">Installing ONLYOFFICE Docs</h2>
<div class="block_of_step">
<div class="screen_text">
<div class="notehelp">You need the latest Podman version installed. If you do not have it, please see the <a target="_blank" href="https://podman.io/getting-started/installation">Installation section</a> on the Podman website to learn how to get it.</div>
<h3>Running ONLYOFFICE Docs with Podman as a root user</h3>
<p>Create new folders for storing container data on your host machine:</p>
<pre><code>sudo mkdir -p /app/onlyoffice/DocumentServer/logs \
/app/onlyoffice/DocumentServer/data \
/app/onlyoffice/DocumentServer/lib \
/app/onlyoffice/DocumentServer/db
</code></pre>
<p>Now mount these directories via Podman and run ONLYOFFICE Docs using the following command:</p>
<div class="community_display">
<pre><code>sudo podman run -i -t -d -p 80:80 -p 443:443 --restart=always \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z \
-u root onlyoffice/documentserver:latest
</code></pre>
</div>
<div class="enterprise_display">
<pre><code>sudo podman run -i -t -d -p 80:80 -p 443:443 --restart=always \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z \
-u root onlyoffice/documentserver-ee:latest
</code></pre>
</div>
<div class="developer_display">
<pre><code>sudo podman run -i -t -d -p 80:80 -p 443:443 --restart=always \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z \
-u root onlyoffice/documentserver-de:latest
</code></pre>
</div>
<div class="note">Please note that rootless deployment is NOT recommended for ONLYOFFICE Docs.</div>
<p>To check if ONLYOFFICE Docs is working correctly, run this command:</p>
<pre><code>sudo podman exec $(sudo podman ps -q) sudo supervisorctl start ds:example</code></pre>
<p>Then open a browser, go to <code>http://localhost/welcome</code>, and click the <b>GO TO TEST EXAMPLE</b> button. You will be directed to a page where you can create documents with sample content.</p>
<%--<h3>Running ONLYOFFICE Docs on podman without root permissions (not recommended)</h3>
<p>Create new user:</p>
<pre><code>$ sudo adduser test
$ sudo passwd test
$ sudo usermod -a -G wheel test
$ su - test
</code></pre>
<p>Create new folders for storing container data on your host machine:</p>
<pre><code>$ sudo mkdir -p /app/onlyoffice/DocumentServer/logs \
/app/onlyoffice/DocumentServer/data \
/app/onlyoffice/DocumentServer/lib \
/app/onlyoffice/DocumentServer/db
</code></pre>
<p>Execute the following command:</p>
<pre><code>$ sudo chown -R test:test /app
</code></pre>
<p>To remove WARN messages, create the <code>/etc/containers/containers.conf</code> file with the following contents:</p>
<pre><code>[engine]
cgroup_manager = "cgroupfs"
events_logger = "file"
</code></pre>
<p>Run the ONLYOFFICE Docs container using the following command:</p>
<div class="community_display">
<pre><code>$ podman run -i -t -d -p 8003:80 -p 4433:443 --restart=always \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z onlyoffice/documentserver:6.2.0.123
</code></pre>
</div>
<div class="enterprise_display">
<pre><code>$ podman run -i -t -d -p 8003:80 -p 4433:443 --restart=always \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z onlyoffice/documentserver-ee:6.2.0.123
</code></pre>
</div>
<div class="developer_display">
<pre><code>$ podman run -i -t -d -p 8003:80 -p 4433:443 --restart=always \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z onlyoffice/documentserver-de:6.2.0.123
</code></pre>
</div>
<div class="notehelp">
By default, ONLYOFFICE Docs listens to the incoming connections using port 80. In the command above, 8003 and 4430 ports are specified for <b>ONLYOFFICE Docs</b> as it's not possible to use ports from 0 to 1024 without root permissions on <a target="_blank" href="https://podman.io/getting-started/network#publishing-ports">podman</a>.
</div>
</div>--%>
</div>
<h2 id="RunningHTTPS">Switching ONLYOFFICE Docs to HTTPS</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Install the <code>onlyoffice.key</code> and <code>onlyoffice.crt</code> certificates on your server and restart the ONLYOFFICE Docs container using the following commands:</p>
<pre><code>sudo mkdir /app/onlyoffice/DocumentServer/data/certs
sudo cp onlyoffice.crt /app/onlyoffice/DocumentServer/data/certs/
sudo cp onlyoffice.key /app/onlyoffice/DocumentServer/data/certs/
sudo chown -R 100108:100111 /app/onlyoffice/DocumentServer/data/certs/
sudo podman restart {container_id}
</code></pre>
<div class="notehelp">
When copying certificates without entering to the container, you need to use <code>sudo</code> (as the container was launched by a non-root user), and then change the file owner to the <code>100108 100111</code> user (this is the user subuid ds in the container).
</div>
</div>
</div>
<h2 id="Imagepodman">Building the ONLYOFFICE Docs image on Podman as a root user</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Clone the ONLYOFFICE Docs repository, go to the <code>Docker-DocumentServer</code> folder and build the image using the following commands:</p>
<pre><code>git clone https://github.com/ONLYOFFICE/Docker-DocumentServer.git
cd Docker-DocumentServer/
sudo podman build --tag onlyofficeds:podman -f ./Dockerfile
</code></pre>
</div>
</div>
<h2 id="Imagebuildah">Building the ONLYOFFICE Docs image from the Dockerfile with Buildah as a root user</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Use the following command:</p>
<pre><code>buildah bud --tag onlyofficeds:buildah -f ./Dockerfile
</code></pre>
</div>
<div class="notehelp">
Buildah supports building images without root permissions, but building the ONLYOFFICE Docs image from the <a target="_blank" href="https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/Dockerfile">Dockerfile</a> with Buildah works with root access only.
</div>
</div>
<h2 id="Runninglocal">Running the ONLYOFFICE Docs container from a local directory without root permissions</h2>
<div class="block_of_step">
<div class="screen_text">
<p>After building the ONLYOFFICE Docs image with Buildah as described above, run the ONLYOFFICE Docs container using the following command:</p>
<pre><code>podman run -i -t -d -p 8003:80 -p 4430:443 --restart=always \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z localhost/onlyofficeds:buildah
</code></pre>
</div>
</div>
<div class="developer_enterprise_display">
<h2 id="Registering">Registering your <span class="developer_display">Developer Edition</span><span class="enterprise_display">Enterprise Edition</span> version</h2>
<div class="block_of_step">
<div class="screen_text">
<p>If you bought <b class="developer_display">Developer Edition</b><b class="enterprise_display">Enterprise Edition</b> and received the <b>license.lic</b> file, you can place it to your installation to obtain the full version of the software.</p>
<p>When you are using the Podman container, the <b>license.lic</b> file can be placed to any folder (e.g. <code>/app/onlyoffice/DocumentServer/data/license.lic</code>), but you will need to mount this folder when the container starts:</p>
<div class="enterprise_display">
<pre><code>podman run -i -t -d -p 80:80 -p 443:443 --restart=always \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z \
-u root onlyoffice/documentserver-ee:latest
</code></pre>
</div>
<div class="developer_display">
<pre><code>podman run -i -t -d -p 80:80 -p 443:443 --restart=always \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z \
-u root onlyoffice/documentserver-de:latest
</code></pre>
</div>
<p>After that, your version of <b class="developer_display">Developer Edition</b><b class="enterprise_display">Enterprise Edition</b> will become registered and full-featured.</p>
</div>
</div>
</div>
</div>
</div>