Skip to content

Windows One-Liner Installation #315

Closed

Description

@eldadfux

Our installation command for getting started with Appwrite quickly doesn't work on Windows terminal.

I don't have any Windows machine to test or fix this, but this has been reported by a few users.

We need help converting this line to something that can also work for Windows users:

docker run -it --rm \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume "$(pwd)"/appwrite:/install/appwrite:rw \
    -e version=0.5.3 \
    appwrite/install

Activity

  1. added
    bug
    good first issue
    hacktoberfest
    help wanted
    on Apr 30, 2020
  2. eldadfux commented on May 8, 2020

    @eldadfux
    MemberAuthor

    I was googling around for a Windows alternative command for our installation script, would be great if someone with a windows machine could help validate the attempted solution:

    docker run -it --rm ^
        --volume //var/run/docker.sock:/var/run/docker.sock ^
        --volume "%cd%"/appwrite:/install/appwrite:rw ^
        -e version=0.5.3 ^
        appwrite/install
  3. TorstenDittmann commented on May 9, 2020

    @TorstenDittmann
    Contributor

    I can try this on Monday 👍

  4. eldadfux commented on May 9, 2020

    @eldadfux
    MemberAuthor
  5. TorstenDittmann commented on May 11, 2020

    @TorstenDittmann
    Contributor

    Seems like I can't use Docker on my Windows Machine due to having Windows 10 Home and that's why I am lacking Hyper-V support...

  6. dor272 commented on May 12, 2020

    @dor272

    Hi,
    It still seems to not work:

    > docker run -it --rm ^
    >>     --volume //var/run/docker.sock:/var/run/docker.sock ^
    >>     --volume "%cd%"/appwrite:/install/appwrite:rw ^
    >>     -e version=0.5.3 ^
    >>     appwrite/install
    At line:2 char:7
    +     --volume //var/run/docker.sock:/var/run/docker.sock ^
    +       ~
    Missing expression after unary operator '--'.
    At line:2 char:7
    +     --volume //var/run/docker.sock:/var/run/docker.sock ^
    +       ~~~~~~
    Unexpected token 'volume' in expression or statement.
    At line:3 char:7
    +     --volume "%cd%"/appwrite:/install/appwrite:rw ^
    +       ~
    Missing expression after unary operator '--'.
    At line:3 char:7
    +     --volume "%cd%"/appwrite:/install/appwrite:rw ^
    +       ~~~~~~
    Unexpected token 'volume' in expression or statement.
        + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
        + FullyQualifiedErrorId : MissingExpressionAfterOperator
    
  7. RizkyRajitha commented on May 17, 2020

    @RizkyRajitha
    Contributor

    i think replacing backslash with back tick will work in windows powershell
    and for windows cmd replacing / with ^ works

    for powershell

    docker run -it --rm `
        --volume /var/run/docker.sock:/var/run/docker.sock `
        --volume "$(pwd)"/appwrite:/install/appwrite:rw `
        -e version=0.5.3 `
        appwrite/install
    

    appwritepowershell

    https://stackoverflow.com/questions/3235850/how-to-enter-a-multi-line-command

    for windows cmd

    docker run -it --rm ^
        --volume //var/run/docker.sock:/var/run/docker.sock ^
        --volume "%cd%"/appwrite:/install/appwrite:rw ^
        -e version=0.5.3 ^
        appwrite/install
    

    appwritewcmd

    https://stackoverflow.com/questions/605686/windows-how-to-specify-multiline-command-on-command-prompt

  8. eldadfux commented on May 18, 2020

    @eldadfux
    MemberAuthor

    @RizkyRajitha can you confirm both syntax work before I can update our docs? In your screenshot it seems the powershell command throws an error.

    @dor272 could you test the updated syntax @RizkyRajitha posted?

  9. RizkyRajitha commented on May 18, 2020

    @RizkyRajitha
    Contributor

    @eldadfux i think error is because docker was not running at that time .
    i will confirm both and let you know .
    @eldadfux how to update docs , i went through https://github.com/appwrite/appwrite/tree/master/docs
    but there was no installation docs

  10. eldadfux commented on May 18, 2020

    @eldadfux
    MemberAuthor

    You can update the main README.md file of this repo. We need to split the installation snippet to unix and windows based setups.

    The docs of https://appwrite.io/docs/installation page are (currently) located on the private homepage repo, I'll make sure to update there once the syntax is confirmed.

  11. RizkyRajitha commented on May 18, 2020

    @RizkyRajitha
    Contributor

    @eldadfux i will let you know and make a pr once once confirmed

  12. RizkyRajitha commented on May 18, 2020

    @RizkyRajitha
    Contributor

    @eldadfux
    i am using docker toolbox for windows in my machine .
    and in that the bash script work out of the box

    appwirtedockertoolbox

    but in windows cmd it throws a error

    appwritewincmd

    i think the problem is with paths in windows .

    can you explain this path so i can understand the problem

    --volume "%cd%"/appwrite:/install/appwrite:rw

    is it have to be this path or can we tweak it because : is also messing things up

  13. eldadfux commented on May 19, 2020

    @eldadfux
    MemberAuthor

    What happens in the installation process is as follow:

    1. We run the appwrite/install Docker image
    2. The docker stream volume (/var/run/docker.sock) allows the container to execute Docker command on behalf of the host machine
    3. The "$(pwd)"/%cd% volume allows the appwrite/install container to save Appwrite's docker-compose file on the host current directory to allow the user to edit the docker-compose.yml file if he needs to in a later stage.
    4. The container (appwrite/install) downloads https://appwrite.io/docker-compose.yml to the user "$(pwd)"/%cd% directory and run docker-comopse up -d to start Appwrite
  14. divinemaredi commented on May 19, 2020

    @divinemaredi

    i think replacing backslash with back tick will work in windows powershell
    and for windows cmd replacing / with ^ works

    for powershell

    docker run -it --rm `
        --volume /var/run/docker.sock:/var/run/docker.sock `
        --volume "$(pwd)"/appwrite:/install/appwrite:rw `
        -e version=0.5.3 `
        appwrite/install
    

    appwritepowershell

    https://stackoverflow.com/questions/3235850/how-to-enter-a-multi-line-command

    for windows cmd

    docker run -it --rm ^
        --volume //var/run/docker.sock:/var/run/docker.sock ^
        --volume "%cd%"/appwrite:/install/appwrite:rw ^
        -e version=0.5.3 ^
        appwrite/install
    

    appwritewcmd

    https://stackoverflow.com/questions/605686/windows-how-to-specify-multiline-command-on-command-prompt

    The code that worked for me was the one for Windows CMD (Command Prompt). Thanks a lot @RizkyRajitha

    Just ensure you replace the version number with the latest version, but you can always update it later anyway.

  15. SpajicM commented on May 20, 2020

    @SpajicM

    for windows cmd

    docker run -it --rm ^
        --volume //var/run/docker.sock:/var/run/docker.sock ^
        --volume "%cd%"/appwrite:/install/appwrite:rw ^
        -e version=0.5.3 ^
        appwrite/install
    

    Works fine on Windows with Docker Desktop and CMD!

  16. Almoullim commented on May 23, 2020

    @Almoullim

    With windows powershell (replacing "$(pwd)" with ${pwd})

    docker run -it --rm --volume /var/run/docker.sock:/var/run/docker.sock --volume ${pwd}/appwrite:/install/appwrite:rw -e version=0.6.1 appwrite/install

    or

    docker run -it --rm ,
        --volume /var/run/docker.sock:/var/run/docker.sock ,
        --volume ${pwd}/appwrite:/install/appwrite:rw ,
        -e version=0.6.1 ,
        appwrite/install
    
    
  17. Almoullim commented on May 23, 2020

    @Almoullim

    Seems like I can't use Docker on my Windows Machine due to having Windows 10 Home and that's why I am lacking Hyper-V support...

    @TorstenDittmann I think you can use Virtualbox if you don't have access to Hyper-V

  18. eldadfux commented on May 23, 2020

    @eldadfux
    MemberAuthor

    Ready for deployment:
    image

  19. eldadfux commented on May 23, 2020

    @eldadfux
    MemberAuthor

    Updated README.md file:
    image

  20. eldadfux commented on May 24, 2020

    @eldadfux
    MemberAuthor

    New docs are live! Thank you for all your help!!

  21. vimode commented on Oct 2, 2022

    @vimode
    Contributor

    @eldadfux

    Ready for deployment: image

    Huge oversight!
    This deployment page screenshot does not reflect the correct format so the website's installation guide still has the old instructions with ,(comma) instead of `(back ticks) for powershell commands.

    The documentation of the repo was properly updated it seems.

  22. added a commit that references this issue on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issuehacktoberfesthelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions