Open compactification of metric space Suppose I have a separable metric space $X$. I wanted to ask if there exists a separable metric compactification of this space $\overline{X}$, s.t. $X$ is considered open in $\overline{X}$.
 A: This is possible iff $X$ is also locally compact. 

Let $\beta X$ denote the Stone-Cech compactification of $X$. The following lemmas are standard.
Lemma. $X$ is open in $\beta X$ iff $X$ is locally compact. 
Lemma. If $\gamma X$ is a compactification of $X$, then there is a continuous surjection $f:\beta X\to\gamma X$ such that $f[X]=X$ and $f[\beta X\setminus X]=\gamma X\setminus X$.
It easily follows that:
Theorem. 
(1) If $X$ is open in some compactification, then $X$ is locally compact. 
(2) If $X$ is locally compact, then $X$ is open in every compactification. 

Back to your question...
By (1), locally compact is necessary. So $\mathbb Q$, for instance, would be a counterexample. (Actually, if $\gamma \mathbb Q$ is a compactification of $\mathbb Q$, then $\mathbb Q$ contains no open subset of $\gamma \mathbb Q$!)
Now let $X$ be separable metric and  locally compact. As $X$ is separable metric, it embeds into the Hilbert cube $[0,1]^\omega$. The closure of $X$ in this cube is a separable metric compactification, and $X$ is open in it by (2).
