# DOCKER | Moving from 'snap' to 'apt'

**URL:** <https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174>\
**Category:** FAQ\
**Tags:** docker, snap, linux, hardware\
**Created:** [January 28, 2023, 4:16pm UTC](https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174 "2023-01-28T16:16:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ItsHass](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/itshass/32/1122_2.png) [@ItsHass](https://forum.storj.io/u/ItsHass)\
**Post date:** [January 28, 2023, 4:16pm UTC](https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174/1 "2023-01-28T16:16:42Z")

</div>

Hi fellow node operators…

I have found that one of my nodes is running in ‘snap’

How can I easily move this over to ‘apt’ ?

Anyone done this - can give me some guidance / pointers

Cheers  
Hass

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [January 29, 2023, 5:00am UTC](https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174/2 "2023-01-29T05:00:28Z")

</div>

Hi @ItsHass,  
If it’s working normally, you may leave it as is - this is not needed to fix what is not broken. But if you have issues, then this is should not be so hard.

1. Stop and remove your storagenode container

```auto
docker stop -t 300 storagenode
docker rm storagenode

```

1. Remove the snap version of the docker package

```auto
sudo snap remove docker

```

1. Follow docker guide to install the apt version of the docker package: [Docker Engine installation overview | Docker Documentation](https://docs.docker.com/engine/install/)

When you finish and docker will work, you can start the storagenode container with the same full `docker run` command with all your parameters as before.  
Please do not run the SETUP step for the existing node!

---

<div class="post-metadata">

**Author:** ![KernelPanick](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kernelpanick/32/62_2.png) [@KernelPanick](https://forum.storj.io/u/KernelPanick)\
**Post date:** [January 29, 2023, 4:52pm UTC](https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174/3 "2023-01-29T16:52:22Z")

</div>

docker in snap may provide better security on the host. If its working may want to stick with it.

---

<div class="post-metadata">

**Author:** ![Walter1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/walter1/32/7825_2.png) [@Walter1](https://forum.storj.io/u/Walter1)\
**Post date:** [January 29, 2023, 8:49pm UTC](https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174/4 "2023-01-29T20:49:29Z")

</div>

Hey Alexey,

what exactly does

docker stop -t 300 storagenode

do? I am always just using the stop without -t and am wondering now.

---

<div class="post-metadata">

**Author:** ![Pac](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/pac/32/6053_2.png) [@Pac](https://forum.storj.io/u/Pac)\
**Post date:** [January 29, 2023, 9:15pm UTC](https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174/5 "2023-01-29T21:15:53Z")

</div>

This instructs docker to wait for up to 300 seconds for the app running within the container to exit, before killing it.

The default value docker uses is way lower than that (10 seconds I believe) which may not be enough for the node software to shut down cleanly if it’s busy.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [January 30, 2023, 4:34am UTC](https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174/6 "2023-01-30T04:34:31Z")

</div>

It should not be a problem, if you did not specify the grace timeout before the container will be killed, because if you used a `docker run` command from [the guide](https://docs.storj.io/node/setup/cli/storage-node#1wH-F) - it includes this grace timeout for the container.

---

<div class="post-metadata">

**Author:** ![ItsHass](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/itshass/32/1122_2.png) [@ItsHass](https://forum.storj.io/u/ItsHass)\
**Post date:** [January 30, 2023, 2:12pm UTC](https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174/7 "2023-01-30T14:12:28Z")

</div>

> [@KernelPanick](#):
>
> docker in snap may provide better security on the host. If its working may want to stick with it.

I’m trying to use the Docker API , i think usually on port :4342 - I don’t seem to be able to do this on snap, but i’ve done this on apt docker without any issues following a guide

Do you have any knowledge of that ?

Cheers  
Hass

---

<div class="post-metadata">

**Author:** ![KernelPanick](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kernelpanick/32/62_2.png) [@KernelPanick](https://forum.storj.io/u/KernelPanick)\
**Post date:** [January 31, 2023, 3:23am UTC](https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174/8 "2023-01-31T03:23:00Z")

</div>

Because docker snap is more contained and does not share kernelspace i believe you have to expose the port manually to docker.sock. I do not have experience with this, but perhaps this may help. This of course adds some exposure to your host that may bring some of the similar exposure pathways that apt docker does. It’s still probably more secure.

> <https://superuser.com/questions/1431826/expose-api-over-tcp-of-snap-installed-docker-on-ubuntu-18-04>

---

<div class="post-metadata">

**Author:** ![ItsHass](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/itshass/32/1122_2.png) [@ItsHass](https://forum.storj.io/u/ItsHass)\
**Post date:** [January 31, 2023, 8:49am UTC](https://forum.storj.io/t/docker-moving-from-snap-to-apt/21174/9 "2023-01-31T08:49:47Z")

</div>

cheers for this - i will give it a try
