# Could crystal static build to single binary?

**URL:** <https://forum.crystal-lang.org/t/could-crystal-static-build-to-single-binary/561>\
**Category:** Community\
**Created:** [March 18, 2019, 6:53am UTC](https://forum.crystal-lang.org/t/could-crystal-static-build-to-single-binary/561 "2019-03-18T06:53:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![vlazar](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/vlazar/32/31_2.png) [@vlazar](https://forum.crystal-lang.org/u/vlazar)\
**Post date:** [March 18, 2019, 10:31am UTC](https://forum.crystal-lang.org/t/could-crystal-static-build-to-single-binary/561/2 "2019-03-18T10:31:50Z")

</div>

Yes, see docs [Redirecting...](https://crystal-lang.org/reference/using_the_compiler/#creating-a-statically-linked-executable)

And this answer

> [@Executable wont run on computer without libraries installed](https://forum.crystal-lang.org/t/executable-wont-run-on-computer-without-libraries-installed/408/2):
>
> You can build statically linked programs in Crystal but now it only works on Alpine Linux. You can install Docker for Mac and use [https://hub.docker.com/r/jrei/crystal-alpine](https://hub.docker.com/r/jrei/crystal-alpine) for building statically linked apps. Basically in addition to Crystal itself you install all required libraries in Docker [https://github.com/j8r/dockerfiles/blob/master/crystal-alpine/Dockerfile#L6-L22](https://github.com/j8r/dockerfiles/blob/master/crystal-alpine/Dockerfile#L6-L22) Then use crystal build --static ... to build statically linked application. After that you can copy your single binary t…

---

_[View the full topic](https://forum.crystal-lang.org/t/could-crystal-static-build-to-single-binary/561)._
