mirror of
https://github.com/pterodactyl/documentation.git
synced 2025-12-10 10:44:43 -06:00
1 line
6.0 KiB
JavaScript
1 line
6.0 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{277:function(t,e,o){t.exports=o.p+"assets/img/gmod_mount_example.16b990a7.png"},308:function(t,e,o){"use strict";o.r(e);var n=o(15),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"using-mounts"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#using-mounts"}},[t._v("#")]),t._v(" Using Mounts")]),t._v(" "),e("p",[t._v("Mounts is a feature that allows administrators to mount other directories from the host file-system into a Server's container.")]),t._v(" "),e("h2",{attrs:{id:"wings-configuration"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#wings-configuration"}},[t._v("#")]),t._v(" Wings Configuration")]),t._v(" "),e("p",[t._v("For security reasons it is not possible to mount directories on a node by default. Directories that should be mountable have to be specified explicitly in the Wings configuration.")]),t._v(" "),e("p",[t._v("In the Wings configuration file ("),e("code",[t._v("/etc/pterodactyl/config.yml")]),t._v(") the "),e("code",[t._v("allowed_mounts")]),t._v(" field is used to list mountable directories. The listed directories and all their subdirectories can be mounted.")]),t._v(" "),e("div",{staticClass:"language-yml extra-class"},[e("pre",{pre:!0,attrs:{class:"language-yml"}},[e("code",[e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("allowed_mounts")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" /example\n")])])]),e("p",[t._v("You have to restart Wings to apply new changes to your Wings config.")]),t._v(" "),e("h2",{attrs:{id:"panel-configuration"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#panel-configuration"}},[t._v("#")]),t._v(" Panel Configuration")]),t._v(" "),e("p",[t._v("You have to configure mounts in admin Panel in order to use them with your servers. They consist of a source pad on the node and a target path where it will be mounted in the container.")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Path in the container")]),t._v(" "),e("p",[t._v("Mounts can be mounted to or inside of "),e("code",[t._v("/home/container")]),t._v(" or any subdirectory of it. You can cross-mount servers such as Server A's directory into Server B.\nKeep in mind that the folder you want to mount into needs to exist for the mount to work.")])]),t._v(" "),e("h3",{attrs:{id:"creating-a-mount"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#creating-a-mount"}},[t._v("#")]),t._v(" Creating a Mount")]),t._v(" "),e("ol",[e("li",[t._v("In the admin Panel go to "),e("strong",[t._v("Mounts")]),t._v(".")]),t._v(" "),e("li",[t._v("Create a new mount.")]),t._v(" "),e("li",[t._v("Fill in the details as required.\n"),e("ul",[e("li",[e("strong",[t._v("Name")]),t._v(": Name for your mount.")]),t._v(" "),e("li",[e("strong",[t._v("Description")]),t._v(": Description for your mount.")]),t._v(" "),e("li",[e("strong",[t._v("Source")]),t._v(": The absolute path to the folder or files on the Node machine.")]),t._v(" "),e("li",[e("strong",[t._v("Target")]),t._v(": The absolute path where the mount will be placed inside of your server, can "),e("strong",[t._v("not")]),t._v(" include "),e("code",[t._v("/home/container")]),t._v(" in the path.")]),t._v(" "),e("li",[e("strong",[t._v("Read Only")]),t._v(": Whether the mount will be read-only for the servers using it.")]),t._v(" "),e("li",[e("strong",[t._v("User Mountable")]),t._v(": Whether to allow users to self mount this mount.")])])]),t._v(" "),e("li",[t._v("After creating the mount, you are required to add both "),e("strong",[t._v("Eggs")]),t._v(" and "),e("strong",[t._v("Nodes")]),t._v(" that this mount may be used on.")])]),t._v(" "),e("div",{staticClass:"custom-block warning"},[e("p",{staticClass:"custom-block-title"},[t._v("Mounts used by multiple servers")]),t._v(" "),e("p",[t._v("All servers using the same mounts will "),e("strong",[t._v("only")]),t._v(" share their contents when they are on the same node. Mounts are not synchronized between nodes.")])]),t._v(" "),e("h3",{attrs:{id:"assigning-a-mount-to-a-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#assigning-a-mount-to-a-server"}},[t._v("#")]),t._v(" Assigning a Mount to a Server")]),t._v(" "),e("ol",[e("li",[t._v("In the admin Panel navigate to the server you would like to use a mount with")]),t._v(" "),e("li",[t._v("Go to the mounts page")]),t._v(" "),e("li",[t._v("Click the "),e("strong",[t._v("+")]),t._v(" button")]),t._v(" "),e("li",[t._v("Restart the server")])]),t._v(" "),e("p",[t._v("The files of the mount should become available in the target path in the container. You can temporarily change your server startup command to "),e("code",[t._v("ls <mount target>")]),t._v(", which should output the contents of the mount if configured correctly.")]),t._v(" "),e("div",{staticClass:"custom-block warning"},[e("p",{staticClass:"custom-block-title"},[t._v("Mounts cannot be accessed")]),t._v(" "),e("p",[t._v("Mounts do not appear in the Panel's file manager, nor are they accessible via SFTP. However, the server itself will be able to see and use the mounts.")])]),t._v(" "),e("h3",{attrs:{id:"example-mount"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#example-mount"}},[t._v("#")]),t._v(" Example Mount")]),t._v(" "),e("p",[t._v("The example mount below is stored in the path "),e("code",[t._v("/var/lib/pterodactyl/mounts")]),t._v(", which we add to the Wings "),e("code",[t._v("config.yml")])]),t._v(" "),e("div",{staticClass:"language-yml extra-class"},[e("pre",{pre:!0,attrs:{class:"language-yml"}},[e("code",[e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("allowed_mounts")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" /var/lib/pterodactyl/mounts\n")])])]),e("p",[e("img",{attrs:{src:o(277),alt:""}})])])}),[],!1,null,null,null);e.default=s.exports}}]); |