0

I have a stand-alone web app, it's an executable file. At this point it doesn't require nginx or apache in front of it because it has a built-in webserver. Where should I put it on a server? In the directory of my user? Or in /opt/something or somewhere else?

Also, it's controlled by systemd.

1
  • Wherever you decide, it can be very useful to write a small script or makefile target that does the installation, including any chmod and so on, so you have a starting point for later re-use, or even better package it as an rpm or .deb, no matter how small it is.
    – meuh
    Commented Apr 17, 2016 at 14:10

2 Answers 2

2

Traditionally, the location for this would be /usr/local (resp. /usr/local/bin if this is just one executable). See What is /usr/local/bin? and What is the difference between /opt and /usr/local? .

2
  • actually, it has a few config files as well.
    – Oskar K.
    Commented Apr 17, 2016 at 10:56
  • Then I'd suggest /usr/local/bin for the executable, and a subdirectory /usr/local/etc/yourappname for the config files. Alternatively, executable and config files in a subdirectory /usr/local/yourappname
    – Guido
    Commented Apr 17, 2016 at 12:01
0

Since it's a packaged app, I would say opt.

My understanding is that /usr/local is more like an overlay to / whereas /opt is a place to put applications that fit in a single subdirectory.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .